-
Notifications
You must be signed in to change notification settings - Fork 10
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
Test out Reactant + Enzyme for the benchmarks? #5
Comments
It does just work. See https://github.com/vpuri3/KolmogorovArnold.jl/blob/38616fc66b3c5c1550afa7c718a0629608def19b/examples/eg3.jl |
Nice thanks for trying it out. I will look into the generated HLO to check why it isn't faster than Zygote |
Just to confirm did you synchronize for GPU? You can call After we tag master, we will support compiling a synchronized function as |
This might be related issue: cuDNN errors on first attempt if it's being called after Reactant, but loads thereafter. julia> using Reactant
julia> using CUDA
julia> using LuxCUDA
ERROR: InitError: could not load library "/home/vedantpu/.julia/artifacts/8e7456794f147517aa9ba5a1147e4ecedffbbfa1/lib/libcudnn_cnn.so"
/home/vedantpu/.julia/artifacts/8e7456794f147517aa9ba5a1147e4ecedffbbfa1/lib/libcudnn_cnn.so: undefined symbol: _ZTVN5cudnn7backend23PagedCacheLoadOperationE, version libcudnn_graph.so.9
Stacktrace:
[1] dlopen(s::String, flags::UInt32; throw_error::Bool)
@ Base.Libc.Libdl ./libdl.jl:120
[2] dlopen(s::String, flags::UInt32)
@ Base.Libc.Libdl ./libdl.jl:119
[3] macro expansion
@ ~/.julia/packages/JLLWrappers/jXOYx/src/products/library_generators.jl:63 [inlined]
[4] __init__()
@ CUDNN_jll ~/.julia/packages/CUDNN_jll/8XeAL/src/wrappers/x86_64-linux-gnu-cuda+12.0.jl:28
...
julia> using LuxCUDA
julia> cuDNN
cuDNN |
Did not sync here. Lemme include that. |
flip the ordering of imports for now 😓 (using LuxCUDA before using Reactant). Ideally users never load both Reactant and CUDA in the same session. For context the error is from Reactant shipping its own CuDNN version that is mismatched from the version cuDNN ships |
Thanks. Here's the timings on GPU with syncs added. KolmogorovArnold.jl/examples/eg3.jl Lines 122 to 145 in 0fc3498
|
Nice! The numbers do look promising. (cc @wsmoses the speedup is quite nice) |
Ooh yeah this is fantastic! @vpuri3 would you be interested in adding this to our reactant benchmark suite? (and potentially to docs listing cool use cases of :) ) |
I'd be happy to. Can you link me to it? |
I think they're in here https://github.com/EnzymeAD/Reactant.jl/tree/main/benchmark but @avik-pal would know best how to set it up |
add a function like https://github.com/EnzymeAD/Reactant.jl/blob/9e8eec051c61c4c122c694ac2fb68b1598968cc0/benchmark/setup.jl#L43-L51 for KANs. The penultimate arg to setup_lux_forward_pass_benchmark is the size of the inputs. For now add the forward pass, I forgot to set it up for the reverse pass. |
great. lemme register this package and get to it |
Might be worth trying out https://lux.csail.mit.edu/stable/manual/compiling_lux_models here. Looking at the code it should "just work" and the code should be much faster
The text was updated successfully, but these errors were encountered: