-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding autodiff tests #136419
adding autodiff tests #136419
Conversation
This comment has been minimized.
This comment has been minimized.
@jieyouxu You can remove the blocked message, I don't need a path anymore. @rustbot blocked(EnzymeAD/Enzyme#2238) |
This comment has been minimized.
This comment has been minimized.
The message doesn't matter at all, it's just |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This works locally, so I'll probably make registerEnzyme a weak symbol and gate the pass loading on enzyme being enabled, then this should be ready to merge. I will leave fighting CI and getting this to work on nightly for the other open PR in which I already started testing to enable this by default. |
This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. |
Nope, not changing how LLVM is build, just Enzyme. So no change should be needed, I'd think. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Ok that should be it. Summary of the changes.
To make 4) a bit clearer I introduced an enum Those seem to be enough things for one PR, so I don't consider how this impacts compile times (and runtime perf) if Enzyme is enabled (there are no impacts if it's disabled). There is a second PR where I make sure that we can ship this on nightly without regressions. @onur-ozkan Any other requests? |
Some changes occurred in compiler/rustc_codegen_ssa/src/codegen_attrs.rs |
r? @onur-ozkan (lmk if you want someone else to review it). |
Could not assign reviewer from: |
Interesting, Onur is assigned, but not a reviewer, so I couldn't request a review. Requested one from jieyouxu, just s.t. the PR status is correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@bors r+ |
(I didn't directly expect an r+ and didn't want to force-push while people were potentially reviewing, so I just cleaned it up now.) |
8578aae
to
061abbc
Compare
I can never remember what the force-push behavior was, so... |
As you r? me I thought you didn't want to re-work on commit history (most people avoid that). It would be better to have cleaner commit history for sure. |
This comment was marked as off-topic.
This comment was marked as off-topic.
…kan,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: - rust-lang#124509 Zulip discussion: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Enzyme.20build.20changes
…kingjubilee Rollup of 9 pull requests Successful merges: - rust-lang#134626 (Add Four Codegen Tests) - rust-lang#135408 (x86: make SSE2 required for i686 hardfloat targets and use it to pass SIMD types) - rust-lang#136155 (Enable sanitizers on MSVC CI jobs) - rust-lang#136419 (adding autodiff tests) - rust-lang#136603 (compiler: gate `extern "{abi}"` in ast_lowering) - rust-lang#136628 (ci: upgrade to crosstool-ng 1.27.0) - rust-lang#136714 (Update `compiler-builtins` to 0.1.146) - rust-lang#136731 (rustc_middle: parallel: TyCtxt: remove "unsafe impl DynSend/DynSync") - rust-lang#136761 (tests: `-Copt-level=3` instead of `-O` in codegen tests) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#136419 (adding autodiff tests) - rust-lang#136628 (ci: upgrade to crosstool-ng 1.27.0) - rust-lang#136681 (resolve `llvm-config` path properly on cross builds) - rust-lang#136714 (Update `compiler-builtins` to 0.1.146) - rust-lang#136731 (rustc_middle: parallel: TyCtxt: remove "unsafe impl DynSend/DynSync") - rust-lang#136791 (Disable DWARF in linker options for i686-unknown-uefi) Failed merges: - rust-lang#136767 (improve host/cross target checking) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#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: - rust-lang#124509 Zulip discussion: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Enzyme.20build.20changes
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
is2.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:
Zulip discussion: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Enzyme.20build.20changes