Skip to content

Commit 792fbd8

Browse files
FabioLuporiniEdCaunt
authored andcommitted
compiler: Fixup nbytes-avail-mapper
1 parent a1ebd69 commit 792fbd8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

devito/operator/operator.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,11 @@ def nbytes_avail_mapper(self):
13041304
continue
13051305
try:
13061306
if i._mem_mapped:
1307-
mapper[device_layer] -= i.nbytes
1307+
try:
1308+
v = self[i.name]._obj.nbytes
1309+
except AttributeError:
1310+
v = i.nbytes
1311+
mapper[device_layer] -= v
13081312
except AttributeError:
13091313
pass
13101314

0 commit comments

Comments
 (0)