Engineering Notes & Build Logs Technical write-ups from building Dark Forest and Project Maximus: autograd debugging notes, SIMD memory alignment, fuzzing runs, and PyTorch parity post-mortems.
All Posts (6) #tensor #fuzzing #miri #memory-safety #autograd #parity #milestone-1 #optimizers #distributed #cluster #networking #allreduce #python #pyo3 #interop #dlpack #simd #memory #architecture #manifesto #roadmap #open-source #maximus
• By Swasthik Shetty • commit: c4e1208
Exposing negative strides, transpositions, and multi-axis slicing to randomized mutation fuzzing.
Diagnostic Challenge
Negative strides combined with non-zero byte offsets caused an integer underflow in raw pointer arithmetic during reverse slicing.
Architectural Discovery
Raw pointers must always calculate offsets in signed isize before applying to the base NonNull<T> pointer.
• By Swasthik Shetty • commit: a8f3b91
How we verified Dark Forest autograd and AdamW against PyTorch with a max loss difference of 2.38e-7.
Diagnostic Challenge
Initial AdamW runs drifted by 1e-3 after step 30 due to an order-of-operations difference in weight decay vs gradient moments.
Architectural Discovery
PyTorch AdamW applies weight decay directly to param data before the moment step: p.data.mul_(1 - lr * wd). Once mirrored in Dark Forest, loss converged to 2.38e-7 difference.
#autograd #parity #milestone-1 #optimizers
Read Post • By Swasthik Shetty • commit: 3f9011d
Decentralized distributed gradient aggregation without MPI or InfiniBand dependencies.
Diagnostic Challenge
TCP socket buffering (Nagle algorithm) was batching tiny chunk packets, introducing 40ms transmission latency spikes.
Architectural Discovery
Setting TCP_NODELAY immediately restored line-rate ring transmission throughput.
#distributed #cluster #networking #allreduce
Read Post • By Swasthik Shetty • commit: 98d1a4e
Connecting native Rust tensors to NumPy and PyTorch without copying gigabytes of buffer memory.
Diagnostic Challenge
Holding the Python GIL during backward graph traversals froze the Python interactive interpreter.
Architectural Discovery
Releasing the GIL via py.allow_threads() lets CPU SIMD compute loops run across all physical cores simultaneously.
• By Swasthik Shetty • commit: e7192ab
Decoupling tensor storage from metadata and enforcing 64-byte cache line alignment.
Diagnostic Challenge
Standard Rust Vec<T> alignment is only 4 bytes for f32, causing AVX-512 unaligned load penalties on CPU.
Architectural Discovery
Using std::alloc::alloc with Layout::from_size_align(size, 64) guarantees single-cycle vector register loading.
The roadmap, the quantitative milestones, and why open-source ML needs a native Rust foundation.
#manifesto #roadmap #open-source #maximus
Read Post