Skip to content

Commit 11fa94a

Browse files
committed
dsl: Tweak specialization at apply
1 parent dd983b2 commit 11fa94a

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
@@ -1003,16 +1003,18 @@ def apply(self, **kwargs):
10031003
# In the case of specialization, arguments must be processed before
10041004
# the operator can be compiled
10051005
if specialize:
1006+
# FIXME: Cannot cope with things like sizes/strides yet since it only
1007+
# looks at the parameters
10061008
specialized_args = {p: sympify(args.pop(p.name))
10071009
for p in self.parameters if p.name in specialize}
10081010

10091011
op = Specializer(specialized_args).visit(self)
1010-
else:
1011-
op = self
10121012

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

1015-
# TODO: Whose profiler should get used here?
1016+
# TODO: Does this cause problems for profilers?
1017+
return op.apply(**specialized_kwargs)
10161018

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

0 commit comments

Comments
 (0)