Skip to content

Commit

Permalink
compiler: Fix IndexDerivative lowering
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Oct 9, 2023
1 parent 7190cb1 commit 043591c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions devito/passes/clusters/derivatives.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _core(expr, c, weights, mapper, sregistry):
try:
w = weights[k]
except KeyError:
w = weights[k] = w0._rebuild(name=name)
w = weights[k] = w0._rebuild(name=name, dtype=expr.dtype)
expr = uxreplace(expr, {w0.indexed: w.indexed})

dims = retrieve_dimensions(expr, deep=True)
Expand All @@ -94,7 +94,7 @@ def _core(expr, c, weights, mapper, sregistry):
ispace = IterationSpace.union(c.ispace, ispace0, relations=extra)

name = sregistry.make_name(prefix='r')
s = Symbol(name=name, dtype=c.dtype)
s = Symbol(name=name, dtype=w.dtype)
expr0 = Eq(s, 0.)
ispace1 = ispace.project(lambda d: d is not dims[-1])
processed.insert(0, c.rebuild(exprs=expr0, ispace=ispace1))
Expand Down

0 comments on commit 043591c

Please sign in to comment.