docsgetting startedgetting-started
Getting Started

Getting Started with Dark Forest

Overview of Dark Forest workspace crates, prerequisites, and design tradeoffs.

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 isize strides 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 cudaMalloc and cudaFree calls.
  • Parity-first testing: Operators and optimizers are cross-checked against PyTorch 2.4 reference trajectories.

System Requirements

  • Rust toolchain (cargo, rustc 1.80+)
  • Linux (x86_64, aarch64), macOS, or Windows 11 / WSL2
  • Optional: NVIDIA GPU + CUDA Toolkit (nvcc) for --features cuda targets