Skip to content

Commit b99909a

Browse files
committed
compiler: fix corner case
1 parent 5632558 commit b99909a

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

devito/ir/iet/nodes.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,7 @@ def reads(self):
407407
@cached_property
408408
def write(self):
409409
"""The Function written by the Expression."""
410-
try:
411-
return self.expr.rhs.writes[0]
412-
except (AttributeError, IndexError):
413-
return self.expr.lhs.base.function
410+
return self.expr.lhs.base.function
414411

415412
@cached_property
416413
def dimensions(self):

devito/ir/iet/visitors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ def visit_Node(self, o, **kwargs):
13311331
handle = self.mapper[o]
13321332
return self.transform(o, handle, **kwargs)
13331333
children = [self._visit(i, **kwargs) for i in o.children]
1334-
if o._traversable and not any(children):
1334+
if o._traversable and not any(children) and not o.args_frozen:
13351335
return None
13361336
return o._rebuild(*children, **o.args_frozen)
13371337

examples/performance/01_gpu.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@
288288
"\n",
289289
" const int x_fsz0 = u_vec->size[1];\n",
290290
" const int y_fsz0 = u_vec->size[2];\n",
291-
"\n",
292291
" const int x_stride0 = x_fsz0*y_fsz0;\n",
293292
" const int y_stride0 = y_fsz0;\n",
294293
"\n",

0 commit comments

Comments
 (0)