8000 Update on "[Inductor] Construct subgraph with benchmarking args not e… · pytorch/pytorch@c81b6e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit c81b6e8

Browse files
committed
Update on "[Inductor] Construct subgraph with benchmarking args not example_inputs"
If the inputs to a subgraph has FlexibleLayout, the subgraph does not currently freeze the layouts here. Therefore, the `example_inputs` generated might not be consistent in layout with the `args` based in for benchmarking Differential Revision: [D74900879](https://our.internmc.facebook.com/intern/diff/D74900879/) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
1 parent d21545b commit c81b6e8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/inductor/test_subgraph_choice.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def func(mat1, mat2):
106106
res = compiled_func(a_in, b_in)
107107

108108
# Check same results of compiled result and regular torch.mm
109-
torch.testing.assert_close(res, a_in @ b_in, atol=1e-2, rtol=1e-2)
109+
torch.testing.assert_close(res, a_in @ b_in, atol=1e-1, rtol=1e-1)
110110

111111
@skipIfXpu
112112
@unittest.skipIf(TEST_WITH_ROCM, "decompose_k not supported on ROCm")
@@ -186,8 +186,7 @@ def func(mat1, mat2):
186186
res = compiled_func(a_in, b_in)
187187

188188
# Check same results of compiled result and regular torch.mm
189-
# Relax precision as decomposeK does first accumulation in fp16
190-
torch.testing.assert_close(res, (a_in + 1.0) @ b_in, atol=1e-2, rtol=1e-2)
189+
torch.testing.assert_close(res, (a_in + 1.0) @ b_in, atol=1e-1, rtol=1e-1)
191190

192191

193192
if __name__ == "__main__":

0 commit comments

Comments
 (0)
0