From 8c55f1984754744c8a24135a89536ac7eb2d3c83 Mon Sep 17 00:00:00 2001 From: Edward Caunt Date: Mon, 4 Aug 2025 15:13:08 +0000 Subject: [PATCH] compiler: Hotfix the memory estimate for certain devices --- devito/operator/operator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devito/operator/operator.py b/devito/operator/operator.py index 08a60e88b8..ce07ebb368 100644 --- a/devito/operator/operator.py +++ b/devito/operator/operator.py @@ -1511,13 +1511,13 @@ def nbytes_consumed_memmapped(self): @cached_property def nbytes_snapshots(self): - # Filter to streamed functions disk = 0 + # Layers are sometimes aliases, so include aliases here for i in self._op_symbols: try: - if i._child not in self._op_symbols: + if i._child is None: # Use only the "innermost" layer to avoid counting snapshots - # twice + # twice. This layer will have no child. v = self._apply_override(i) disk += v.size_snapshot*v._time_size_ideal*np.dtype(v.dtype).itemsize except AttributeError: