tpt-cobalt
RustUnified Computational Substrate for differentiable physical & scientific computing: a universal device-agnostic tensor, reverse-mode autograd, an ML API, a SafeTensors weight hub, a multi-tier runtime, and differentiable science (ODE/FEA/PINN) crates.
Languages
TPT Cobalt
Unified computational substrate built on the TPT Solutions ecosystem.
Cobalt integrates mathematical primitives, ML training, scientific simulation, formal verification, and a hardware-agnostic compiler into one workspace. The stack shares one tensor type, one autograd tape, and one execution runtime.
What it is
A Rust monorepo that unifies nine forked pillar repos with five new glue crates into a single computational substrate.
Status
Phase 0–5 are substantially complete.
- CPU tensor ops + reverse-mode autograd end to end
tpt-ml: Linear, Conv2d, MultiHeadAttention, TransformerBlock, optimizers, loss functions, DataLoader, LayerNorm, BatchNorm, Embedding, activationstpt-sci: differentiable RK4/Euler ODE, dense-LU FEA adjoint, PINN residual, DEM soft-contact, reaction-network backprop, Hertz contact VJP, LIF SNN surrogate gradienttpt-runtime: CPU dispatch, WGPU backend, CUDA backend, 3-tier allocator, buffer pool, DualStreams,tpt-hub::sharedzero-copy shared memory, SafeTensors / TPTB / Arrow IPC / JSON serialization, ONNX ingestion, GGUF quantized loadertpt-lang: eager interpreter, REPL, notebook kernel (in-process), debugger (run_debug), Chrome Trace profiler, type checker with dimension algebra + compile-time unit errors + tensor shape inference, module/function/parameter object model, gradual typingtpt-lsp: tensor-aware diagnostics, hover, completionstpt-fusion: HLS-C++ tiled GEMM artifact emission, memory-fit prooftpt-alloy-deploy: RP2040 UF2 + ESP32 ROM-UART OTA fleet rollouttpt-bench: criterion micro-benchmarks + Markdown/JSON wall-clock reports
cargo build --workspace is green.
cargo test --workspace is green.
Layout
tpt-cobalt/
├── Cargo.toml # Workspace manifest
├── forked/ # Cobalt's optimized copies of the 9 pillar repos
│ ├── tpt-math/
│ ├── tpt-gpu/
│ ├── tpt-crucible/
│ ├── tpt-fem/
│ ├── tpt-physics/
│ ├── tpt-engineering/
│ ├── tpt-science/
│ ├── tpt-formal/
│ └── tpt-telos/
├── crates/ # The 5 glue crates + language/tooling
│ ├── tpt-tensor/ # Universal tensor
│ ├── tpt-autograd/ # Reverse-mode tape + custom VJPs
│ ├── tpt-ml/ # ML API (nn, optim, loss, data)
│ ├── tpt-hub/ # Model loading, serialization, IPC
│ ├── tpt-runtime/ # CPU / WGPU / CUDA dispatch
│ ├── tpt-lang/ # TPT Script runtime + REPL + notebook + debugger
│ ├── tpt-lsp/ # Language server
│ ├── tpt-fusion/ # FPGA artifact emission + memory-fit proof
│ └── ...
├── docs/
└── tests/
Building
# Default (CPU + WGPU, no CUDA)
cargo build --workspace
# With CUDA backend
cargo build --workspace --features cuda
Documentation
- Design document:
spec.txt - Roadmap & status:
todo.md - TPT Script tutorial:
docs/tpt-script-tutorial.md - PyTorch benchmark protocol:
crates/tpt-bench/PYTORCH_PROTOCOL.md - Exotic backends scoping:
docs/phase5-exotic-backends.md - TPT Script cookbook:
docs/tpt-script-cookbook.md
License
MIT OR Apache-2.0 — see individual crate manifests.