Skip to content

Remove llvm_enzyme feature outside of bootstrap - #158460

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
ZuseZ4:simplify-enzyme-feature
Jul 29, 2026
Merged

Remove llvm_enzyme feature outside of bootstrap#158460
rust-bors[bot] merged 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
Comment thread src/bootstrap/src/lib.rs Outdated
Comment thread library/sysroot/Cargo.toml
@bjorn3 bjorn3 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 14, 2026
@ZuseZ4
ZuseZ4 force-pushed the simplify-enzyme-feature branch from e783526 to ba87784 Compare July 28, 2026 20:12
@ZuseZ4

ZuseZ4 commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

@bors try jobs=optional-x86_64-gnu-autodiff

rust-bors Bot pushed a commit that referenced this pull request Jul 28, 2026
Remove llvm_enzyme feature outside of bootstrap


try-job: optional-x86_64-gnu-autodiff
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a330b7b (a330b7bb16b802725b96c92052753ebf7365a135)
Base parent: e19d321 (e19d321c06479c6fd77533582b0d5a86651f1be3)

@bjorn3

bjorn3 commented Jul 29, 2026

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit ba87784 has been approved by bjorn3

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 29, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 29, 2026
…bjorn3

Remove llvm_enzyme feature outside of bootstrap

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 rust-lang#158333
rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
Rollup of 6 pull requests

Successful merges:

 - #158460 (Remove llvm_enzyme feature outside of bootstrap)
 - #159671 (Add semver check test command for checking API compatibility of stdlib)
 - #159717 (Add `-Zimplicit-sysroot-deps`)
 - #159994 (Show jobs where a given test was executed in `test-dashboard`)
 - #160085 (Remove various superfluous lint attributes)
 - #160123 (add additional license option for third-party dependencies)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 29, 2026
…bjorn3

Remove llvm_enzyme feature outside of bootstrap

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 rust-lang#158333
rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #158460 (Remove llvm_enzyme feature outside of bootstrap)
 - #159509 (Generate `valid_range`s for enums sign-agnostically)
 - #159632 (CFI: Add support for the adt_const_params feature)
 - #159671 (Add semver check test command for checking API compatibility of stdlib)
 - #157058 (Rustdoc label badge for notable traits)
 - #159717 (Add `-Zimplicit-sysroot-deps`)
 - #159850 (Add regression test for closure in array-length const generic)
 - #159994 (Show jobs where a given test was executed in `test-dashboard`)
 - #160110 (convert rustc_hir::Target inherent methods to From impls)
 - #160123 (add additional license option for third-party dependencies)
 - #160131 (bootstrap: remove temporary bors email lookup)
@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit ba87784 with merge 1cbbcd7...

Workflow: https://github.com/rust-lang/rust/actions/runs/30457715708

rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
Remove llvm_enzyme feature outside of bootstrap

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
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors yield

@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Auto build was cancelled. Cancelled workflows:

The next pull request likely to be tested is #160146.

rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #158460 (Remove llvm_enzyme feature outside of bootstrap)
 - #159509 (Generate `valid_range`s for enums sign-agnostically)
 - #159632 (CFI: Add support for the adt_const_params feature)
 - #159671 (Add semver check test command for checking API compatibility of stdlib)
 - #157058 (Rustdoc label badge for notable traits)
 - #159717 (Add `-Zimplicit-sysroot-deps`)
 - #159850 (Add regression test for closure in array-length const generic)
 - #159994 (Show jobs where a given test was executed in `test-dashboard`)
 - #160110 (convert rustc_hir::Target inherent methods to From impls)
 - #160123 (add additional license option for third-party dependencies)
 - #160131 (bootstrap: remove temporary bors email lookup)
@rust-bors
rust-bors Bot merged commit 581f75e into rust-lang:main Jul 29, 2026
14 of 15 checks passed
rust-timer added a commit that referenced this pull request Jul 29, 2026
Rollup merge of #158460 - ZuseZ4:simplify-enzyme-feature, r=bjorn3

Remove llvm_enzyme feature outside of bootstrap

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 this to the 1.99.0 milestone Jul 29, 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants