Managed .NET wrapper for Intel Level Zero GPU compute with built-in kernel catalog for swarm optimization, SNN, and multi-objective algorithms.
$ dotnet add package LevelZero.NETManaged .NET wrapper for Intel Level Zero GPU compute, with a built-in SPIR-V kernel catalog for swarm optimization, spiking neural networks, and multi-objective algorithms.
LevelZeroShim.dll / libLevelZeroShim.so extracted at runtime, no manual setupFitnessKernel, PSOVelocityKernel, NeuronUpdateKernel, STDPKernel, NBodyKernel, and moredotnet add package LevelZero.NET
using LevelZero;
// Check GPU availability
if (LevelZeroRuntime.IsAvailable())
{
var device = LevelZeroRuntime.GetDefaultDevice();
Console.WriteLine($"GPU: {device}");
// Load a SPIR-V module
byte[] spirv = KernelCatalog.GetKernel("fitness_eval");
using var module = device.LoadModule(spirv);
// Allocate shared memory and launch
using var buffer = device.AllocShared<float>(1024);
device.Launch(module, "fitness_eval", workItems: 1024);
}
| Codename | Architecture | Examples |
|---|---|---|
| tgllp | Gen12 | Intel Iris Xe (11th Gen) |
| dg1 | Gen12 | Intel Iris Xe MAX |
| acm-g10/g11/g12 | Xe-HPG | Intel Arc A-series |
| pvc | Xe-HPC | Intel Data Center GPU Max |
| mtl | Xe-LPG | Intel Core Ultra |
| arl-h | Xe-LPG+ | Intel Arrow Lake |
| bmg-g21 | Xe2 | Intel Arc B-series (Battlemage) |
| lnl-m | Xe2-LPG | Intel Lunar Lake |
| ptl-h | Xe3-LPG | Intel Panther Lake |
The KernelCatalog resolves SPIR-V binaries using this chain:
LEVELZERO_SPIRV_DIR environment variabletgllp device targetTag a release to trigger NuGet publishing:
git tag v1.0.0
git push origin v1.0.0
Requires the NUGET_API_KEY secret configured in the repository settings.
MIT