Skip to content

Commit fab7873

Browse files
committed
Auto merge of rust-lang#140064 - EnzymeAD:enable-autodiff-in-ci, r=<try>
[DO NOT MERGE] start building Enzyme in CI My goal is to put this in CI on April 26, to have a week to land some of the outstanding PRs (removed # in front of it to avoid spamming them every time I do a try build in this PR): 139700 [Landed] 139308 [Landed] 140104 [Landed] 140030 [Landed] 140049 [Almost ready] 140244 [Almost ready] The autodiff flags PR should land first, but otherwise they don't overlap and are mostly ready, so it shouldn't be too hard to land them. In the meantime, I'll experiment here with some builders. A fix for 140137 (Apple CI) would be nice, but I'm also happy to start with the working linux (x86-64 + aarch) as the most common target, and expand from there. r? `@oli-obk` Tracking: - 124509 **Linux** succeeded try with plugins and without plugins & with llvm-enzyme enabled: dist-x86_64-linux succeeded try with plugins and without plugins & with llvm-enzyme enabled: dist-aarch64-linux **MacOS** failed try with plugins & llvm-enzyme enabled: dist-x86_64-apple (rust-lang#140064 (comment)) failed try with plugins & llvm-enzyme enabled: dist-apple-various (rust-lang#140064 (comment)) failed try with plugins & llvm-enzyme enabled: dist-aarch64-apple (rust-lang#140064 (comment)) **Windows** failed try with plugins & llvm-enzyme enabled: dist-x86_64-mingw (rust-lang#140064 (comment)) try-job: dist-aarch64-apple
2 parents 0c33fe2 + c065af9 commit fab7873

File tree

11 files changed

+9
-114
lines changed

11 files changed

+9
-114
lines changed

src/bootstrap/src/core/build_steps/llvm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ impl Step for Enzyme {
970970
.env("LLVM_CONFIG_REAL", &llvm_config)
971971
.define("LLVM_ENABLE_ASSERTIONS", "ON")
972972
.define("ENZYME_EXTERNAL_SHARED_LIB", "ON")
973-
.define("LLVM_DIR", builder.llvm_out(target));
973+
.define("LLVM_DIR", builder.llvm_out(target).join("build"));
974974

975975
cfg.build();
976976

src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ ENV RUST_CONFIGURE_ARGS \
8989
--set llvm.thin-lto=true \
9090
--set llvm.libzstd=true \
9191
--set llvm.ninja=false \
92+
--set llvm.enzyme=true \
9293
--set rust.debug-assertions=false \
9394
--set rust.jemalloc \
9495
--set rust.use-lld=true \

src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ ENV RUST_CONFIGURE_ARGS \
9090
--set target.x86_64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \
9191
--set llvm.thin-lto=true \
9292
--set llvm.ninja=false \
93+
--set llvm.enzyme=true \
9394
--set llvm.libzstd=true \
9495
--set rust.jemalloc \
9596
--set rust.use-lld=true \

src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ ENV RUST_CONFIGURE_ARGS \
3030
--enable-profiler \
3131
--enable-compiler-docs \
3232
--set llvm.libzstd=true
33+
--set llvm.enzyme=true \
3334
ENV SCRIPT python3 ../x.py --stage 2 test

src/ci/github-actions/jobs.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ auto:
382382
- name: dist-x86_64-apple
383383
env:
384384
SCRIPT: ./x.py dist bootstrap --include-default-paths --host=x86_64-apple-darwin --target=x86_64-apple-darwin
385-
RUST_CONFIGURE_ARGS: --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set rust.lto=thin --set rust.codegen-units=1
385+
RUST_CONFIGURE_ARGS: --enable-full-tools --enable-sanitizers --enable-profiler --set llvm.enzyme=true --set rust.jemalloc --set rust.lto=thin --set rust.codegen-units=1
386386
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
387387
# Ensure that host tooling is built to support our minimum support macOS version.
388388
MACOSX_DEPLOYMENT_TARGET: 10.12
@@ -400,7 +400,7 @@ auto:
400400
SCRIPT: ./x.py dist bootstrap --include-default-paths --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim,aarch64-apple-ios-macabi,x86_64-apple-ios-macabi
401401
# Mac Catalyst cannot currently compile the sanitizer:
402402
# https://github.com/rust-lang/rust/issues/129069
403-
RUST_CONFIGURE_ARGS: --enable-sanitizers --enable-profiler --set rust.jemalloc --set target.aarch64-apple-ios-macabi.sanitizers=false --set target.x86_64-apple-ios-macabi.sanitizers=false
403+
RUST_CONFIGURE_ARGS: --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.enzyme=true --set target.aarch64-apple-ios-macabi.sanitizers=false --set target.x86_64-apple-ios-macabi.sanitizers=false
404404
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
405405
# Ensure that host tooling is built to support our minimum support macOS version.
406406
# FIXME(madsmtm): This might be redundant, as we're not building host tooling here (?)
@@ -432,6 +432,7 @@ auto:
432432
--enable-profiler
433433
--set rust.jemalloc
434434
--set llvm.ninja=false
435+
--set llvm.enzyme=true
435436
--set rust.lto=thin
436437
--set rust.codegen-units=1
437438
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
@@ -614,6 +615,7 @@ auto:
614615
SCRIPT: python x.py dist bootstrap --include-default-paths
615616
RUST_CONFIGURE_ARGS: >-
616617
--build=x86_64-pc-windows-gnu
618+
--set llvm.enzyme=true
617619
--enable-full-tools
618620
DIST_REQUIRE_ALL_TOOLS: 1
619621
CODEGEN_BACKENDS: llvm,cranelift

src/tools/enzyme

Submodule enzyme updated 85 files

tests/ui/autodiff/visibility.rs

-17
This file was deleted.

tests/ui/autodiff/visibility.std_autodiff.stderr

-24
This file was deleted.

tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr

-23
This file was deleted.

tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr

-29
This file was deleted.

tests/ui/feature-gates/feature-gate-autodiff-use.rs

-17
This file was deleted.

0 commit comments

Comments
 (0)