8000 [Inductor] Record Triton’s Base32 Cache Key in .best_config for Debugging by fulvius31 · Pull Request #148981 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

fulvius31
Copy link
Contributor

This is a follow-up PR of the reverted one #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.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @davidberard98 @clee2000 @eellison @masnesral

@fulvius31 fulvius31 requested a review from a team as a code owner March 11, 2025 18:28
Copy link
pytorch-bot bot commented Mar 11, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/148981

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit c2ae126 with merge base 86c6f71 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@fulvius31
Copy link
Contributor Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Mar 11, 2025
@mikaylagawarecki mikaylagawarecki added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Mar 13, 2025
@fulvius31 fulvius31 closed this Mar 18, 2025
@fulvius31
Copy link
Contributor Author

@davidberard98 thanks for running the tests again.

I've added the cache_hash in the make_launcher function and hopefully the tests should pass.

@fulvius31
Copy link
Contributor Author

@davidberard98 are you able to run the tests once again to be sure that everything works ? thank you!

@fulvius31 fulvius31 force-pushed the inductor_cache branch 2 times, most recently from 9672c95 to 3836d0c Compare May 12, 2025 13:39
@fulvius31
Copy link
Contributor Author

@davidberard98 I just rebased with upstream/viable/strict let me know if you can run the tests. Thanks

@fulvius31
Copy link
Contributor Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Tried to rebase and push PR #148981, but it was already up to date. Try rebasing against main by issuing:
@pytorchbot rebase -b main

@fulvius31
Copy link
Contributor Author
fulvius31 commented May 13, 2025

Trying to merge so I can trigger the tests

@pytorchbot merge

nvm I can't.

I'm using the changes of this PR for a tool we are building.

Copy link
pytorch-bot bot commented May 13, 2025

This PR needs to be approved by an authorized maintainer before merge.

@fulvius31 fulvius31 force-pushed the inductor_cache branch 2 times, most recently from f382f36 to fb709ac Compare May 15, 2025 13:21
@fulvius31
Copy link
Contributor Author

@davidberard98 I just rebased with upstream/viable/strict let me know if you can run the tests. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-no-td Do not run TD on this PR Merged module: inductor open source Reverted topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0