Skip to content

Commit 4c654ff

Browse files
authored
Merge pull request #2699 from devitocodes/hotfix-estimate-memory
compiler: Hotfix the memory estimate for certain devices
2 parents ad1d4f4 + 8c55f19 commit 4c654ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

devito/operator/operator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,13 +1511,13 @@ def nbytes_consumed_memmapped(self):
15111511

15121512
@cached_property
15131513
def nbytes_snapshots(self):
1514-
# Filter to streamed functions
15151514
disk = 0
1515+
# Layers are sometimes aliases, so include aliases here
15161516
for i in self._op_symbols:
15171517
try:
1518-
if i._child not in self._op_symbols:
1518+
if i._child is None:
15191519
# Use only the "innermost" layer to avoid counting snapshots
1520-
# twice
1520+
# twice. This layer will have no child.
15211521
v = self._apply_override(i)
15221522
disk += v.size_snapshot*v._time_size_ideal*np.dtype(v.dtype).itemsize
15231523
except AttributeError:

0 commit comments

Comments
 (0)