Skip to content

Commit 8697a96

Browse files
committed
compiler: Add KernelLaunch handling to Specializer
1 parent ba37c25 commit 8697a96

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

devito/ir/iet/visitors.py

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

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

0 commit comments

Comments
 (0)