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. Download cuPyNumeric
conda create --name myenv
conda activate myenv
CONDA_OVERRIDE_CUDA="12.2" \
conda install -c conda-forge -c legate cupynumeric
2. 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. Newer versions of Julia are untested.
juliaup default 1.10
3. Get latest version of libcxxwrap
These commands simply download an external dependency used to wrap the CuPyNumeric C++ API.
git submodule init
git submodule update
This command must be run form the root of the repository. The progress of this command is piped into ./pkg/deps/build.log
. It may take a few minutes to compile.
julia -e 'using Pkg; Pkg.activate("./pkg"); Pkg.resolve(); Pkg.build()'
This command must be run form the root of the repository.
julia -e 'using Pkg; Pkg.activate("./pkg"); Pkg.resolve(); Pkg.test()'
With everything working, its the perfect time to checkout some of our examples!
- 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)
Optional: You can create a file called .localenv
in order to add anything to the path.
source ENV
will setup the enviroment variables and source optional .localenv
sh scripts/install_cxxwrap.sh
builds the Julia CXX wrapper https://github.com/JuliaInterop/libcxxwrap-julia
sh scripts/legion_redop_patch.inl
patches Legion https://github.com/ejmeitz/cuNumeric.jl/blob/main/scripts/README.md
sh ./build.sh
will create libcupynumericwrapper.so
in $CUNUMERIC_JL_HOME/build
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 env.log
found in cuNumeric.jl/pkg/deps/