Skip to content

Commit 71259ef

Browse files
committed
compiler: Add KernelLaunch handling to Specializer
1 parent fe0835b commit 71259ef

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

devito/ir/iet/visitors.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,11 @@ def __init__(self, mapper, nested=False):
15241524
raise ValueError("Only SymPy Numbers can used to replace values during "
15251525
f"specialization. Value {v} was supplied for symbol "
15261526
f"{k}, but is of type {type(v)}.")
1527+
1528+
def visit_KernelLaunch(self, o):
1529+
# Remove kernel args if they are to be hardcoded
1530+
arguments = [i for i in o.arguments if i not in self.mapper]
1531+
return o._rebuild(arguments=arguments)
15271532

15281533
def visit_Operator(self, o, **kwargs):
15291534
# Entirely fine to apply this to an Operator (unlike Uxreplace) - indeed this

0 commit comments

Comments
 (0)