NVIDIA CUDA
The most mature back-end, with GPU arrays, kernel programming on par with CUDA C, wrappers for NVIDIA's libraries, and tile-based kernels through cuTile.jl.
JuliaGPU is a GitHub organization that unifies the packages for programming GPUs in Julia. With its high-level syntax and flexible compiler, Julia is well positioned to productively program hardware accelerators without sacrificing performance.
julia> using CUDA
julia> a = CUDA.rand(1024, 1024);
julia> sum(a .^ 2) # runs on the GPU
349013.44f0
julia> function add_one!(a)
i = threadIdx().x + (blockIdx().x - 1) * blockDim().x
@inbounds a[i] += 1
return
end
julia> @cuda threads=256 blocks=4096 add_one!(a)julia> using AMDGPU
julia> a = AMDGPU.rand(1024, 1024);
julia> sum(a .^ 2) # runs on the GPU
349398.62f0
julia> function add_one!(a)
i = workitemIdx().x +
(workgroupIdx().x - 1) * workgroupDim().x
@inbounds a[i] += 1
return
end
julia> @roc groupsize=256 gridsize=4096 add_one!(a)julia> using oneAPI
julia> a = oneAPI.rand(1024, 1024);
julia> sum(a .^ 2) # runs on the GPU
349561.06f0
julia> function add_one!(a)
i = get_global_id()
@inbounds a[i] += 1
return
end
julia> @oneapi items=256 groups=4096 add_one!(a)julia> using Metal
julia> a = Metal.rand(1024, 1024);
julia> sum(a .^ 2) # runs on the GPU
349217.3f0
julia> function add_one!(a)
i = thread_position_in_grid().x
@inbounds a[i] += 1
return
end
julia> @metal threads=256 groups=4096 add_one!(a)julia> using OpenCL, pocl_jll
julia> a = OpenCL.rand(1024, 1024);
julia> sum(a .^ 2) # runs on PoCL
349702.84f0
julia> function add_one!(a)
i = get_global_id()
@inbounds a[i] += 1
return
end
julia> @opencl local_size=256 global_size=length(a) add_one!(a)julia> using KernelAbstractions
julia> using CUDA # or AMDGPU, oneAPI, Metal, OpenCL
julia> @kernel function add_one!(a)
i = @index(Global)
@inbounds a[i] += 1
end
julia> a = rand(Float32, 1024, 1024); # on the CPU
julia> add_one!(get_backend(a))(a; ndrange=length(a))
julia> b = CUDA.rand(1024, 1024); # on the GPU
julia> add_one!(get_backend(b))(b; ndrange=length(b))Julia supports GPUs from all major vendors, each through its own package.
The most mature back-end, with GPU arrays, kernel programming on par with CUDA C, wrappers for NVIDIA's libraries, and tile-based kernels through cuTile.jl.
Array and kernel programming for AMD Radeon and Instinct GPUs, with the ROCm libraries downloaded automatically.
AMDGPU.jl
Docs
Support for Intel GPUs, from integrated graphics to Arc and Data Center GPU Max, with array operations, kernel programming and oneMKL.
oneAPI.jl
Docs
GPU programming on Apple silicon Macs, with array operations, kernels written in Julia, and Apple's Metal Performance Shaders for linear algebra and FFTs.
Metal.jl
Docs
Vendor-neutral array and kernel programming for any device with an OpenCL driver, including CPUs through PoCL.
OpenCL.jl
Docs
Each back-end implements the same array abstractions, so most generic Julia code runs unmodified on any of them. To write portable kernels, use KernelAbstractions.jl; for portable high-performance algorithms like sorting and scans, see AcceleratedKernels.jl.
With AMDGPU.jl 2.12, ROCm is downloaded as an artifact and no longer needs to be installed. Recent releases also bring a public performance dashboard, faster kernel launches and …
This Google Summer of Code 2026 project added the data-parallel primitives that the Julia GPU stack was missing and tuned them to serve as the shared implementation for every …
CUDA.jl 6.4 greatly improves support for NVIDIA Jetson boards, and further enhances caching of compiled GPU code for much faster TTFX.
Much of Julia’s GPU support was developed as part of academic research. If you would like to help support it, please star the relevant repositories as such metrics may help us secure funding in the future. If you use our software as part of your research, teaching, or other activities, we would be grateful if you could cite our work:
If you need help, or have questions about GPU programming in Julia, you can find members of the community at: