From e52296ffe067dc4c11112a0cd64c00fb39356c8b Mon Sep 17 00:00:00 2001 From: Vasyl-Trefilov Date: Thu, 3 Dec 2026 10:36:29 +0100 Subject: [PATCH] docs: MNIST download commands, fresh-clone reproduction of the N = 8 numbers Co-Authored-By: Claude Opus 5.5 --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee701ca..37e9a60 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ The array computes `C[i][j] = sum_k A[i][k] * B[j][k]` for N x K panels, K up to ## Build -Needs Rust, Verilator (5.052 tested) and a C++ compiler. Icarus and yosys are optional (smoke test, resource checks). +Needs Rust, Verilator (5.052 and 5.054 tested) and a C++ compiler. Icarus and yosys are optional (smoke test, resource checks). ```bash cargo test --release # bit-exact tests against the host int8 reference @@ -51,7 +51,20 @@ RPU_N=16 cargo test --release # another array size RPU_N=64 RPU_LOAD_BEATS=2 cargo test --release # a big array: 2-beat read port (1-cycle requantized rows and one-beat host writes by default above N = 16) ``` -The MNIST example reads the four unpacked IDX files from `data/mnist/` (not in the repository; download them from any MNIST mirror). The first run trains the network (about 20 s) and saves it there. +The MNIST example reads the four unpacked IDX files from `data/mnist/` (not in the repository). One way to get them: + +```bash +mkdir -p data/mnist && cd data/mnist +for f in train-images-idx3-ubyte train-labels-idx1-ubyte t10k-images-idx3-ubyte t10k-labels-idx1-ubyte; do + curl -fLO https://ossci-datasets.s3.amazonaws.com/mnist/$f.gz && gunzip $f.gz +done +cd ../.. +cargo run --release --features brain --example mnist +``` + +The first run trains the network (about 30 s on a Ryzen 5 7600X) and saves it there. + +Reproduced from a fresh clone on 2026-12-03 (commit `6da825e`, Verilator 5.054, Ryzen 5 7600X): 39 tests pass, and the N = 8 MNIST run prints the same 97.25% accuracy, 1624.3 cycles per image and 98.50% utilization as the table above. The simulation of the 10,000 test images took 12.7 s of wall time. ## Limits