Fix autodiff builds on Apple CI #140137
Labels
A-CI
Area: Our Github Actions CI
C-bug
Category: This is a bug.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
F-autodiff
`#![feature(autodiff)]`
O-apple
Operating system: Apple (macOS, iOS, tvOS, visionOS, watchOS)
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Summary
We intend to enable autodiff next weekend.
Currently the dist-x86_64-linux and dist-aarch-linux runner succeeded, so we can ship autodiff in nightly for linux.
It would be nice, if
std::autodiff
would simultaneously become available for macos users.For that, we'd want to fix the three apple dist builders, which all fail with the same error, of not finding the llvm dir, after building enzyme and llvm. This fails pretty late in the compilation pipeline, so I assume it's an easy fix, by just updating or adding the correct path to llvm.
The autodiff backend (which builds Enzyme) was originally introduced here: https://github.com/rust-lang/rust/pull/129176/files
The current implementations life at
rust/src/bootstrap/src/core/build_steps/compile.rs
Line 1190 in d6c1e45
rust/src/bootstrap/src/core/build_steps/llvm.rs
Line 984 in d6c1e45
Especially this commit fixed local MacOS builds, but as we can see that's not enough for CI yet.
You can test if your changes are successful through try builds (you'll need to ask a rustc member to run one for you).
To avoid having to guess the name of the right LLVM dir, you can probably download the logs of either of the 3 failed apple dist builds. I am not an expert here though, so I'd suggest to ping onur-ozkan who helped with previous autodiff bootstrap issues, or maybe jieyouxu (just add an @ before their name). Since it would be nice to have this as part of the first release and the fix should be quite small, I think it's fine if more than one person looks into it, so I think there's no need to claim it.
Command used
See https://github.com/rust-lang/rust/pull/140064/files
Expected behaviour
Build succeeds, similar to dist-x86_64-linux
#140064 (comment)
Actual behaviour
You can see the failing issue
failed try with plugins & llvm-enzyme enabled: dist-x86_64-apple (#140064 (comment))
failed try with plugins & llvm-enzyme enabled: dist-apple-various (#140064 (comment))
failed try with plugins & llvm-enzyme enabled: dist-aarch64-apple (#140064 (comment))
Bootstrap configuration (bootstrap.toml)
Varies a bit based on the runner, see #140064
Operating system
MacOS, different ones.
HEAD
HEAD
Additional context
Build Log
The text was updated successfully, but these errors were encountered: