Skip to content

Commit ebd46ba

Browse files
committed
tests: Fix TestDependenceAnalysis
1 parent e3ad941 commit ebd46ba

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tests/test_ir.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from devito.ir.support.guards import GuardOverflow
1818
from devito.symbolics import DefFunction, FieldFromPointer
1919
from devito.tools import prod
20+
from devito.tools.data_structures import frozendict
2021
from devito.types import Array, Bundle, CriticalRegion, Jump, Scalar, Symbol
2122

2223

@@ -611,9 +612,9 @@ def test_single_eq(self, expr, expected, ti0, ti1, fa, grid):
611612
"""
612613
expr = LoweredEq(EVAL(expr, ti0.base, ti1.base, fa))
613614

614-
# Force innatural flow, only to stress the compiler to see if it was
615+
# Force unnatural flow, only to stress the compiler to see if it is
615616
# capable of detecting anti-dependences
616-
expr.ispace._directions = {i: Forward for i in expr.ispace.directions}
617+
expr.ispace._directions = frozendict({i: Forward for i in expr.ispace.directions})
617618

618619
scope = Scope(expr)
619620
deps = scope.d_all
@@ -709,10 +710,10 @@ def test_multiple_eqs(self, exprs, expected, ti0, ti1, ti3, fa):
709710
exprs = [LoweredEq(i) for i in EVAL(exprs, ti0.base, ti1.base, ti3.base, fa)]
710711
expected = [tuple(i.split(',')) for i in expected]
711712

712-
# Force innatural flow, only to stress the compiler to see if it was
713+
# Force unnatural flow, only to stress the compiler to see if it is
713714
# capable of detecting anti-dependences
714715
for i in exprs:
715-
i.ispace._directions = {i: Forward for i in i.ispace.directions}
716+
i.ispace._directions = frozendict({i: Forward for i in i.ispace.directions})
716717

717718
scope = Scope(exprs)
718719
assert len(scope.d_all) == len(expected)

0 commit comments

Comments
 (0)