Skip to content

ci: Enable autodiff tests on x86_64 linux#157776

Draft
sgasho wants to merge 17 commits into
rust-lang:mainfrom
sgasho:linux_autodiff_tests_ci
Draft

ci: Enable autodiff tests on x86_64 linux#157776
sgasho wants to merge 17 commits into
rust-lang:mainfrom
sgasho:linux_autodiff_tests_ci

Conversation

@sgasho

@sgasho sgasho commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

View all comments

Enable autodiff tests on x86_64 linux

hmm.....pr job x stage 1 takes 100 - 110min, which is the slowest in the pr jobs.
If we are not happy to wait more than 100min for the pr jobs, maybe we should move this to auto jobs and test them on stage 2

r? @ZuseZ4

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jun 11, 2026
@rust-log-analyzer

This comment has been minimized.

@sgasho

This comment was marked as outdated.

@sgasho
sgasho force-pushed the linux_autodiff_tests_ci branch from a5999ca to 7da709a Compare June 12, 2026 12:41
@sgasho

This comment was marked as outdated.

@rust-log-analyzer

This comment has been minimized.

@sgasho

sgasho commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

I executed git pull --rebase origin main to see if build steps in autodiff job finish successfully after enzyme submodule update

No problem found

@sgasho
sgasho force-pushed the linux_autodiff_tests_ci branch from 851ebe4 to 33566ea Compare June 30, 2026 14:07
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@sgasho
sgasho force-pushed the linux_autodiff_tests_ci branch 2 times, most recently from 27ed09b to 57ed38d Compare July 6, 2026 00:42
@rust-log-analyzer

This comment has been minimized.

@sgasho
sgasho force-pushed the linux_autodiff_tests_ci branch from 57ed38d to 69603c6 Compare July 6, 2026 12:46
@sgasho
sgasho marked this pull request as ready for review July 6, 2026 15:07
@rustbot

rustbot commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Warning

If you are changing how CI LLVM is built or linked, make sure to bump
src/bootstrap/download-ci-llvm-stamp.

cc @jieyouxu

@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 6, 2026
@ZuseZ4

ZuseZ4 commented Jul 6, 2026

Copy link
Copy Markdown
Member

@bors try jobs=x86_64-gnu-autodiff

Rerunning to test potential cache effects.
Once this is done, we should ping Jakub and jieyouxu to discuss where to put it (and probably create an infra thread to discuss). I also don't think they'll accept autodiff as a culprit of measurably longer PR CI, so we'll probably need to move it, if the cache isn't helping enough.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
ci: Enable autodiff tests on x86_64 linux


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

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: d1a9718 (d1a971826b83fead3b7550c5e4440c9102bb3290)
Base parent: 3c00c96 (3c00c96d3af4d5b5e101e56cc161a608b21366ee)

@ZuseZ4

ZuseZ4 commented Jul 6, 2026

Copy link
Copy Markdown
Member

Rebuilding a second time, since I'm not sure if artifacts are shared between PR Ci and try runs.
@bors try jobs=x86_64-gnu-autodiff

But so far, even just building LLVM+rustc+std+enzyme takes 95 minutes, 10 minutes more than miri, the next slowest job. Total time will always be a bit more than that, and autodiff will always have less users than something general like Miri, so that's hard to defend.

If the try results come back unchanged, can you move it to auto and mark it as allowed to fail? I don't think it needs to be blocking yet.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
ci: Enable autodiff tests on x86_64 linux


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

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 96310de (96310dea88820c3264b54ee2b5011698005372aa)
Base parent: 36714a9 (36714a9983d6ba11203d8bb87a1b372247fbcf06)

nikic added 9 commits July 16, 2026 10:06
There is now only a single "module asm", not one before each line.
The assume here is not really relevant to the purpose of the test,
and it's position changed in LLVM 23.
These now have additional !guid metadata.
We probably want to change this to align with Linux, but for now
keep the old behavior.
It's a dependency of LLVM now.
@ZuseZ4

ZuseZ4 commented Jul 17, 2026

Copy link
Copy Markdown
Member

submodule updates are meant to be trivial so those not breaking us doesn't mean much. There's an open update to llvm23, can you test if that breaks something?

But I generally wouldn't want to block this on an MCP and (for now) I'd rather like us to chase optional CI failures since that's up to us, rather than pushing bugfixes onto other people, at least for now.

nikic and others added 4 commits July 17, 2026 15:08
* Enable autodiff tests on x86_64 linux
* move autodiff job def
* remove redundant ./x build
We can start matching the codegen introduced by LLVM at [1]. This alone
isn't enough to make f128 functional on the platform because libcalls
use the LLVM ABI.

Current behavior originally introduced in RUST-128388.

[1]: llvm/llvm-project@aa47e59
@sgasho
sgasho force-pushed the linux_autodiff_tests_ci branch from 928c0cf to 74c230e Compare July 17, 2026 13:10
@rustbot

rustbot commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rustbot

rustbot commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/enzyme

cc @ZuseZ4

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

Some changes occurred in coverage tests.

cc @Zalathar

rustc_codegen_cranelift is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_cranelift instead.

cc @bjorn3

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs F-autodiff `#![feature(autodiff)]` T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 17, 2026
@rustbot

rustbot commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • Some commits in this PR modify submodules.

    If this was not intentional, see I changed a submodule on accident in the rustc dev guide.

  • The following commits have merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

    You can start a rebase with the following commands:

    $ # rebase
    $ git pull --rebase https://github.com/rust-lang/rust.git main
    $ git push --force-with-lease
    

@rustbot rustbot added the has-merge-commits PR has merge commits, merge with caution. label Jul 17, 2026
@sgasho

sgasho commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

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

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 17, 2026
ci: Enable autodiff tests on x86_64 linux


try-job: optional-x86_64-gnu-autodiff
@sgasho
sgasho marked this pull request as draft July 17, 2026 13:19
@rust-bors

rust-bors Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 1d0455a (1d0455a9c97b86ae095c59bec7ef269ff1a58886)
Base parent: 4a9d536 (4a9d5368df6450bbd2fc8dde4508c3e5d83bb19d)

@rust-bors

rust-bors Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #159444) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

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-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc F-autodiff `#![feature(autodiff)]` has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

9 participants