[Inductor] Record Triton’s Base32 Cache Key in .best_config for Debugging (#147019)

Modified  TorchInductor’s autotuning flow so that each `best_config` JSON file also includes the Triton “base32” (or base64) cache key.

**Motivation**

Debugging & Analysis: With this change, we can quickly identify which compiled binary and IRs belongs to a given best config.
The impact is minimal since it is only an extra field in .best_config. It can help advanced performance tuning or kernel-level debugging.

Also, since Triton already stores cubin/hsaco in its cache, developers/researchers can avoid to set `store_cubin = True` since they can get the cubin/hsaco in the Triton cache and with the code provided in this PR, they can easily match the best_config with the right Triton cache directory for the "best" kernel.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/147019
Approved by: https://github.com/davidberard98
This commit is contained in:
fulvius31
2025-03-04 12:16:38 +00:00
committed by PyTorch MergeBot
parent f1cce0951b
commit e3e45d90d8
4 changed files with 109 additions and 2 deletions

View File

@ -301,6 +301,7 @@ S390X_TESTLIST = [
"inductor/test_autoheuristic",
"inductor/test_b2b_gemm",
"inductor/test_benchmarking",
"inductor/test_best_config",
"inductor/test_ck_backend",
"inductor/test_codecache",
"inductor/test_codegen_triton",