Skip to content

Enable autodiff in ci for all major os#152768

Merged
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
ZuseZ4:autodiff-in-ci-for-all-os
Feb 24, 2026
Merged

Enable autodiff in ci for all major os#152768
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
ZuseZ4:autodiff-in-ci-for-all-os

Conversation

@ZuseZ4
Copy link
Member

@ZuseZ4 ZuseZ4 commented Feb 17, 2026

View all comments

Follow-up attempt to #140064 after moving autodiff to dlopen.
It covers Linux (x86_64+aarch64), MacOS (aarch64), Windows (mingw-llvm aarch64+x86_64)
The extra build time for Enzyme are 180.27s on our slowest runner (aarch64-apple).

The follow-up distribution via rustup probably still needs a small fix, see #151063 (comment)

Placing the downloaded libEnzyme artifact on my local linux under ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib enables my nightly compiler to run autodiff.

r? @Kobzol

closes: #140064
closes: #151243
closes: #151063

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Feb 17, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 17, 2026

Kobzol is not on the review rotation at the moment.
They may take a while to respond.

@ZuseZ4 ZuseZ4 changed the title Autodiff in ci for all os Enable autodiff in ci for all major os Feb 17, 2026
@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Feb 17, 2026

@bors try jobs=dist-aarch64-apple

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 17, 2026
Enable autodiff in ci for all major os


try-job: dist-aarch64-apple
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 17, 2026

☀️ Try build successful (CI)
Build commit: f1988f0 (f1988f049b5de890c7b71b3da66d38620ed38fbd, parent: dfbfbf785f46d10103e80735a9ccb4765bd6dfe2)

@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Feb 17, 2026

@bors try jobs=dist-x86_64-linux

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 17, 2026
Enable autodiff in ci for all major os


try-job: dist-x86_64-linux
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 18, 2026

☀️ Try build successful (CI)
Build commit: 20e4cfa (20e4cfae177c9daec1a6b5ae5d1332821335dcbc, parent: 8387095803f21a256a9a772ac1f9b41ed4d5aa0a)

@ZuseZ4 ZuseZ4 added the F-autodiff `#![feature(autodiff)]` label Feb 18, 2026
@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Feb 18, 2026

@bors try jobs=dist-aarch64-linux

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 18, 2026
Enable autodiff in ci for all major os


try-job: dist-aarch64-linux
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 18, 2026

☀️ Try build successful (CI)
Build commit: 22ac1fb (22ac1fb63228652dc40e63504ab188e2bae982bb, parent: 8387095803f21a256a9a772ac1f9b41ed4d5aa0a)

@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Feb 18, 2026

@bors try jobs=dist-aarch64-llvm-mingw

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 18, 2026
Enable autodiff in ci for all major os


try-job: dist-aarch64-llvm-mingw
@rust-lang rust-lang deleted a comment from rust-bors bot Feb 18, 2026
@rust-bors rust-bors bot 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 Feb 18, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 18, 2026

💔 Test for ea4964d failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@ZuseZ4 ZuseZ4 force-pushed the autodiff-in-ci-for-all-os branch from e926590 to cc1935a Compare February 18, 2026 19:12
@rustbot

This comment has been minimized.

@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Feb 20, 2026

I guess we could extract some shared logic that makes sense for both LLVM and LLD into a separate function and use it both in configure_llvm and in the LLD build step.

That's already shared between llvm and lld. Enzyme ignores these LLVM_ variables, so we instead have to use -fuse-ld=lld, which in turn isn't needed for the LLVM/LLD build steps.

I don't think we can nicely share it between all three, llvm+lld+enzyme.

I tried all 5 targets and they build fine.

@ZuseZ4 ZuseZ4 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 Feb 20, 2026
@Kobzol
Copy link
Member

Kobzol commented Feb 23, 2026

Thanks, the LLD logic looks reasonable, as far as bootstrap workarounds go.

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 23, 2026

📌 Commit c033de9 has been approved by Kobzol

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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 23, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 23, 2026
…r=Kobzol

Enable autodiff in ci for all major os

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152768)*

Follow-up attempt to rust-lang#140064 after moving autodiff to dlopen.
It covers Linux (x86_64+aarch64), MacOS (aarch64), Windows (mingw-llvm aarch64+x86_64)
The extra build time for Enzyme are 180.27s on our slowest runner (aarch64-apple).

The follow-up distribution via rustup probably still needs a small fix, see rust-lang#151063 (comment)

Placing the downloaded libEnzyme artifact on my local linux under `~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib` enables my nightly compiler to run autodiff.

r? @Kobzol

closes: rust-lang#140064
closes: rust-lang#151243
closes: rust-lang#151063
rust-bors bot pushed a commit that referenced this pull request Feb 23, 2026
Rollup of 6 pull requests

Successful merges:

 - #153007 (`rust-analyzer` subtree update)
 - #152768 (Enable autodiff in ci for all major os)
 - #152003 (Reflection TypeId::trait_info_of)
 - #152988 (Port `#[register_tool]` to the new attribute system)
 - #152989 (Port `#[rustc_inherit_overflow_checks]` to the new attribute parsers)
 - #152991 (fix interpreter tracing output)
rust-bors bot pushed a commit that referenced this pull request Feb 23, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #153007 (`rust-analyzer` subtree update)
 - #152670 (Simplify ThinLTO handling)
 - #152768 (Enable autodiff in ci for all major os)
 - #152908 (Enable rust.remap-debuginfo in the dist profile)
 - #152999 (Check importing `crate`/`$crate`/`super` after handling `self`)
 - #152003 (Reflection TypeId::trait_info_of)
 - #152976 (Revert relative paths for std links in rustc-docs)
 - #152985 (Port `#[feature]` to the new attribute system)
 - #152989 (Port `#[rustc_inherit_overflow_checks]` to the new attribute parsers)
 - #152991 (fix interpreter tracing output)
 - #153004 (Superficial tweaks to the query modifier docs in `rustc_middle::query::modifiers`)
 - #153008 (bootstrap.compiler.toml: update name of primary branch)
 - #153016 (Migration of `LintDiagnostic` - part 2)
 - #153020 (rustdoc: Improve sentence for documented empty impl blocks)

Failed merges:

 - #152988 (Port `#[register_tool]` to the new attribute system)
rust-bors bot pushed a commit that referenced this pull request Feb 24, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #153007 (`rust-analyzer` subtree update)
 - #152670 (Simplify ThinLTO handling)
 - #152768 (Enable autodiff in ci for all major os)
 - #152908 (Enable rust.remap-debuginfo in the dist profile)
 - #152999 (Check importing `crate`/`$crate`/`super` after handling `self`)
 - #152003 (Reflection TypeId::trait_info_of)
 - #152976 (Revert relative paths for std links in rustc-docs)
 - #152985 (Port `#[feature]` to the new attribute system)
 - #152989 (Port `#[rustc_inherit_overflow_checks]` to the new attribute parsers)
 - #152991 (fix interpreter tracing output)
 - #153004 (Superficial tweaks to the query modifier docs in `rustc_middle::query::modifiers`)
 - #153008 (bootstrap.compiler.toml: update name of primary branch)
 - #153016 (Migration of `LintDiagnostic` - part 2)
 - #153020 (rustdoc: Improve sentence for documented empty impl blocks)

Failed merges:

 - #152988 (Port `#[register_tool]` to the new attribute system)
@rust-bors rust-bors bot merged commit 1d21fd3 into rust-lang:main Feb 24, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 24, 2026
rust-timer added a commit that referenced this pull request Feb 24, 2026
Rollup merge of #152768 - ZuseZ4:autodiff-in-ci-for-all-os, r=Kobzol

Enable autodiff in ci for all major os

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152768)*

Follow-up attempt to #140064 after moving autodiff to dlopen.
It covers Linux (x86_64+aarch64), MacOS (aarch64), Windows (mingw-llvm aarch64+x86_64)
The extra build time for Enzyme are 180.27s on our slowest runner (aarch64-apple).

The follow-up distribution via rustup probably still needs a small fix, see #151063 (comment)

Placing the downloaded libEnzyme artifact on my local linux under `~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib` enables my nightly compiler to run autodiff.

r? @Kobzol

closes: #140064
closes: #151243
closes: #151063
@ZuseZ4 ZuseZ4 deleted the autodiff-in-ci-for-all-os branch February 24, 2026 08:39
--enable-sanitizers
--enable-profiler
--set rust.jemalloc
--set llvm.link-shared=true
Copy link
Member

@RalfJung RalfJung Feb 25, 2026

Choose a reason for hiding this comment

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

This is a highly non-trivial change with a risk of all sorts of unexpected side-effects. It's odd that this isn't even mentioned in the PR description, and it definitely should only have landed in a rollup=never PR to facilitate bisecting. I think this is the cause for #153077 but this PR became part of a gigantic rollup so I am not sure.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that this shouldn't be done for several reasons, including also performance.

At the very least, it should only be done when building enzyme (e.g. in a separate build step).

Copy link
Member

Choose a reason for hiding this comment

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

At the very least, it should only be done when building enzyme (e.g. in a separate build step).

Enzyme needs to be linked against the same LLVM as rustc given that it is an LLVM plugin, yet we we don't want to statically link it into rustc, such that we can put it in a separate rustup component that isn't installed by default.

RalfJung added a commit to RalfJung/rust that referenced this pull request Feb 25, 2026
…all-os, r=Kobzol"

This reverts commit 1d21fd3, reversing
changes made to 1894a0e.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 25, 2026
Revert "Enable autodiff in ci for all major os"

Reverts rust-lang#152768 which fixes  rust-lang#153077.
@RalfJung
Copy link
Member

I am more and more confused about what this PR even does. "enable in CI" sounds like it would enable tests for autodiff to be checked in CI. But instead it seems what it does is enabling autodiff for the distributed artifacts (only on nightly, I assume)?

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 25, 2026
Revert "Enable autodiff in ci for all major os"

Reverts c033de9 (part of rust-lang#152768) in order to fix  rust-lang#153077.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 25, 2026
Revert "Move aarch64-apple dist builder to dynamic llvm linking"

Reverts c033de9 (part of rust-lang#152768) in order to fix  rust-lang#153077.
rust-bors bot pushed a commit that referenced this pull request Feb 26, 2026
Revert "Move aarch64-apple dist builder to dynamic llvm linking"



Reverts c033de9 (part of #152768) in order to fix  #153077.
rust-bors bot pushed a commit that referenced this pull request Feb 26, 2026
Revert "Move aarch64-apple dist builder to dynamic llvm linking"



Reverts c033de9 (part of #152768) in order to fix  #153077.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 26, 2026
Revert "Move aarch64-apple dist builder to dynamic llvm linking"

Reverts c033de9 (part of rust-lang#152768) in order to fix  rust-lang#153077.
rust-timer added a commit that referenced this pull request Feb 26, 2026
Rollup merge of #153079 - RalfJung:revert-macos-dyn, r=jieyouxu

Revert "Move aarch64-apple dist builder to dynamic llvm linking"

Reverts c033de9 (part of #152768) in order to fix  #153077.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc F-autodiff `#![feature(autodiff)]` 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-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants