Repository navigation
Conversation
scripts/provision/build_llvm.sh fetches LLVM 22.1.8 and Enzyme v0.0.302 at pinned commits into toolchain/, with a shallow clone of only the directories it builds. It builds what Vx runs and nothing else, and installs into toolchain/install: - LLVM and MLIR, which vxc links against, with mlir-translate, opt, llc and the MLIR runner libraries; - clang, which vxc runs to link programs; - FileCheck, for the tests; - Enzyme, built against this LLVM, since an LLVM plugin loads only into the LLVM it was built for. setup.sh uses toolchain/install before any other LLVM, and then points mlir-sys, tblgen and ENZYME_LIB at it. The system LLVM is still used when there is no toolchain/. The build took 28 minutes on 14 cores and uses about 12 GB. Against it, vxc builds from scratch and the whole test suite passes, the autodiff tests included. CI still uses the system LLVM: building this on every run is too slow, so it needs a cached build first. Issue: #1269
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first step of #1269: Vx can use an LLVM built in the checkout instead of the system's.
scripts/provision/build_llvm.shfetches LLVM 22.1.8 and Enzyme v0.0.302 at pinned commits intotoolchain/, with a shallow clone of onlyllvm,mlir,clang,cmakeandthird-party. It builds only what Vx runs and installs it intotoolchain/install:vxclinks against,mlir-translate,opt,llc, the MLIR runner libraries);vxcruns to link programs;FileCheck;setup.shusestoolchain/installbefore any other LLVM, and pointsmlir-sys,tblgenandENZYME_LIBat it. Withouttoolchain/, nothing changes.docs/INSTALL.mdhas a short section on it.Checked: the build took 28 minutes on 14 cores and uses about 12 GB. Against it,
vxcbuilds from scratch and the whole test suite passes (894 tests), the autodiff tests included.Not in this PR: CI still uses the system LLVM. Building this on every run is too slow, so CI needs a cached build first.
Issue: #1269
Generated With Claude Code