ZeroTensor.Core 1.0.0

dotnet add package ZeroTensor.Core --version 1.0.0
                    
NuGet\Install-Package ZeroTensor.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="ZeroTensor.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZeroTensor.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ZeroTensor.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 ZeroTensor.Core --version 1.0.0
                    
#r "nuget: ZeroTensor.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 ZeroTensor.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=ZeroTensor.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ZeroTensor.Core&version=1.0.0
                    
Install as a Cake Tool

ZeroTensor

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

ZeroTensor is an ultra-high-performance, multidimensional strided tensor computing library for .NET with zero external dependencies. Built from first principles in pure C#, it delivers NumPy/PyTorch-grade N-dimensional tensor operations, zero-copy slicing, cache-blocked BLAS matrix arithmetic, and numerical decompositions across modern .NET and legacy .NET Framework platforms.


๐ŸŒŸ Key Capabilities

  • Pure C# / Zero Dependencies: No native C++ wrappers, no Python runtimes, no MKL or OpenBLAS shared library setup. Copy and run anywhere.
  • N-Dimensional Strided Memory Layout: Flexible shape descriptors and strides allowing zero-copy views, broadcasting, slicing, transposing, and reshaping.
  • Cache-Blocked Level-3 BLAS: Highly optimized GEMM (General Matrix Multiply) with L1/L2 cache tiling, loop unrolling, and SIMD hardware acceleration.
  • Numerical Matrix Decompositions:
    • SVD (Singular Value Decomposition via Golub-Reinsch / Jacobi rotations)
    • QR (Householder reflections)
    • Cholesky ($L L^T$ decomposition for positive-definite systems)
    • Eigenvalues & Eigenvectors (Symmetric Jacobi method)
  • Vectorized Element-Wise Math: AVX2/SSE/Hardware-accelerated vectorized operations (Add, Sub, Mul, Div, Exp, Log, Sqrt, Pow, Relu, Sigmoid).
  • Multi-Targeting: Seamlessly compiles and runs on .NET 8.0+, .NET Framework 4.6.2+, and .NET Standard 2.0.

๐Ÿ“ฆ Installation

Install via the .NET CLI:

dotnet add package ZeroTensor.Core

Or via the NuGet Package Manager:

Install-Package ZeroTensor.Core

๐Ÿš€ Quick Start

1. Creating and Slicing Tensors

using ZeroTensor.Core;

// Create a 3x3 tensor
var a = Tensor.Create<float>(new[] { 3, 3 }, new float[]
{
    1f, 2f, 3f,
    4f, 5f, 6f,
    7f, 8f, 9f
});

// Reshape without copying memory
var reshaped = a.Reshape(1, 9);

// Transpose matrix view
var transposed = a.Transpose();
Console.WriteLine($"Original (0,1): {a[0, 1]}, Transposed (1,0): {transposed[1, 0]}");

2. Cache-Blocked Matrix Multiplication (GEMM)

var m1 = Tensor.RandomUniform(512, 512, min: -1.0f, max: 1.0f);
var m2 = Tensor.RandomUniform(512, 512, min: -1.0f, max: 1.0f);

// High-speed Level-3 BLAS multiplication
var result = TensorBlas.Gemm(m1, m2);

3. Singular Value Decomposition (SVD)

var matrix = Tensor.Create<double>(new[] { 3, 3 }, new double[]
{
    4.0, 11.0, 14.0,
    8.0,  7.0, -2.0,
    1.0,  2.0,  3.0
});

// Compute SVD: A = U * S * V^T
TensorDecompositions.Svd(matrix, out var u, out var s, out var vt);

Console.WriteLine($"Top Singular Value: {s[0]:F4}");

๐Ÿ“Š Benchmark & Performance

Tested on Intel Core i7 / AMD Ryzen 9 (.NET 8.0, AVX2 enabled):

Operation Dimensions Execution Time Memory Allocations
Tensor Creation $1024 \times 1024$ $0.21 \text{ ms}$ Continuous buffer
Zero-Copy Reshape / Slicing $1000 \times 1000$ $0.0001 \text{ ms}$ 0 bytes (View)
Vectorized Add / Multiply $1\text{M elements}$ $0.48 \text{ ms}$ In-place / buffer reuse
GEMM Matrix Multiply $512 \times 512$ $18.4 \text{ ms}$ Cache-tiled L1/L2
Singular Value Decomposition $64 \times 64$ $1.15 \text{ ms}$ 0 external allocs

๐Ÿ› Ecosystem Architecture

ZeroTensor serves as the numerical foundation for the ZeroPlatform industrial automation and compute ecosystem:

graph TD
    ZeroTensor["ZeroTensor.Core (N-D Strided Tensors)"]
    ZeroCompute["ZeroCompute.Core (SIMD / D3D11 Compute)"]
    ZeroInference["ZeroInference.Core (Pure C# ONNX Engine)"]
    ZeroSignal["ZeroSignal.Core (DSP, FFT, EKF)"]
    ZeroGeometry["ZeroGeometry.Core (3D PointCloud, ICP, KdTree)"]
    ZeroNeural["ZeroNeural.Core (Autonomous ML Networks)"]

    ZeroTensor --> ZeroCompute
    ZeroTensor --> ZeroInference
    ZeroTensor --> ZeroSignal
    ZeroTensor --> ZeroGeometry
    ZeroTensor --> ZeroNeural

๐Ÿ“„ 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 (6)

Showing the top 5 NuGet packages that depend on ZeroTensor.Core:

Package Downloads
ZeroNeural.Core

Pure C# deep learning micro-framework with dynamic tape-based autograd, neural layers (Linear, Conv2D, Norm), losses, and optimizers (SGD, Adam, AdamW) for .NET.

ZeroGeometry.Core

Pure C# 2D/3D computational geometry, point cloud processing (ICP, Voxel Grid, SOR), spatial indexing (k-d Tree), and Clipper polygon boolean operations for .NET.

ZeroInference.Core

Pure C# Edge AI model inference engine: ONNX parser, layer fusion, zero-allocation memory planner, INT8 quantization, and fast NMS vision detection for .NET.

ZeroSignal.Core

Pure C# digital signal processing (SciPy equivalent): IIR Butterworth/Chebyshev filter synthesis, zero-phase FiltFilt, DWT wavelets, and Levenberg-Marquardt non-linear least squares optimization for .NET.

ZeroPipeline.Nodes

Industrial Concrete Pipeline Nodes: Machine Vision, Metrology, Barcode/QR Decoders, AI Inference, Modbus PLC, and Gorilla TimeSeries Logging for ZeroPlatform.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 138 9/9/2026