SIGN IN SIGN UP

[Inductor] Add gfx950 FlyDSL GEMM and torch.mm autotuning (#190903)

Build on the FlyDSL template infrastructure to integrate an FP16/BF16 gfx950 GEMM into `torch.mm` max-autotune.

## Summary
- vendor the gfx950 FlyDSL GEMM kernel and generated template wrapper
- add default and exhaustive tile-configuration heuristics
- preserve runtime row strides and storage offsets for supported NT inputs
- filter shape-incompatible configurations before autotuning
- reject inputs whose origins or row strides violate vector-load alignment
- cache compiled dispatchers by constexpr configuration while keeping tensor layouts dynamic
- keep FlyDSL optional and gate the path on runtime availability, max-autotune, ROCm gfx950, FP16/BF16, and N/K multiples of 32

The current kernel does not support bias or epilogue fusion. Multi-configuration tuning remains opt-in through `flydsl_enable_autotuning`.

On the measured BF16 NT suite, graph replay showed a 1.19x geomean speedup over Triton and a 1.15x geomean speedup over ATen.

## Validation
- local gfx950, ROCm 7.2, FlyDSL 0.3.0: 26 FlyDSL tests and 7 subtests passed
- focused layout-preserving autotune tests: 3 passed
- public-binding and circular-import tests passed
- dedicated gfx950 CI with ROCm 7.14 and FlyDSL 0.3.0 passed in #193473: https://github.com/pytorch/pytorch/actions/runs/31771470509/job/95163557143
- focused linters passed on all changed non-vendored files

Pull Request resolved: https://github.com/pytorch/pytorch/pull/190903
Approved by: https://github.com/jgong5, https://github.com/xytpai, https://github.com/jeffdaily, https://github.com/jansel

Co-authored-by: lirui927 <Rui.Li@amd.com>
X
XiaobingSuper committed
a5755116b9b5d513d167e1644f8308b3971c9b63
Parent: 94055e9
Committed by PyTorch MergeBot <pytorchmergebot@users.noreply.github.com> on 8/25/2026, 6:47:35 AM