Recursive AI
LibraryC#Available

onegpu

GPU compute and rendering for .NET from pure C#, on Vulkan, Metal and browser WebGPU. There are no native binaries of ours and no CUDA install: the backends talk to the platform’s own GPU API through the driver already on the machine.

It has two jobs. It is a small, compute-first device layer (typed buffers, async readback, compute pipelines, command encoders, timestamps, capabilities as data) with the surfaces, textures and graphics pipelines a renderer needs. And it ships the compute kernels that machine-learning inference needs, written in HLSL and compiled at build time for all three backends.

Open source, MIT or Apache-2.0, made by Recursive AI. Version 1.0.0 is on NuGet, for .NET 10.

dotnet add package RecursiveAI.OneGpu.Backends --version 1.0.0
dotnet add package RecursiveAI.OneGpu.Kernels --version 1.0.0

The packages

PackageWhat it is
RecursiveAI.OneGpuDevices, adapters and capabilities, typed buffers, uploads and async readback, compute pipelines, command encoders, dispatch, timestamps, memory statistics, plus surfaces, textures and graphics pipelines. BCL only; no interop.
RecursiveAI.OneGpu.VulkanVulkan 1.3 backend (Windows, Linux).
RecursiveAI.OneGpu.MetalMetal backend (macOS, Apple silicon).
RecursiveAI.OneGpu.WebGpuWebGPU backend for the browser ([JSImport], publishes onegpu.js).
RecursiveAI.OneGpu.BackendsGpuBackends: picks Metal on Apple platforms, WebGPU in a browser and Vulkan elsewhere. Reference it to get all three.
RecursiveAI.OneGpu.KernelsHLSL compute kernels with generated bindings: GEMM, attention, convolution, reductions, softmax, norms, gather and scatter, int8, recurrent layers, element-wise, integer and bool ops.

Backends brings the three backends; reference RecursiveAI.OneGpu and one backend alone to be smaller. onegame takes its GPU layer from these packages. OneModel’s GPU support, built on these kernels, is coming in a later OneModel release.

Platforms and requirements

Go further