Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions devito/operator/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1364,8 +1364,10 @@ def _get_nbytes(self, i):
try:
# Non-regular AbstractFunction (compressed, etc)
nbytes = obj.nbytes_max
except AttributeError:
# Garden-variety AbstractFunction
except (AttributeError, ValueError):
# Either garden-variety AbstractFunction, or uninitialised
# function used in estimate. In the latter case, fall back
# to nbytes, as it is typically zero
nbytes = obj.nbytes

# Could nominally have symbolic nbytes at this point
Expand Down Expand Up @@ -1461,7 +1463,8 @@ def nbytes_consumed_arrays(self):
# Temporaries such as Arrays are allocated and deallocated on-the-fly
# while in C land, so they need to be accounted for as well
for i in self._op_symbols:
if not i.is_Array or not i._mem_heap or i.alias:
if not i.is_Array or not i._mem_heap or i.alias \
or not i.is_regular:
continue

if i.is_regular:
Expand Down
Loading