Skip to content

adding codegen test to autodiff #142444

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KMJ-007
Copy link

@KMJ-007 KMJ-007 commented Jun 13, 2025

r? @ZuseZ4

Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 13, 2025
@ZuseZ4
Copy link
Member

ZuseZ4 commented Jun 13, 2025

You'll need the PrintTA flag, look in the rustc-dev-guide for the exact spelling. That should at least give you some typetree metadata.

You likely also want to first merge support for the more specific flag we discussed where you can pass a specific function name. Look into enzyme to find out the name of the flag and grep for how enzyme handles it internally. We likely want to pass that flag to enzyme not via the command line, since we call libEnzyme, which doesn't accept command line flags.
Instead, you should pass it just like all the other flags I'm passing to Enzyme, you can find the handling in rustc_codegen_llvm/src/back/write/lto.rs. First try to pass a hard-coded function name to enzyme, and make it print TA just for that function. We can later generalize it.

I'd focus for the next days on first getting the flags tested and supported, then you can continue with the tests here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants