SIGN IN SIGN UP

[ROCm][Inductor] Fix CKTILE float16 autotune dtype mismatch (#193902)

Fix CK-Tile float16 autotune silently dropping all fp16 GEMM kernels. ops() named half-precision instances "FP16" while check_dtypes compared against _TORCH_DTYPE_TO_CK[float16] == "F16", so every fp16 kernel was filtered out before autotuning. Rename catalog labels to "F16" to match the existing C++ alias in globals().

Also decouple the universal GEMM dtype catalog from ck_dtype_to_size. GEMM_DTYPES explicitly declares which dtypes get GEMM instances. ck_dtype_to_size remains for alignment and padding math only. _CK_DTYPE_ALIASES is the single source of truth for C++ using aliases, and globals() renders from it.

Tests parametrize fp16 and bf16 across template emit and compile coverage, and assert that ops() implements GEMM_DTYPES, that rendered globals() matches _CK_DTYPE_ALIASES, and that every GEMM dtype has a size-table entry.

This is a follow-up to the CK-Tile inductor GEMM fix #189646
Authored with Cursor Grok 4.6.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/193902
Approved by: https://github.com/jeffdaily

Co-authored-by: Jeff Daily <jeff.daily@amd.com>
J
Jagadish Krishnamoorthy committed
c1b157d8ba0e5dcee8e040ff6464bf517a8ae51b
Parent: a6531c1
Committed by PyTorch MergeBot <pytorchmergebot@users.noreply.github.com> on 8/25/2026, 5:48:36 PM