Lava.jl

A Julia GPU backend that compiles Julia code to SPIR-V, targeting Vulkan.

Lava is three backends in one package, all sharing a single buffer model:

  • Compute — full GPUArrays.jl and KernelAbstractions.jl interface. Set device = LavaBackend() and any KA-based GPU code runs on Vulkan.
  • Graphics — vertex, fragment, geometry, and tessellation shaders written in plain Julia (not GLSL), driven through high-level pipelines and RenderWindows.
  • Ray tracingVK_KHR_ray_tracing_pipeline with raygen / closest-hit / any-hit / miss / intersection shaders as Julia functions and a Julia-side TLAS that supports incremental updates.

A single LavaArray{T,N} is usable across all stages: compute kernels can fill geometry, vertex shaders can render it, ray tracing shaders can trace against it — no copies, no format conversion.

Where to start

If you want to…Go to
Install and verify your setupInstallation
Use LavaBackend() like CUDABackend() / ROCBackend()Compute
Write vertex/fragment shaders in JuliaGraphics
Trace rays against a TLASRay Tracing
Tune dispatch latency, memory transfer, schedulingPerformance
Understand the LLVM-IR → SPIR-V pipelineArchitecture
Diagnose a device-lost / validation errorDebugging
Check what's known brokenKnown Issues
Look up a specific functionAPI Reference

Status

The KernelAbstractions / GPUArrays compute path is feature-complete and well-tested (~99.7 % of the GPUArrays test suite passes). The graphics and ray tracing paths are functional and stable enough that the Hikari volumetric path tracer renders end-to-end through both, but their public APIs are still evolving — expect minor breaking changes between 0.x releases.

Performance figures on AMD RX 7900 XTX (vs AMDGPU.jl and pbrt-v4) live in the README and the Performance page.

Hardware

Tested on:

  • AMD RX 7900 XTX (Vulkan 1.4, RADV)
  • AMD Radeon 8060S (Vulkan 1.4, RADV)
  • NVIDIA RTX 3070 Laptop (Vulkan 1.3)
  • lavapipe (software, used for CI)

Requires Vulkan 1.2+ with bufferDeviceAddress and variablePointers. macOS is supported via MoltenVK.