Getting Started with Dark Forest
Overview of Dark Forest workspace crates, system prerequisites, and core runtime design.
Dark Forest is an open-source machine learning runtime written in Rust and CUDA (darkforest-core, darkforest-cuda, darkforest-py, and models).
Core Design Choices
- 64-byte aligned SIMD host storage: Cacheline-aligned buffers supporting AVX-512 / NEON vectorization and pinned host staging.
- Signed-stride tensor views: Signed
isizestrides enable zero-copy slicing and transpositions. - Iterative tape autograd: Topological worklist traversal avoids deep recursion stacks during backpropagation.
- Pre-allocated static GPU graphs: Contiguous device allocation at startup eliminates per-step
cudaMallocandcudaFreecalls. - Parity-first testing: Operators and optimizers are cross-checked against PyTorch 2.4 reference trajectories.
System Requirements
- Rust toolchain (
cargo,rustc1.80+) - Linux (
x86_64,aarch64), macOS, or Windows 11 / WSL2 - Optional: NVIDIA GPU + CUDA Toolkit (
nvcc) for--features cudatargets