ZeroCompute.Core 1.0.0

dotnet add package ZeroCompute.Core --version 1.0.0
                    
NuGet\Install-Package ZeroCompute.Core -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ZeroCompute.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZeroCompute.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ZeroCompute.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZeroCompute.Core --version 1.0.0
                    
#r "nuget: ZeroCompute.Core, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ZeroCompute.Core@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ZeroCompute.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ZeroCompute.Core&version=1.0.0
                    
Install as a Cake Tool

ZeroCompute

License: MIT .NET Multi-Targeting Direct3D 11 Compute Zero External Dependencies NuGet Version

ZeroCompute is a lightweight, hardware-accelerated compute execution library for .NET with zero external dependencies. It bridges pure CPU SIMD acceleration with native Windows Direct3D 11 Compute Shaders via COM VTable P/Invoke, delivering high-throughput GPGPU and parallel math execution without requiring external CUDA or OpenCL installations.


๐ŸŒŸ Key Capabilities

  • Unified Compute Abstraction (IComputeContext): Write algorithmic compute code once; dispatch seamlessly across multi-core CPU SIMD or Direct3D 11 hardware GPUs.
  • Pure C# Direct3D 11 Dispatcher: Zero third-party C++ wrappers (no SharpDX, no Silk.NET, no Vortice). Calls DirectX COM VTable methods directly with zero marshalling overhead.
  • Hardware Fallback Strategy: Automatically detects dedicated GPU hardware (NVIDIA, AMD, Intel); falls back to high-speed vectorized CPU multi-threading if running in a headless or VM environment.
  • Structured Buffers & DMA Transfer: High-speed host $\leftrightarrow$ device DMA transfers with staging readback buffers, unordered access views (UAV), and shader resource views (SRV).
  • Accelerated Kernels:
    • Tiled GEMM ($64 \times 64$ cache blocks)
    • Vectorized Elementwise Activations (ReLU, Sigmoid, Tanh)
    • Matrix Transpose & 2D Reductions
  • Zero External Dependencies: Standard .NET runtime only.

๐Ÿ“ฆ Installation

Install via the .NET CLI:

dotnet add package ZeroCompute.Core

๐Ÿš€ Quick Start

1. Unified Compute Context Selection

using ZeroCompute.Core;

// Select best available hardware: GPU if available, else CPU SIMD
using var context = ComputeDevice.GetBestDevice();

Console.WriteLine($"Active Compute Device: {context.DeviceName} (IsGpu: {context.IsGpu})");

2. High-Performance Matrix Multiplication

using ZeroTensor.Core;
using ZeroCompute.Core;

var a = Tensor.RandomUniform(1024, 1024);
var b = Tensor.RandomUniform(1024, 1024);

using var ctx = ComputeDevice.Cpu(); // Or ComputeDevice.Gpu()
var c = ctx.Gemm(a, b);

Console.WriteLine($"Result shape: [{c.Shape[0]}, {c.Shape[1]}]");

๐Ÿ“Š Benchmark & Performance

Tested on Intel Core i7-13700K + NVIDIA GeForce RTX 4070 (Release x64):

Benchmark Task CPU Single-Thread CPU SIMD (AVX2) Direct3D 11 GPU
GEMM $1024 \times 1024$ $142.5 \text{ ms}$ $18.2 \text{ ms}$ $3.1 \text{ ms}$
Elementwise ReLU ($4\text{M}$ items) $12.4 \text{ ms}$ $1.8 \text{ ms}$ $0.3 \text{ ms}$
Buffer Upload DMA (16 MB) N/A (In-memory) N/A $0.4 \text{ ms}$

๐Ÿ“„ License

MIT License ยฉ 2026 Phong Vรต. Part of the ZeroPlatform project.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 91 9/9/2026