Skip to content

Commit 05d0f11

Browse files
Revert "Add test coverage to tf32 in max autotune mm configs (pytorch#161545)"
This reverts commit e9d34b2. Reverted pytorch#161545 on behalf of https://github.com/atalman due to inductor/test_max_autotune.py::TestMaxAutotuneRemoteCache::test_get_mm_configs_float32_precision_ieee [GH job link](https://github.com/pytorch/pytorch/actions/runs/17283985553/job/49058214260) [HUD commit link](https://hud.pytorch.org/pytorch/pytorch/commit/e9d34b2438d65d6d16109e2416f3698de20f85c2) ([comment](pytorch#161545 (comment)))
1 parent ef0483d commit 05d0f11

File tree

1 file changed

+2
-36
lines changed

1 file changed

+2
-36
lines changed

test/inductor/test_max_autotune.py

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@
2828
TuningProcessPool,
2929
)
3030
from torch._inductor.graph import GraphLowering
31-
from torch._inductor.ir import Buffer, ChoiceCaller, FixedLayout, InputBuffer
31+
from torch._inductor.ir import Buffer, ChoiceCaller, FixedLayout
3232
from torch._inductor.kernel.mm_plus_mm import aten_mm_plus_mm
33-
from torch._inductor.kernel_inputs import MMKernelInputs
3433
from torch._inductor.select_algorithm import (
3534
add_feedback_saver,
3635
AlgorithmSelectorCache,
@@ -76,7 +75,7 @@
7675
)
7776

7877

79-
torch.backends.cuda.matmul.allow_tf32 = True
78+
torch.set_float32_matmul_precision("high")
8079
if HAS_CUDA_AND_TRITON:
8180
torch.cuda.memory._set_allocator_settings("expandable_segments:False")
8281

@@ -2077,39 +2076,6 @@ def f(x, y):
20772076
global_stats.report()
20782077
self.assertEqual(global_stats.autotune_remote, Stats(2, 3, 2))
20792078

2080-
def test_get_mm_configs_float32_precision_ieee(self):
2081-
"""Test that configs returned from choices.get_mm_configs use float32_precision == ieee."""
2082-
from torch._inductor.choices import InductorChoices
2083-
from torch._inductor.graph import GraphLowering
2084-
from torch._inductor.ir import FlexibleLayout
2085-
from torch.fx.experimental.proxy_tensor import make_fx
2086-
2087-
# Create a simple graph to get proper context
2088-
gm = make_fx(lambda: torch.zeros(2, 3))()
2089-
graph = GraphLowering(gm)
2090-
2091-
with V.set_graph_handler(graph):
2092-
device = torch.device(f"{GPU_TYPE}:0")
2093-
mat1 = InputBuffer(
2094-
name="mat1",
2095-
layout=FixedLayout(device, torch.float32, [64, 128], [128, 1]),
2096-
)
2097-
mat2 = InputBuffer(
2098-
name="mat2",
2099-
layout=FixedLayout(device, torch.float32, [128, 64], [64, 1]),
2100-
)
2101-
kernel_inputs = MMKernelInputs([mat1, mat2])
2102-
output_layout = FlexibleLayout(device, torch.float32, [64, 64])
2103-
2104-
choices = InductorChoices()
2105-
configs = list(
2106-
choices.get_mm_configs(kernel_inputs, output_layout, "mm", "mm")
2107-
)
2108-
2109-
for cfg in configs:
2110-
self.assertIn("ALLOW_TF32", cfg)
2111-
self.assertEqual(cfg["ALLOW_TF32"], True)
2112-
21132079

21142080
class _TestTritonTemplateCaller(TritonTemplateCaller):
21152081
def __init__(self, bmreq: _TestBenchmarkRequest):

0 commit comments

Comments
 (0)