Skip to content

Commit 0579428

Browse files
committed
dsl: Tweak specialization at apply
1 parent 437456e commit 0579428

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

devito/operator/operator.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,16 +1008,18 @@ def apply(self, **kwargs):
10081008
# In the case of specialization, arguments must be processed before
10091009
# the operator can be compiled
10101010
if specialize:
1011+
# FIXME: Cannot cope with things like sizes/strides yet since it only
1012+
# looks at the parameters
10111013
specialized_args = {p: sympify(args.pop(p.name))
10121014
for p in self.parameters if p.name in specialize}
10131015

10141016
op = Specializer(specialized_args).visit(self)
1015-
else:
1016-
op = self
10171017

1018-
from IPython import embed; embed()
1018+
specialized_kwargs = {k: v for k, v in kwargs.items()
1019+
if k not in specialize}
10191020

1020-
# TODO: Whose profiler should get used here?
1021+
# TODO: Does this cause problems for profilers?
1022+
return op.apply(**specialized_kwargs)
10211023

10221024
# Invoke kernel function with args
10231025
arg_values = [args[p.name] for p in self.parameters]

0 commit comments

Comments
 (0)