cuNumeric brings array programming to multiple GPUs. Built on kernels from NVIDIA’s cuPyNumeric and accelerated by Julia macro-metaprogramming, cuNumeric provides performance competitive with bespoke multi-GPU libraries.
cuNumeric enables users to write high-level code that leverages an entire GPU node without having to worry about MPI, CUDA or NCCL. Furthermore, cuNumeric composes well with external libraries such as OrdinaryDiffEq.jl, TensorOperations.jl and Krylov.jl. In general, any program which is designed around generic array operations should work. See our docs page for examples.
There are two key differences from Base Julia:
To maximize performance we provide the @accelerate macro which fuses operations and elides unneeded temporary arrays. (docs)
Not all array code maps onto distributed hardware well. For example, we bring the @allowscalar macro from CUDA.jl to selectively enable scalar indexing of arrays. We also add @allowpromotion to allow silent promotion to a wider type and @allowfetch so that scalars automatically become a Julia Number instead of staying on device. These macros can modify the behavior of external functions (i.e., in another library). (docs)
The composability benchmark shows the performance of conjugate gradient in Krylov.jl and the 2D heat diffusion equation using OrdinaryDiffEq.jl solvers. On one GPU (left panel) we match CUDA.jl for large problem sizes while surpassing Dagger.jl. As we add more GPUs, cuNumeric achieves great weak scaling.
This kernel benchmarks show the performance of cuNumeric on applications with varying communication patterns. In all cases except multi-grid (MG), cuNumeric scales well and achieves performance competitive with JACC while retaining an array programming style.
Future Plans
Composability with the wider Julia ecosystem is our primary focus. If any of your applications do not work please let us know by opening an issue! You can also send an email to david@krasow.dev.
cupynumeric says the following, so not sure about cuNumeric.jl
cuPyNumeric has reached end of life and is no longer maintained or supported. The final release is v26.06.01. No further releases, fixes, or support are planned. Existing packages and documentation remain available for historical reference, but we do not recommend starting new projects with cuPyNumeric.
@rveltz Yes, cuPyNumeric is EOL. The statement on the Github is accurate.
A majority of our code does not directly depend on cuPyNumeric as we have completely separate implementations and code-paths for kernels (the main reason we deviate substantially in performance).
However, there are still some code paths we still depend on (linear algebra, FFT, and runtime stuff). Our current approach is pushing necessary bug fixes directly in our fork. In the past month, we have fixed an FFT mapper issue and a problem with cuRand random number generation. We greatly appreciate issue requests if any issues are found and more than willing to fix these upstream bugs.
Ethan and I started this project back in December 2024. It took us a long time to get here due to many challenges, but we are both happy its finally here ready to share with the public.
We also have a plan to replace the runtime with a Julia implementation which we have just begun working on. Through the JLLs we distribute we can provide bug fixes (and already have) to cuPyNumeric. We are focused on replacing the runtime because it has large overheads.
Like David said, all broadcast operations actually execute kernels generated by CUDA.jl not cuPyNumeric. This is a key area of improvement over cuPyNumeric as it allows us to fuse operations.
I guess supporting AMD GPUs or other non-CUDA out of the question, because of the dependency? HIP has some CUDA compatibility for AMD I believe. I’m just curious (and asking for a friend, I think there might be ways to support CUDA with an adapter on AMD?), and don’t need it myself. Looking into this the Nvidia dependency was aiming for full NumPy compatibility, and maybe it was achieved! But you are targeting more limited I think. BFloat16 coming later?
For now AMD is probably not possible the runtime is designed for NVIDIA hardware, but the new runtime that we are writing aims to be hardware agnostic.
Our target API is of similar scope, Julia just doesn’t have all of the same functions as NumPy. There’s a couple things were missing like lu but the API should be pretty complete. Float16 is possible and something we’re still looking at, the issue was more in CxxWrap than anything. Are you interested in ML stuff I suppose?
Thanks for pointing out the docs links they used to be up but recently went down I guess. (EDIT: links are fixed)