Back to The Julia Language
GSoC 2026

JuliaGPU: Improving GPU stack portability in JuliaGPU

The Julia GPU ecosystem allows users to write array programs that run seamlessly across NVIDIA, AMD, and Intel GPUs. This functional portability relies on GPUArrays.jl, which defines the common interface implemented by all vendor packages. However, several foundational operations currently lack shared implementations. Operations such as reverse, findall, accumulate!, and mapreduce either crash on backends lacking a vendor override or silently degrade to CPU execution by copying data back and forth. A direct source audit of GPUArrays.jl (v11.4.1), CUDA.jl, AMDGPU.jl, oneAPI.jl, and Metal.jl confirmed these gaps: reverse and findall are entirely absent from the shared fallback layer, accumulate! exists only as a scalar CPU fallback, and mapreducedim! is declared as an error("Not implemented") stub, forcing every backend to maintain isolated, vendor-specific implementations. This project resolves these portability gaps by establishing a cleaner, more robust architecture: moving critical GPU kernels upstream to AcceleratedKernels.jl (AK.jl) while refining GPUArrays.jl into a lightweight, pure delegation layer. Building upon the newly introduced KernelIntrinsics API, this approach implements highly optimized, vendor-neutral kernels directly within AK.jl. Because Julia’s multiple dispatch inherently prefers the most specific method, routing AnyGPUArray fallbacks to AK.jl means backends with existing optimized vendor methods remain untouched, while backends missing the functionality automatically receive high-performance GPU execution instead of a crash or silent slowdown.

Project details

Contributor

Shreyas Hegde

Mentors

Not available

Technologies

Not listed in the archive