The cuNumeric.jl package wraps the CuPyNumeric C++ API from NVIDIA to bring simple distributed computing on GPUs and CPUs to Julia! We provide a simple array abstraction, the NDArray
, which supports most of the operations you would expect from a normal Julia array.
This project is in alpha and we do not commit to anything necessarily working as you would expect. The current build process requires several external dependencies which are not registered on BinaryBuilder.jl yet. The build instructions and minimum pre-requesites are as follows:
- g++ capable of C++20
- CUDA 12.2
- Python 3.10
- Ubuntu 20.04 or RHEL 8
- Julia 1.10
- CMake 3.26.4
1. Install Julia through JuliaUp
curl -fsSL https://install.julialang.org | sh -s -- --default-channel 1.10
This will install version 1.10 by default since that is what we have tested against. To verify 1.10 is the default run either of the following (your may need to source bashrc):
juliaup status
julia --version
If 1.10 is not your default, please set it to be the default. Other versions of Julia are untested.
juliaup default 1.10
cuNumeric.jl is not on the general registry yet. To add cuNumeric.jl to your environment run:
using Pkg; Pkg.add(url = "https://github.com/ejmeitz/cuNumeric.jl", rev = "main")
The rev
option can be main or any tagged version. This will use Conda.jl to install the cupynumeric C++ API. To develop cuNumeric.jl we recommend cloning the repository and manually triggering the build process with Pkg.build
or adding it to one of your existing environments with Pkg.develop
.
Run this command in the Julia environment where cuNumeric.jl is installed.
using Pkg; Pkg.test("cuNumeric")
With everything working, its the perfect time to checkout some of our examples!
See the Custom Builds section of the documentation to build cuNumeric.jl with a local conda environment providing the cupynumeric binaries.
If you cloned the cuNumeric.jl
git-repo isntead of using Pkg.add you will need to manually trigger the build process. The command is below. The progress of the build is piped into ./pkg/deps/build.log
. It may take a few minutes to compile. This command assumes the Project.toml
for cuNumeric.jl
is in the current working directory.
julia -e 'using Pkg; Pkg.activate(".") Pkg.resolve(); Pkg.build()'
- Full slicing support
- Implement
unary_reduction
over arbitrary dims - Out-parameter
binary_op
- Replace
as_type
withBase.convert
- Integer powers (e.g x^3)
- Support Ints on methods that takes floats
- Programatic manipulation of Legate hardware config (not currently possible)
- Float32 random number generation (not possible in current C++ API)
- Normal random numbers (not possible in current C++ API)
- Add Aqua.jl to CI to ensure we didn't pirate any types
- Fix CodeCov reports
- Fix cuNumeric.jl error in CI (requires unreleased CuPyNumeric)
- Move external packages to BinaryBuilder.jl (requires Legate open source)
For technical questions, please either contact
krasow(at)u.northwestern.edu
OR
emeitz(at)andrew.cmu.edu
If the issue is building the package, please include the build.log
and .err
files found in cuNumeric.jl/pkg/deps/