Skip to content

Add std::autodiff and Rust to the Enzyme CI #145899

@ZuseZ4

Description

@ZuseZ4

std::autodiff is currently not build in CI, which causes unfortunate regressions every once in a while.
Enabling autodiff on nightly would either require approval on the infra side, since the rustc binary would become [larger](#t-infra > MCP - Enable autodiff in CI) on every (supported) platform, or someone would need to implement #143295.

std::autodiff (as well as the upcoming std::batching) is based on https://github.com/enzymead/enzyme, an LLVM incubator project. So a simpler alternative to building Enzyme in the Rust CI would be to build Rust in the Enzyme CI. They have 32 core runners available, so build times should be acceptable. Enzyme currently has integration tests for C++, Julia, and MLIR, so there are plenty of examples to copy. We have build instructions for rustc with std::autodiff enabled in the rustc-dev-guide. As another related example, here is a discussion from the time where we added Rust to the Enzyme compiler explorer: EnzymeAD/enzyme-explorer#15

The goal for now is to just check in the Enzyme CI that the four x.py test autodiff test commands from the dev-guide pass.

I think the task should be sufficiently easy for anyone who previously worked with Docker or the github CI. In the long run we probably want both CIs to build both Enzyme and rustc, but it would be a good improvement for now.

If anyone wants to claim and has question, feel free to either ask them here (and cc @ wsmoses) or create an issue over at https://github.com/EnzymeAD/Enzyme, either works.

Metadata

Metadata

Assignees

Labels

A-CIArea: Our Github Actions CIC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.F-autodiff`#![feature(autodiff)]`

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions