Skip to content
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 rust ADBench version #1797

Open
wants to merge 90 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
9770ceb
adding gmm
ZuseZ4 Mar 19, 2024
9f05ff8
working C too
ZuseZ4 Mar 25, 2024
4da9910
Delete enzyme/benchmarks/ReverseMode/gmmrs/src/main.rs2
ZuseZ4 Mar 26, 2024
0f68ce8
rust setup
wsmoses Mar 28, 2024
7995eb3
add files
wsmoses Mar 28, 2024
069e3cb
improve makefile and fix c ffi
ZuseZ4 Mar 29, 2024
be54358
maybe needed? pthread for cmake
ZuseZ4 Mar 30, 2024
4423222
bench gmm: use path relative to Makefile
jedbrown Mar 30, 2024
7b5a24c
Fix byref issue for rust abi
wsmoses Mar 31, 2024
ea03750
Add primal bench/test
wsmoses Mar 31, 2024
77a130f
fix math
ZuseZ4 Mar 31, 2024
4abf2bf
write into return var
ZuseZ4 Mar 31, 2024
5cde3d7
Cleanup gmm config
wsmoses Mar 31, 2024
af6583d
bench gmm: make cmath::lgamma with libm as an optional feature
jedbrown Mar 31, 2024
48c2e1f
oxidize - more noalias
ZuseZ4 Mar 31, 2024
ba75484
reduce caching
ZuseZ4 Mar 31, 2024
9394028
bench gmm: makefile dep on Cargo.toml, split targets
jedbrown Mar 31, 2024
814eb62
revert cmake pthread since only needed for Rust
ZuseZ4 Mar 31, 2024
41157fa
bench gmm: fix primal (sqnorm length matters)
jedbrown Mar 31, 2024
114f236
bench gmm: quash rust warnings
jedbrown Mar 31, 2024
012cf4c
adding ba benchmark
ZuseZ4 Mar 31, 2024
0430e44
Benchmark ba
wsmoses Apr 1, 2024
4b0062b
fix ba primal
ZuseZ4 Apr 2, 2024
1f27479
adding unsafe gmm version
ZuseZ4 Apr 4, 2024
af3e078
Add FFT and LSTM benchmark for Rust Enzyme
bytesnake Apr 4, 2024
c8bcfe9
adding unsafe Rust fft version (how to run?)
ZuseZ4 Apr 4, 2024
cad4221
imprv safe rus tto work like c++
ZuseZ4 Apr 4, 2024
f0bf16b
unsafe version not crashing
ZuseZ4 Apr 4, 2024
12e9a4a
fix lstm makefile
ZuseZ4 Apr 4, 2024
688721d
adding unsafe rust lstm version
ZuseZ4 Apr 4, 2024
7ca8092
run full fft tests
ZuseZ4 Apr 4, 2024
73f8075
Delete enzyme/benchmarks/ReverseMode/lstm/src/main.rs
ZuseZ4 Apr 5, 2024
ba3aa5d
cleanup and correctness
ZuseZ4 Apr 6, 2024
2737734
initial (compiling) rust ode version
ZuseZ4 May 6, 2024
1ffbaaa
cleanups
ZuseZ4 May 6, 2024
8bd316a
fix ba bench
ZuseZ4 May 22, 2024
c769dac
bench gmm: move allocation of scratch space outside AD'd function
jedbrown May 23, 2024
c5e1f19
bench gmm: switch scratch from Const to Duplicated
jedbrown May 23, 2024
947852c
bench gmm: match C++ performance by asserting sizes of work slices
jedbrown May 23, 2024
cb9d403
bench gmm: shed unused import (warning)
jedbrown May 23, 2024
dbffef6
bench lstm: optimize using length assertions
jedbrown May 23, 2024
0174227
adding unsafe ba version
ZuseZ4 May 24, 2024
629f87c
smaller perf improvements
ZuseZ4 Jun 2, 2024
c6f44b3
small improvment
ZuseZ4 Jun 2, 2024
fb6df5b
clean up ode-real example (not building)
ZuseZ4 Jun 3, 2024
a6d4a7c
add ba.cpp version without restrict
ZuseZ4 Jul 20, 2024
d08142b
add gmm version without restrict
ZuseZ4 Jul 20, 2024
d6b35b3
add lstm version without restrict
ZuseZ4 Jul 20, 2024
55a76b9
Revert "smaller perf improvements"
ZuseZ4 Jul 22, 2024
de87081
adding lstm primal cxx overhead benchmark
ZuseZ4 Jul 22, 2024
5d9b026
Merge branch 'main' into rust-bench
ZuseZ4 Sep 18, 2024
7d70dc5
fix ode-real example, correct results, faster than c++, without dupno…
ZuseZ4 Sep 19, 2024
fdb0d09
remove boost leftovers
ZuseZ4 Sep 19, 2024
747e4f9
fix makefiles to use new rustflags
ZuseZ4 Oct 1, 2024
05d3e87
add tanh support for llvm19+
ZuseZ4 Oct 2, 2024
1fe64c0
fix safe fft performance
ZuseZ4 Oct 2, 2024
7f26f43
fix (mostly) safe lstm perf
ZuseZ4 Oct 2, 2024
7ecd27b
make lstm benchmark fair by running c++ with O3
ZuseZ4 Oct 24, 2024
aaef8b3
make ba bench fair by running c++ with O3
ZuseZ4 Oct 24, 2024
51ef17a
make ode-real/bruss fair by adjusting both
ZuseZ4 Oct 24, 2024
9c9f276
equalize benchmark configs and move over to new use std::autodiff::au…
ZuseZ4 Oct 27, 2024
5ebcd1e
move Rust to DuplicatedOnly
ZuseZ4 Oct 27, 2024
aeed32d
cleanup makefiles
ZuseZ4 Oct 28, 2024
1542a38
update fft-tapenade to be correct but segfault
ZuseZ4 Oct 28, 2024
047f121
add mayalias/unsafe ode-real/BRUSS benchmark versions
ZuseZ4 Oct 30, 2024
3d25858
fix safe fft performance
ZuseZ4 Oct 30, 2024
2d04892
cleanup fft
ZuseZ4 Oct 30, 2024
a273bdf
bench fft: more idiomatic safe Rust
jedbrown Oct 31, 2024
65e1eaf
bench fft: use size_t in C++ for parity with Rust usize
jedbrown Oct 31, 2024
609bf4d
bench fft: move from i+=2 to ii++ in loop increments
jedbrown Oct 31, 2024
b722c87
move rust fft to use i32 for isign
ZuseZ4 Oct 31, 2024
a7943f0
safe rust fft without bounds checking
ZuseZ4 Nov 1, 2024
59f866b
Add -fno-math-errno to each makefile for fairness
ZuseZ4 Nov 1, 2024
119c2ac
Merge branch 'main' into rust-bench
jedbrown Nov 1, 2024
6460848
bench fft: __builtin_sin not necessary with -fno-math-errno
jedbrown Nov 1, 2024
3b174ea
move c++ lstm to also use size_t, since Rust uses usize
ZuseZ4 Nov 6, 2024
8945897
adjust gmm, but breaks tapenade
ZuseZ4 Nov 7, 2024
a73a1ad
Revert "move c++ lstm to also use size_t, since Rust uses usize"
ZuseZ4 Nov 9, 2024
dca82bb
fix single gmm size for benchmarking
ZuseZ4 Nov 9, 2024
f7c75a2
safe lstm without alias info
ZuseZ4 Nov 9, 2024
06b135f
use new flag to keep const ptr/ref while still not emitting noalias
ZuseZ4 Nov 9, 2024
74a3784
make safe fft safe again
ZuseZ4 Nov 9, 2024
ba7cf82
bench fft: cleaner to use step_by(2)
jedbrown Nov 9, 2024
d5bd596
bench gmm: fix Tapenade
jedbrown Nov 13, 2024
4d78820
bench gmm: fix C++ primal (negative size_t)
jedbrown Nov 13, 2024
13ef016
bench fft: avoid bounds checks in safe Rust
jedbrown Nov 1, 2024
9f67bd1
update fft to make benchmarking more reliable, make safe rust version…
ZuseZ4 Nov 15, 2024
88feab6
improve lstm output, makefiles
ZuseZ4 Nov 15, 2024
31fd712
bench fft: closer C++ code to Rust and use -fno-plt
jedbrown Nov 15, 2024
abf2a26
more numactl
ZuseZ4 Nov 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ enzyme/benchmarks/ReverseMode/*/*.ll
enzyme/benchmarks/ReverseMode/*/*.bc
enzyme/benchmarks/ReverseMode/*/*.o
enzyme/benchmarks/ReverseMode/*/*.exe
enzyme/benchmarks/ReverseMode/*/target/
enzyme/benchmarks/ReverseMode/*/results.txt
enzyme/benchmarks/ReverseMode/*/results.json
.cache

6 changes: 0 additions & 6 deletions enzyme/Enzyme/InstructionDerivatives.td
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,6 @@ def : CallPattern<(Op $x, $y),
[ReadNone, NoUnwind]
>;

def : CallPattern<(Op $x),
["tanh"],
[(FDiv (DiffeRet), (FMul(Call<(SameTypesFunc<"cosh">), [ReadNone,NoUnwind]> $x):$c, $c))],
(ForwardFromSummedReverse),
[ReadNone, NoUnwind]
>;
def : CallPattern<(Op $x),
["tanhf"],
[(FDiv (DiffeRet), (FMul(Call<(SameTypesFunc<"coshf">), [ReadNone,NoUnwind]> $x):$c, $c))],
Expand Down
Loading
Loading