Tensor compute,
in PowerShell.
PowerTorch is a no-Python tensor, autograd, DirectML, ONNX, and checkpoint runtime built from .NET, C++, and PowerShell 7.
Actual PowerShell surface
Native commands.
Native handles.
PowerTorch exposes typed binary cmdlets backed by the same managed tensor, autograd, and native backend layers.
PS Import-Module .\artifacts\module\PowerTorch.psd1
PS Get-PowerTorchInfo
PS Test-PowerTorch -DirectML
Healthy : True
DirectML : NVIDIA T1000 8GB
PS $tensor = Read-PowerTorchCheckpointTensor `
-Path .\model.safetensors
PS Invoke-PowerTorchOperation `
-Operation Add `
-Left $tensor -Right $tensor `
-Backend DirectML
Latest verified build
Evidence, not claims
Generated from the repository's verification record and current commit.
Site build commit: local
Runtime architecture
One tensor contract.
Multiple native backends.
PowerShell
Typed binary cmdlets, pipeline objects, cancellation, and structured errors.
.NET runtime
Tensor descriptors, storage, dispatcher, autograd, AdamW, NN and compiler layers.
Native backends
C ABI, CPU kernels, DirectML/D3D12 resources, and a future CUDA backend.
Interop
Safe safetensors, ONNX Runtime DirectML, and safe TorchScript/archive readers.
Implemented foundation
Useful now. Explicit later.
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.
AdamW
Float32/float64 first and second moments, bias correction, decoupled weight decay, and gradient clearing.
DirectML
Native adapter/device creation, compiled DML operator execution, D3D12 upload/readback, fencing, and float32 add parity.
Safetensors
Bounded JSON header parsing, dtype/shape/offset validation, overlap detection, and real tensor reads.
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.
Loading compatibility data...
Build on Windows
PowerShell-first setup
Clone
git clone https://github.com/DarbotLM/PowerTorch.git
cd PowerTorch
Build
pwsh -NoProfile -File `
.\scripts\Build-PowerTorch.ps1 `
-Configuration Release
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
- Runtime + ABIManaged/.NET boundary, DirectML C ABI, safe handles, native device health.
- Tensor + training sliceCPU ops, DirectML add, safetensors, ONNX, autograd, AdamW, PowerShell cmdlets.
- Model executionMatrix/tensor layers, attention, normalization, generation, TorchScript-safe archive handling.
- CompilerTyped IR, shape inference, graph capture, memory planning, fusion, and cache provenance.
- DistributedRanks, collectives, sharded checkpoints, recovery, and multi-adapter execution.
- 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 →