Gpu Lodestar.Gpu - CyrilB1531/lodestar GitHub Wiki
Lodestar.Gpu
GPU kernels over device-resident data, through ILGPU: an embedding matrix swept by a
batch of queries with cosine similarity and top-k on the accelerator, sparse and dense products,
MinHash signatures over tokenized text, and bit-parallel edit distance. Each kernel ships only where it beat this repository's
own CPU path. It targets net10.0 and netstandard2.1, the one package without a
netstandard2.0 build, because ILGPU publishes none; nothing else depends on it.
Install
dotnet add package Lodestar.Gpu
Example
using Lodestar.Gpu.Compute;
// preferCpu runs the kernels on ILGPU's CPU accelerator, where no GPU is present.
using var context = GpuContext.Create(preferCpu: true);
bool onGraphicsHardware = context.IsHardwareGpu; // False
Parity
Measured and checked against this repository's own CPU paths.
docs/equivalence.md maps each Python call to its C#
counterpart, with every deliberate divergence.
Dependencies
A satellite package (decision 0003),
built for net10.0 and netstandard2.1:
ILGPU1.5.3 or laterLodestar.Abstractions0.2.0 or later
Documentation
- Guide: gpu kernels
- Reference: gpu/compute
- Changelog
- Performance
- All packages