Skip to content

Remove llvm_enzyme feature outside of bootstrap#158460

Open
ZuseZ4 wants to merge 1 commit into
rust-lang:mainfrom
ZuseZ4:simplify-enzyme-feature
Open

Remove llvm_enzyme feature outside of bootstrap#158460
ZuseZ4 wants to merge 1 commit into
rust-lang:mainfrom
ZuseZ4:simplify-enzyme-feature

Conversation

@ZuseZ4

@ZuseZ4 ZuseZ4 commented Jun 27, 2026

Copy link
Copy Markdown
Member

r? bjorn3
I think you were the one who did the last refactoring on how we pass this feature.

We originally introduced and used this compile-time cfg since we were suspecting that some of the work we did for autodiff was causing a compile time regression even when no autodiff was used. It turned out later that we just did extra work due to a bug, which was fixed.

Thanks to the dlopen work our checks are now much simpler. We only do autodiff work if the -Zautodiff=Enable flag was set. If the flag is set we also just check if libEnzyme is in the sysroot, and if we can not find it, we error out.

I noticed it while fixing some related checks in #158333

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 27, 2026
@rust-bors

This comment has been minimized.

m-ou-se added a commit to m-ou-se/rust that referenced this pull request Jul 7, 2026
…i-obk

Fix typetree generation for differentiated functions

Further improvements after rust-lang#158278
This fixes a test failure on main (encountered while working on the PR above) in `tests/codegen-llvm/autodiff/autodiffv2.rs`.

Further improvements are split out into rust-lang#158440, with high-level docs available in rust-lang/rustc-dev-guide#2911
Also noticed that I can (probably?) remove the llvm_enzyme cfg at this point, rust-lang#158460
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 7, 2026
…i-obk

Fix typetree generation for differentiated functions

Further improvements after rust-lang#158278
This fixes a test failure on main (encountered while working on the PR above) in `tests/codegen-llvm/autodiff/autodiffv2.rs`.

Further improvements are split out into rust-lang#158440, with high-level docs available in rust-lang/rustc-dev-guide#2911
Also noticed that I can (probably?) remove the llvm_enzyme cfg at this point, rust-lang#158460
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 7, 2026
…i-obk

Fix typetree generation for differentiated functions

Further improvements after rust-lang#158278
This fixes a test failure on main (encountered while working on the PR above) in `tests/codegen-llvm/autodiff/autodiffv2.rs`.

Further improvements are split out into rust-lang#158440, with high-level docs available in rust-lang/rustc-dev-guide#2911
Also noticed that I can (probably?) remove the llvm_enzyme cfg at this point, rust-lang#158460
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 7, 2026
…i-obk

Fix typetree generation for differentiated functions

Further improvements after rust-lang#158278
This fixes a test failure on main (encountered while working on the PR above) in `tests/codegen-llvm/autodiff/autodiffv2.rs`.

Further improvements are split out into rust-lang#158440, with high-level docs available in rust-lang/rustc-dev-guide#2911
Also noticed that I can (probably?) remove the llvm_enzyme cfg at this point, rust-lang#158460
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 7, 2026
…i-obk

Fix typetree generation for differentiated functions

Further improvements after rust-lang#158278
This fixes a test failure on main (encountered while working on the PR above) in `tests/codegen-llvm/autodiff/autodiffv2.rs`.

Further improvements are split out into rust-lang#158440, with high-level docs available in rust-lang/rustc-dev-guide#2911
Also noticed that I can (probably?) remove the llvm_enzyme cfg at this point, rust-lang#158460
rust-timer added a commit that referenced this pull request Jul 8, 2026
Rollup merge of #158333 - ZuseZ4:typetrees-for-enzyme3, r=oli-obk

Fix typetree generation for differentiated functions

Further improvements after #158278
This fixes a test failure on main (encountered while working on the PR above) in `tests/codegen-llvm/autodiff/autodiffv2.rs`.

Further improvements are split out into #158440, with high-level docs available in rust-lang/rustc-dev-guide#2911
Also noticed that I can (probably?) remove the llvm_enzyme cfg at this point, #158460
@ZuseZ4 ZuseZ4 force-pushed the simplify-enzyme-feature branch from 92263e0 to 8367b4e Compare July 8, 2026 08:32
@rust-log-analyzer

This comment has been minimized.

@ZuseZ4 ZuseZ4 force-pushed the simplify-enzyme-feature branch from 8367b4e to e783526 Compare July 8, 2026 08:41
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jul 8, 2026
@ZuseZ4 ZuseZ4 marked this pull request as ready for review July 8, 2026 09:00
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants