[Inductor] Scale test_bmm_large_batch_dynamic inputs to unskip it on ROCm (#184531)
FIXES #179958 Following @jeffdaily's review, this drops the tolerance approach and extends the input scaling from #183630 instead: `make_inputs` scales by 0.25 rather than 0.5, and the ROCm skip is removed. There is no new tolerance parameter and no `TEST_WITH_ROCM` conditional, so `check_model_with_multiple_inputs` is left alone. **Why the test fails.** `check_model_with_multiple_inputs` compares with `same()`, which is `allclose(atol=1e-4, rtol=1e-4)`. Once fp16 outputs reach 0.125, one ULP there (1.22e-4) is wider than that budget, so above that magnitude the check requires eager and Triton to round every element identically. At the 0.5 scale about 36k of the 287M outputs at `batch=70000` land above 0.125. NVIDIA happens to round them the same way, MI300 does not, because its Triton kernel chains two K=16 MFMAs in an order that doesn't match rocBLAS/hipBLASLt/CK. So main leaves less than one ULP of headroom at the top of the output distribution on every platform, which is the same fragility #183630 hit on RTX PRO 6000. **Why 0.25.** Both factors are powers of two, so this halves every fp16 input exactly: outputs and diffs scale by exactly 1/4 while the 1e-4 atol floor stays where it is. The largest output moves to ~0.05, where 1 ULP is 3.05e-5 against a ~1.0e-4 budget. Measured on MI300X over 5 seeds at `batch=70000`: | input scale | max output | outputs >= 0.125 | worst diff | elements over 1e-4 | min passing tol | | --- | --- | --- | --- | --- | --- | | 0.5 (main) | 0.209 | 35887 | 1.22e-4 (1 ULP) | 1-7 of 287M | 1.083e-4 | | 0.25 (this PR) | 0.052 | 0 | 3.05e-5 (1 ULP) | 0 | 2.96e-5 | **The test still covers what it is for.** `batch=70000` is unchanged, so the `grid.y` > 65535 path runs exactly as before and only the values differ. The round-off now being tolerated is unrelated to the batch splitting under test: its rate is flat across the boundary, 2.87e-4 below vs 2.84e-4 above (ratio 0.99). Injecting plausible `grid.y` regressions into the result still fails the comparison by a wide margin at the 0.25 scale: 515x for a tail that is never written, 650x for a tail that wraps to batch 0, 295x for a single zeroed batch, and 36x for a single zeroed element. Verified on MI300X: fails on main with the skip removed, passes with this change. @eqy flagging you since this extends the scaling you added in #183630. Pull Request resolved: https://github.com/pytorch/pytorch/pull/184531 Approved by: https://github.com/jeffdaily
I
iupaikov-amd committed
0ad9c2fcb2ef91cb6bbfb2f28d16be3cb57f5571
Parent: b1716d9
Committed by PyTorch MergeBot <pytorchmergebot@users.noreply.github.com>
on 8/25/2026, 1:48:32 PM