- Notifications
You must be signed in to change notification settings - Fork243
JuliaGPU/CUDA.jl
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
CUDA programming in Julia
The CUDA.jl package is the main programming interface for working with NVIDIA CUDA GPUsusing Julia. It features a user-friendly array abstraction, a compiler for writing CUDAkernels in Julia, and wrappers for various CUDA libraries.
Before all, make sure you have a recent NVIDIA driver. On Windows, also make sure you havetheVisual C++ redistributable installed.You do not need to install the CUDA Toolkit.
CUDA.jl can be installed with the Julia package manager. From the Julia REPL, type]
toenter the Pkg REPL mode and run:
pkg> add CUDA
Or, equivalently, via thePkg
API:
julia>import Pkg; Pkg.add("CUDA")
For an overview of the CUDA toolchain in use, you can run the following command afterimporting the package:
julia>using CUDAjulia> CUDA.versioninfo()
This may take a while, as it will precompile the package and download a suitable version ofthe CUDA toolkit. If your GPU is not fully supported, the above command (or any othercommand that initializes the toolkit) will issue a warning.
For quick testing, you can also usethejuliagpu/cuda.jl
containerimage from the GitHubContainer Registry, which provides Julia, a precompiled version of CUDA.jl, and a matchingCUDA toolkit:
docker run -it --rm --gpus=all ghcr.io/juliagpu/cuda.jl:latest# other tags available too
For more usage instructions and other information, please refer tothedocumentation.
The latest development version of CUDA.jl requiresJulia 1.10 or higher. If you areusing an older version of Julia, you need to use a previous version of CUDA.jl. This willhappen automatically when you install the package using Julia's package manager.
Note that CUDA.jl may not work with a custom build of Julia; it is recommended that youinstall Julia using theofficial binaries orjuliaup.
The latest version of CUDA.jl also has certain requirements that cannot be enforced by thepackage manager:
- Host platform: only 64-bit Linux and Windows are supported;
- Device hardware: only NVIDIA GPUs withcompute capability 3.5 (Kepler) or higher aresupported;
- NVIDIA driver: a driver forCUDA 11.0 or newer is required;
- CUDA toolkit (in case you need to use your own): onlyCUDA toolkit 11.4 or newer aresupported.
If you cannot meet these requirements, you may need to install an older version of CUDA.jl:
- CUDA.jl v5.3 is the last version with support for PowerPC (removed in v5.4)
- CUDA.jl v4.4 is the last version with support for CUDA 11.0-11.3 (deprecated in v5.0)
- CUDA.jl v4.0 is the last version to work with CUDA 10.2 (removed in v4.1)
- CUDA.jl v3.8 is the last version to work with CUDA 10.1 (removed in v3.9)
- CUDA.jl v1.3 is the last version to work with CUDA 9-10.0 (removed in v2.0)
Much of the software in this ecosystem was developed as part of academic research. If youwould like to help support it, please star the repository as such metrics may help us securefunding in the future. If you use our software as part of your research, teaching, or otheractivities, we would be grateful if you could cite our work. TheCITATION.bib file in theroot of this repository lists the relevant papers.
The package is tested against, and being developed for, Julia 1.10 and above. Maindevelopment and testing happens on x86 Linux, but the package is expected to work onWindows and ARM and as well.
Usage questions can be posted on theJulia Discourseforum under the GPU domain and/or in the #gpuchannel of theJulia Slack.
Contributions are very welcome, as are feature requests and suggestions. Please open anissue if you encounter any problems.
About
CUDA programming in Julia.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.