Skip to content

enzyme/autodiff is compatible with download-ci=true - #147888

Merged
bors merged 3 commits into
rust-lang:masterfrom
ZuseZ4:autodiff-with-download-ci
Oct 20, 2025
Merged

enzyme/autodiff is compatible with download-ci=true#147888
bors merged 3 commits into
rust-lang:masterfrom
ZuseZ4:autodiff-with-download-ci

Conversation

@ZuseZ4

@ZuseZ4ZuseZ4 commented Oct 19, 2025

Copy link
Copy Markdown
Member

Note: This actually never worked, so this PR is reverted in #150070.

To my surprise autodiff just works out of the box with download-ci=true. Thanks to all the bootstrap people who over the past helped me to link properly against the sysroot LLVM, which seems to pay off here.
That also helps with enabling Rust in Enzyme CI, since CCache for some reason doesn't seem to cache LLVM correctly on their runners.

I verified that this works with
./configure --release-channel=nightly --enable-llvm-enzyme --enable-option-checking --disable-docs --enable-llvm-assertions --set llvm.download-ci-llvm=true. However, shouldn't download-ci-llvm already be the default? Why do I still have to manually set it with this pr?

I tested it afterwards with
./x.py test --stage 1 tests/codegen-llvm/autodiff

r? bootstrap

closes#147535

@rustbot

Copy link
Copy Markdown
Collaborator

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@rustbotrustbot added 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) labels Oct 19, 2025
@rustbot

Copy link
Copy Markdown
Collaborator

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @jieyouxu, @Kobzol, @tshepang

@rustbotrustbot added the A-rustc-dev-guide Area: rustc-dev-guide label Oct 19, 2025
@ZuseZ4
ZuseZ4force-pushed the autodiff-with-download-ci branch from 55d9799 to 3e32dc2CompareOctober 19, 2025 19:04

@jieyouxujieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, shouldn't download-ci-llvm already be the default? Why do I still have to manually set it with this pr?

Probably because ./configure tries to be very conservative (to a dist profile or global default). download-ci-llvm is a reasonable default for development profiles, but is not suitable as a global default, so you'll ned to opt-in like you are doing here.

Thanks.

View changes since this review

@jieyouxu

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented Oct 20, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 3e32dc2 has been approved by jieyouxu

It is now in the queue for this repository.

@borsbors 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-review Status: Awaiting review from the assignee but also interested parties. labels Oct 20, 2025
@ZalatharZalathar mentioned this pull request Oct 20, 2025
bors added a commit that referenced this pull request Oct 20, 2025
Rollup of 4 pull requests
Successful merges:
- #147734 (Further tighten up relaxed bounds)
- #147888 (enzyme/autodiff is compatible with download-ci=true)
- #147898 (compiletest: Move `AuxProps` out of `EarlyProps`)
- #147903 (compiletest: Store the selected edition in `TestProps`)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit d376a49 into rust-lang:masterOct 20, 2025
11 checks passed
@rustbotrustbot added this to the 1.92.0 milestone Oct 20, 2025
rust-timer added a commit that referenced this pull request Oct 20, 2025
Rollup merge of #147888 - ZuseZ4:autodiff-with-download-ci, r=jieyouxu
enzyme/autodiff is compatible with download-ci=true
To my surprise autodiff just works out of the box with download-ci=true. Thanks to all the bootstrap people who over the past helped me to link properly against the sysroot LLVM, which seems to pay off here.
That also helps with enabling Rust in Enzyme CI, since CCache for some reason doesn't seem to cache LLVM correctly on their runners.
I verified that this works with
` ./configure --release-channel=nightly --enable-llvm-enzyme --enable-option-checking --disable-docs --enable-llvm-assertions --set llvm.download-ci-llvm=true`. However, shouldn't download-ci-llvm already be the default? Why do I still have to manually set it with this pr?
I tested it afterwards with
`./x.py test --stage 1 tests/codegen-llvm/autodiff`
r? bootstrap
closes#147535
github-actionsBot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Oct 20, 2025
Rollup of 4 pull requests
Successful merges:
- rust-lang/rust#147734 (Further tighten up relaxed bounds)
- rust-lang/rust#147888 (enzyme/autodiff is compatible with download-ci=true)
- rust-lang/rust#147898 (compiletest: Move `AuxProps` out of `EarlyProps`)
- rust-lang/rust#147903 (compiletest: Store the selected edition in `TestProps`)
r? `@ghost`
`@rustbot` modify labels: rollup
Kobzol added a commit to Kobzol/rust that referenced this pull request Dec 16, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Dec 17, 2025
Partially revert rust-lang#147888 and print warning if LLVM CMake dir is missing when building Enzyme
Partially reverts rust-lang#147888, Enzyme cannot be build with `download-ci-llvm = true`.
r? `@ZuseZ4`
jhpratt added a commit to jhpratt/rust that referenced this pull request Dec 17, 2025
Partially revert rust-lang#147888 and print warning if LLVM CMake dir is missing when building Enzyme
Partially reverts rust-lang#147888, Enzyme cannot be build with `download-ci-llvm = true`.
r? ``@ZuseZ4``
@jhprattjhpratt mentioned this pull request Dec 17, 2025
bors added a commit that referenced this pull request Dec 17, 2025
Rollup of 4 pull requests
Successful merges:
- #150000 (Port `#[rustc_legacy_const_generics]` to use attribute parser )
- #150060 (autodiff: emit an error if we fail to find libEnzyme)
- #150070 (Partially revert #147888 and print warning if LLVM CMake dir is missing when building Enzyme)
- #150072 (Port #[no_link] to use attribute parser)
r? `@ghost`
`@rustbot` modify labels: rollup
rust-timer added a commit that referenced this pull request Dec 17, 2025
Rollup merge of #150070 - Kobzol:enzyme-error, r=ZuseZ4
Partially revert #147888 and print warning if LLVM CMake dir is missing when building Enzyme
Partially reverts #147888, Enzyme cannot be build with `download-ci-llvm = true`.
r? ``@ZuseZ4``
@ZuseZ4
ZuseZ4 deleted the autodiff-with-download-ci branch January 31, 2026 05:39
@ZuseZ4ZuseZ4 added the F-autodiff `#![feature(autodiff)]` label Apr 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustc-dev-guideArea: rustc-dev-guideF-autodiff`#![feature(autodiff)]`S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std::autodiff should work with download-llvm

4 participants

@ZuseZ4@rustbot@jieyouxu@bors