Skip to content

Commit 5729447

Browse files
committed
Fix rules
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
1 parent e64083f commit 5729447

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

onnxscript/rewriter/ort_fusions/fused_matmul_rule_sets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def check(
7979
# Check that last two dimensions are swapped
8080
expected_perm = list(range(len(perm)))
8181
expected_perm[-2], expected_perm[-1] = expected_perm[-1], expected_perm[-2]
82-
if perm != expected_perm:
82+
if list(perm) != expected_perm:
8383
return check_result.fail("Permutation values for Transpose are not correct.")
8484
elif (self._pos == 1 and not _ir_utils.has_rank(x, 2)) or (
8585
self._pos == 2 and not _ir_utils.has_rank(y, 2)
@@ -296,7 +296,7 @@ def check(self, context, x, y, transposed: ir.Value, **_) -> orp.MatchResult:
296296
if _ir_utils.has_rank(x, 2) and _ir_utils.has_rank(y, 2):
297297
if perm:
298298
# Check that the two dimensions are swapped
299-
if perm != [1, 0]:
299+
if tuple(perm) != (1, 0):
300300
return check_result.fail(
301301
"Permutation values for Transpose are not correct."
302302
)

0 commit comments

Comments
 (0)