Open source .NET

GPU, ML and real-time media for .NET. Everywhere it runs.

Write it once in C#. Run it on WebGPU, WebGL, WebAssembly, CUDA, OpenCL and CPU, in the browser and on the desktop. Backed by professional support your finance team can sign off on.

Open source, free for commercial use 75 packages on nuget.org 625K+ downloads
Why teams build on SpawnDev

An advantage, not a liability

One codebase, every target

The same C# runs in the browser and on the desktop. GPU kernels compile to WGSL, GLSL, Wasm, PTX and OpenCL C from one source.

Tested on real hardware

Every change is verified on each backend it touches, on real GPUs and real browsers, before release.

Built for throughput

Bulk data stays on the GPU or in JavaScript typed arrays. No hidden copies through the .NET heap.

Open source, no lock-in

Free for commercial use: SpawnDev code is MIT, and forks keep their original permissive licenses (details). You pay for support when you want it, never for the code.

SpawnDev.ILGPU

GPU compute in C#, in the browser or on the desktop.

SpawnDev.ILGPU extends ILGPU, the .NET compiler that turns C# methods into GPU code, with three browser backends (WebGPU, WebGL and WebAssembly) and a SIMD CPU backend (Velocity) for the desktop. A kernel written for CUDA or OpenCL runs unchanged in a Blazor WebAssembly app and on the desktop, and the application picks the best available backend at run time. It ships as one NuGet package that brings the forked ILGPU compiler and SpawnDev.SpawnJS for browser interop.

More about SpawnDev.ILGPU
Program.cs
// Registers every backend the environment offers:
// browser = WebGPU, WebGL, Wasm; desktop = CUDA, OpenCL, Velocity
using var context = await Context.CreateAsync(builder => builder.AllAcceleratorsAsync());

// Browser: WebGPU, then WebGL, then Wasm.
// Desktop: CUDA, then a discrete OpenCL GPU, then other OpenCL devices, then Velocity.
using var accelerator = await context.CreatePreferredAcceleratorAsync();

int length = 256;
using var a = accelerator.Allocate1D(Enumerable.Range(0, length).Select(i => (float)i).ToArray());
using var b = accelerator.Allocate1D(Enumerable.Range(0, length).Select(i => (float)i * 2f).ToArray());
using var c = accelerator.Allocate1D<float>(length);

var kernel = accelerator.LoadAutoGroupedStreamKernel<Index1D, ArrayView<float>, ArrayView<float>, ArrayView<float>>(VectorAdd);
kernel((Index1D)length, a.View, b.View, c.View);

await accelerator.SynchronizeAsync();               // wait for the GPU
float[] results = await c.CopyToHostAsync<float>(); // the one way to read results back in the browser

static void VectorAdd(Index1D i, ArrayView<float> a, ArrayView<float> b, ArrayView<float> c) => c[i] = a[i] + b[i];

Shipping on SpawnDev?

Private tickets, response targets, a private GitHub tracker and a shared channel. Invoicing for businesses.

An unhandled error has occurred. Reload x