Skip to content

Commit

Permalink
compiler: prevent invering dtype on empty cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Oct 31, 2023
1 parent cf85b06 commit a6899fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion devito/finite_differences/differentiable.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def _fd(self):
fd_args = []
for f in self._args_diff:
try:
if f.space_order <= self.space_order and f.time_order <= self.time_order:
if f.space_order <= self.space_order and \
(not f.is_TimeDependent or f.time_order <= self.time_order):
fd_args.append(f)
except AttributeError:
pass
Expand Down
2 changes: 1 addition & 1 deletion devito/ir/clusters/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def dtype(self):
If two Clusters perform calculations with different precision, the
data type with highest precision is returned.
"""
dtypes = {i.dtype for i in self}
dtypes = {i.dtype for i in self} - {None}

return infer_dtype(dtypes)

Expand Down

0 comments on commit a6899fa

Please sign in to comment.