Skip to content

Build autodiff with download-ci-llvm=true #139779

Open
@ZuseZ4

Description

@ZuseZ4

Summary

Downloading and building LLVM on a somewhat recent 8c Laptop takes around 30 minutes and is a major annoyance for new contributors who like to help std::autodiff or related LLVM based modules.
It's also annoying that we have to rebuild it every two weeks when we get a new LLVM version (btw. thanks to nikita and all for the quick updates).

There isn't really a higher reason why std::autodiff forces rebuilding, except of cmake shenanigans of which I am not an expert. Most of the work here is likely not coding, but talking to bootstrap and/or LLVM people to figure out how we can build Enzyme against a pre-build and downloaded LLVM.

Previous discussions are here on github and here on zulip.
This gh comment seems to be especially relevant. To get started, just summarizing and verifying that these are still up to date would be good.

One thing that changed since we opened the issues last time, is that these days we only need (and build) libEnzyme-<Version>.so, we don't need to support LLVMEnzyme-X.so, ClangEnzyme-X.so and LLDEnzyme-X.so, since I added an Enzyme flag to skip building them. We therefore don't need LLVM to be build with it's plugin interface enabled anymore. That should make it easier to use the download-llvm.
EnzymeAD/Enzyme#2249

Current build instruction for autodiff can be found here: https://enzyme.mit.edu/rust/installation.html

Command used

./configure  --enable-llvm-enzyme --release-channel=nightly

Expected behaviour

It should work!

Actual behaviour

It does not work :(

Bootstrap configuration (bootstrap.toml)

flexible.

Operating system

any (except MSVC which has another Enzyme bug)

HEAD

Additional context

Build Log

<log>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustC-bugCategory: This is a bug.F-autodiff`#![feature(autodiff)]`T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions