Public native runtime foundation

Tensor compute,
in PowerShell.

PowerTorch is a no-Python tensor, autograd, DirectML, ONNX, and checkpoint runtime built from .NET, C++, and PowerShell 7.

No Python runtime DirectML-first Safe checkpoint parsing Native PowerShell module

Actual PowerShell surface

Native commands.
Native handles.

PowerTorch exposes typed binary cmdlets backed by the same managed tensor, autograd, and native backend layers.

Latest verified build

Evidence, not claims

Generated from the repository's verification record and current commit.

Build 0 errors / warnings
xUnit + Pester 14 tests passed
Safetensors 665 real tensors parsed
Python dependency None at PowerTorch runtime

Site build commit: local

Runtime architecture

One tensor contract.
Multiple native backends.

01

PowerShell

Typed binary cmdlets, pipeline objects, cancellation, and structured errors.

02

.NET runtime

Tensor descriptors, storage, dispatcher, autograd, AdamW, NN and compiler layers.

03

Native backends

C ABI, CPU kernels, DirectML/D3D12 resources, and a future CUDA backend.

04

Interop

Safe safetensors, ONNX Runtime DirectML, and safe TorchScript/archive readers.

PowerShell command→ Dispatcher→ CPU / DML / CUDA→ Native result

Implemented foundation

Useful now. Explicit later.

T

Tensor core

Dense CPU storage, shape/stride checks, dtype metadata, add, multiply, subtract, divide, sigmoid, sum, and mean.

∇

Autograd

Reverse-mode arithmetic and sigmoid/sum/mean gradients with persistent parameter state.

A

AdamW

Float32/float64 first and second moments, bias correction, decoupled weight decay, and gradient clearing.

D

DirectML

Native adapter/device creation, compiled DML operator execution, D3D12 upload/readback, fencing, and float32 add parity.

S

Safetensors

Bounded JSON header parsing, dtype/shape/offset validation, overlap detection, and real tensor reads.

O

ONNX interop

DirectML ONNX Runtime metadata loading in an isolated native CLI host, with PowerShell receiving structured JSON.

Machine-readable status

Compatibility matrix

Unsupported behavior fails explicitly. PowerTorch never silently changes device, dtype, or precision.

Supported Partial Planned Unsupported

Loading compatibility data...

Build on Windows

PowerShell-first setup

01

Clone

git clone https://github.com/DarbotLM/PowerTorch.git
cd PowerTorch
02

Build

pwsh -NoProfile -File `
  .\scripts\Build-PowerTorch.ps1 `
  -Configuration Release
03

Verify

pwsh -NoProfile -File `
  .\scripts\Test-PowerTorch.ps1 `
  -Configuration Release

Requires Windows x64, PowerShell 7.6+, .NET 10, Visual Studio 2022 C++ Build Tools, CMake, and DirectX 12/DirectML support.

M3 compatibility program

The next backend layers

  1. Runtime + ABIManaged/.NET boundary, DirectML C ABI, safe handles, native device health.
  2. Tensor + training sliceCPU ops, DirectML add, safetensors, ONNX, autograd, AdamW, PowerShell cmdlets.
  3. CompilerTyped IR, shape inference, graph capture, memory planning, fusion, and cache provenance.
  4. DistributedRanks, collectives, sharded checkpoints, recovery, and multi-adapter execution.
  5. Darbot migrationNative OCR, OmniParser, BitNet-adjacent tooling, and Unsloth/Studio paths without Python.

Security by construction

No executable Python pickle boundary.

Safetensors is parsed with strict header, dtype, shape, offset, overlap, and file-bound checks. ONNX and TorchScript-like archives are treated as untrusted, and arbitrary executable deserialization is rejected.

Read the security model →