rust/compiler/rustc_llvm
Matthias Krüger 78f5bddd57
Rollup merge of #136419 - EnzymeAD:autodiff-tests, r=onur-ozkan,jieyouxu
adding autodiff tests

I'd like to get started with upstreaming some tests, even though I'm still waiting for an answer on how to best integrate the enzyme pass. Can we therefore temporarily support the -Z llvm-plugins here without too much effort? And in that case, how would that work? I saw you can do remapping, e.g. `rust-src-base`, but I don't think that will give me the path to libEnzyme.so. Do you have another suggestion?

Other than that this test simply checks that the derivative of `x*x` is `2.0 * x`, which in this case is computed as
`%0 = fadd fast double %x.0.val, %x.0.val`
(I'll add a few more tests and move it to an autodiff folder if we can use the -Z flag)

r? ``@jieyouxu``

Locally at least `-Zllvm-plugins=${PWD}/build/x86_64-unknown-linux-gnu/enzyme/build/Enzyme/libEnzyme-19.so` seems to work if I copy the command I get from x.py test and run it manually. However, running x.py test itself fails.

Tracking:

- https://github.com/rust-lang/rust/issues/124509

Zulip discussion: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Enzyme.20build.20changes
2025-02-10 16:38:23 +01:00
..
llvm-wrapper Rollup merge of #136419 - EnzymeAD:autodiff-tests, r=onur-ozkan,jieyouxu 2025-02-10 16:38:23 +01:00
src Make RustString an extern type to avoid improper_ctypes warnings 2024-11-09 11:07:44 +11:00
build.rs move second opt run to lto phase and cleanup code 2025-02-10 01:35:22 -05:00
Cargo.toml Bump cc to v1.2.13 for the compiler workspace 2025-02-10 00:06:31 -08:00