Koru compiler targets GPU via Vulkan
Koru has enabled GPU execution by compiling identical source kernels directly to Vulkan-compliant SPIR-V binaries via MLIR. This ahead-of-time pipeline requires no runtime engine and has been verified compiling f32 shapes on Apple silicon.
Bypassing runtime engines and JIT compilation entirely to compile Koru source directly to Vulkan-compliant SPIR-V blobs via MLIR is an impressive AOT engineering feat, but explicit call-site targeting and narrow hardware support mean it is still far from a seamless heterogeneous programming model.
* **True AOT Compilation**: Generating the device binary (`.spv`) and Vulkan host dispatch glue at compile time avoids runtime overhead and keeps the footprint minimal.
* **Strict Validation Gating**: Integrating `spirv-val` directly into the compilation pipeline ensures that invalid kernels trigger compilation errors rather than silent runtime failures or device crashes.
* **Explicit Call-Site Scaffolding**: Requiring developers to explicitly annotate calls with `|mlir[gpu]` is a temporary scaffold; true power will come when Koru's compiler automatically determines the execution target based on hardware capabilities and profiles.
* **Hardware & Data Constraints**: The current implementation is limited to `f32` shapes and Apple GPU environments (using MoltenVK for Vulkan), lacking optimization economics such as data residency management and automatic CPU/GPU crossover points.
DISCOVERED
2h ago
2026-07-09
PUBLISHED
2h ago
2026-07-09
RELEVANCE
AUTHOR
korulang