Skip to content

Commit 01b43cb

Browse files
authored
[ci] fix pt2e x86 unit tests (#2371)
fix pt2e x86 unit tests Summary: It looks like this [change](pytorch/pytorch@61e1378#diff-40b3d6cc2026cae8f139b15c4b0b05fd2e69c2715be0ce15648de79b0e15a4eb) in core was made and the corresponding test change was not duplicated here. To unbreak CI, I copied over the test changes from the core PR, but I this just skips the test, a proper fix is still needed. Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 0afa4c1 commit 01b43cb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/quantization/pt2e/test_x86inductor_fusion.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,10 +2307,13 @@ def matcher_check_fn():
23072307
nodes_count = 10 if has_bias else 7
23082308
else:
23092309
nodes_count = 7 if has_bias else 6
2310-
self.assertEqual(
2311-
counters["inductor"]["qlinear_weight_prepack_matcher_nodes"],
2312-
nodes_count,
2313-
)
2310+
if counters["inductor"]["removed_pointless_view_pair"] == 0:
2311+
# Removing pointless view pairs affect how the pattern
2312+
# for this test is matched.
2313+
self.assertEqual(
2314+
counters["inductor"]["qlinear_weight_prepack_matcher_nodes"],
2315+
nodes_count,
2316+
)
23142317

23152318
self._test_common(
23162319
mod,

0 commit comments

Comments
 (0)