diff --git a/devito/passes/clusters/buffering.py b/devito/passes/clusters/buffering.py index dcba3eb872..48a7b27b31 100644 --- a/devito/passes/clusters/buffering.py +++ b/devito/passes/clusters/buffering.py @@ -432,7 +432,11 @@ def __init_multi_buffering__(self): lhs, rhs = expr.args - self.xd = lhs.function.indices[self.dim] + maybe_xd = lhs.function.indices[self.dim] + if not isinstance(maybe_xd, CustomDimension): + maybe_xd = rhs.function.indices[self.dim] + assert isinstance(maybe_xd, CustomDimension) + self.xd = maybe_xd idx0 = lhs.indices[self.dim] idx1 = rhs.indices[self.dim]