JuliaGPU/CUDA.jl

Public

CUDA programming in Julia.

  • Stars1.4k+1 tuần này
  • Forks288
  • Watchers13
  • Issues137
  • Ngày tạo06/09/2019
  • Cập nhật gần nhất02/12/2026
  • Ngôn ngữJulia
  • Giấy phép—
README.md17.4 KBRaw

CUDA.jl

CUDA programming in Julia

The CUDA.jl package is the main programming interface for working with NVIDIA CUDA GPUs using Julia. It features a user-friendly array abstraction, a compiler for writing CUDA kernels in Julia, and wrappers for various CUDA libraries.

Quick start

Before all, make sure you have a recent NVIDIA driver. On Windows, also make sure you have the Visual 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 ] to enter the Pkg REPL mode and run:

pkg> add CUDA

Or, equivalently, via the Pkg API:

julia> import Pkg; Pkg.add("CUDA")

For an overview of the CUDA toolchain in use, you can run the following command after importing the package:

julia> using CUDA

julia> CUDA.versioninfo()

This may take a while, as it will precompile the package and download a suitable version of the CUDA toolkit. If your GPU is not fully supported, the above command (or any other command that initializes the toolkit) will issue a warning.

For quick testing, you can also use the juliagpu/cuda.jl container image from the GitHub Container Registry, which provides Julia, a precompiled version of CUDA.jl, and a matching CUDA toolkit. Tags are named after the CUDA major version (cuda12 or cuda13); the bare tag tracks the latest stable release, while <version>-cuda<major> pins to a specific release and dev-cuda<major> tracks the latest main build:

# latest stable release, CUDA 13
docker run -it --rm --gpus=all ghcr.io/juliagpu/cuda.jl:cuda13

# a specific release, CUDA 12
docker run -it --rm --gpus=all ghcr.io/juliagpu/cuda.jl:v6.1.0-cuda12

# latest main build, CUDA 13
docker run -it --rm --gpus=all ghcr.io/juliagpu/cuda.jl:dev-cuda13

For more usage instructions and other information, please refer to the documentation.

Organization

From version 6.0 on, CUDA.jl is a meta-package the imports the following registered subpackages:

  • CUDACore: the core package with the main CUDA API wrappers and the compiler for writing CUDA kernels in Julia;

Nội dung README thuộc về JuliaGPU và cộng đồng đóng góp, giấy phép Không có giấy phép. Nguồn: github.com/JuliaGPU/CUDA.jl