If you can use artifacts (i.e., you are not using an unsupported platform or have no specific requirements), it is recommended to do so: The CUDA toolkit is tightly coupled to the NVIDIA driver, and compatibility is automatically taken into account when selecting an artifact to use.
There are two different options to provide CUDA: either you install it yourself in a way that is discoverable by the Julia CUDA packages, or you let the packages download CUDA from artifacts. Refer to the following document for more information. On Linux, that means loading the nvidia kernel module with the NVreg_RestrictProfilingToAdminUsers=0 option configured (e.g., in /etc/modprobe.d). You should also be able to execute the nvidia-smi command, which lists all available GPUs you have access to.įinally, to be able to use all of the Julia GPU stack you need to have permission to profile GPU code.
Generally, you should be able to find and use the CUDA driver library, called libcuda.so on Linux, libcuda.dylib on macOS and nvcuda64.dll on Windows.
If you are using a shared system, ask your system administrator on how to install or load the NVIDIA driver. In the case that driver is out of date or does not support your GPU, and you need to download a driver from the NVIDIA home page, similarly prefer a distribution-specific package (e.g., deb, rpm) instead of the generic runfile option.
If you're using Linux you should always consider installing the driver through the package manager of your distribution. You can find detailed instructions on the NVIDIA home page. To use the Julia GPU stack, you need to install the NVIDIA driver for your system and GPU. The main development platform (and the only CI system) however is x86_64 on Linux, so if you are using a more exotic combination there might be bugs. as long as Julia is supported on it and there exists an NVIDIA driver and CUDA toolkit for your platform. However, that support is subject to NVIDIA providing a CUDA toolkit for your system, subsequently macOS support might be deprecated soon. Again, the exact requirements are recorded in CUDA.jl's manifest, but often the following instructions will work: pkg> add GPUCompiler#masterĪll three major operation systems are supported: Linux, Windows and macOS. In the case you want to use the development version of CUDA.jl with other packages, you cannot use the manifest and you need to manually install those dependencies from the master branch. Pkg> instantiate # to install correct dependencies julia/dev/CUDA.jl # or wherever you have CUDA.jl checked out This information is recorded in the manifest at the root of the repository, which you can use by starting Julia from the CUDA.jl directory with the -project flag: $ cd. Often, however, the development version of this package itself relies on unreleased versions of other packages. In some cases, you might need to use the master version of this package, e.g., because it includes a specific fix you need.
Or, equivalently, via the Pkg API: julia> import Pkg Pkg.add("CUDA") You can easily do that using the package manager: pkg> add CUDA Package installationįor most users, installing the latest tagged version of CUDA.jl will be sufficient. The former should be installed by you or your system administrator, while the latter can be automatically downloaded by Julia using the artifact subsystem. The Julia CUDA stack requires users to have a functional NVIDIA driver and corresponding CUDA toolkit.