-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
std::autodiff failing in debug builds - cannot compute with global variable #154822
Copy link
Copy link
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.F-autodiff`#![feature(autodiff)]``#![feature(autodiff)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.F-autodiff`#![feature(autodiff)]``#![feature(autodiff)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for Bug.
I tried this code:
I expected to see this happen: such code used to work
Instead, this happened:
RUSTFLAGS="-Zautodiff=Enable" cargo +enzyme runMeta
rustc --version --verbose:We used to have similar-looking issues when using metadata instead of the named globals for enzyme info like
enzyme_dup. cc @oli-obk and I had already agreed back then that we should investigate the real cause rather than working around by switching from metadata to globals. I guess we should get back to it.It should be trivial to first minimize this to IR level and then we should easily see if it's an Enzyme failure (I don't think so) or just us doing something unlucky around caching/incremental compilation, which obscures the global name for enzyme.
Backtrace