8000 [inductor] [test] Fix test_add_complex4 op_count to match cpp_wrapper · pytorch/pytorch@3fd238d · GitHub
[go: up one dir, main page]

Skip to content

Commit 3fd238d

Browse files
karthickaipytorchmergebot
authored andcommitted
[inductor] [test] Fix test_add_complex4 op_count to match cpp_wrapper
1 parent c5f131b commit 3fd238d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/inductor/test_torchinductor.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,9 +1411,10 @@ def fn(a, b):
14111411
)
14121412
_, code = run_and_get_code(fn, x, y)
14131413
code = " ".join(code)
1414-
self.assertEqual(
1415-
code.count("view_dtype" if config.cpp_wrapper else "aten.view"), 9
1416-
)
1414+
if config.cpp_wrapper:
1415+
self.assertEqual(code.count("view_dtype"), 3)
1416+
else:
1417+
self.assertEqual(code.count("aten.view"), 9)
14171418

14181419
def test_add_complex5(self):
14191420
def fn(a, b, alpha):

0 commit comments

Comments
 (0)
0