xc - Write one loop, run on every CPU and GPU

Show HN: Compile the same source for GPUs and CPUs

xc is a heterogeneous data-parallel language and compiler that lets you write an ordinary loop in xc or C and have it automatically run across every CPU core, on GPUs via Metal, CUDA, Vulkan, or WebGPU, or even across multiple GPUs from different vendors at once. The xcc compiler generates kernels itself and embeds them in the executable, so no GPU toolkit is needed at build time. It keeps whichever backend is fastest, making high-performance parallel computing accessible without specialized GPU programming. The project includes a GUI framework, tools, and benchmarks, with documentation and downloads at compile-xc.org.

Write an ordinary loop, in xc or in C, and xcc runs it across every CPU core, on the GPU through Metal, CUDA, Vulkan or WebGPU, across several GPUs from different vendors at once, or on a GPU on another machine, and keeps whichever is fastest.

More from this day

2026-11-22