Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/benchmarks-mv/blob/main/prime-drag-race/CONTRACT.md # benchmarks-mv Measurement harnesses and evidence bundles for AIEN on the NVIDIA DGX Spark GB10. Speed is reported against the machine's physical limit and my own previous run. Attachment of AienOS. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `benchmarks-mv / prime-drag-race / CONTRACT.md` 135 lines ยท 8114 bytes Raw Blame History Rendered 1 # AIEN Prime Drag Race: benchmark contract (version 1) 2 3 This contract is frozen. Any change to a rule below is a new contract version. 4 The runner in this directory enforces it. Contract version string: `1`. 5 6 Amendment of 2026-10-15: the CUDA yardstick class and the CUDA mirror label were removed. AIEN does 7 not compare itself with other people's systems: speed is measured against the machine's physical 8 limit, and correctness against our own reference. The rules the runner enforces did not change, so 9 the contract version string stays `1`. 10 11 ## What is measured 12 13 Sieve all primes up to a limit (default 1,000,000), over and over, for at least a minimum time 14 (default 5 seconds), and count how many complete passes finish. The score is passes per second. 15 Higher is faster. 16 17 ## The canonical result 18 19 For limit L, only odd numbers are stored. Bit k (word k/64, bit k%64, little-endian 64-bit words, 20 which is the same bytes as little-endian 32-bit words) is set exactly when 2k+1 is prime, for 21 0 <= k < (L+1)/2. All bits past that range are zero. The prime 2 is implicit when L >= 2. The count 22 of primes is the number of set bits plus 1 when L >= 2. For L = 1,000,000 the count is 78,498. 23 24 The runner builds this result itself with an independent reference: deterministic Miller-Rabin on 25 every odd number up to L (bases 2, 3, 5, 7 below 3,215,031,751, otherwise the first 12 primes, with 26 128-bit multiplication). The reference is checked against trial division and the known prime counts 27 (10:4, 100:25, 1,000:168, 10,000:1,229, 100,000:9,592, 1,000,000:78,498, 10,000,000:664,579). 28 29 ## What one pass includes 30 31 Everything needed to go from nothing to a complete result that the host can read: reset or allocate 32 the sieve state, compute the base primes up to sqrt(L) (for GPUs, on the host, written into a 33 device-visible buffer), launch the work, wait for confirmed completion, and have the result sitting 34 in host-readable memory. Excluded: process start, one-time setup (opening a GPU session, uploading 35 kernel code, allocating persistent buffers), and the final export and checking of the answer. 36 A CPU pass allocates a fresh zeroed sieve each time (faithful). A GPU pass that keeps persistent 37 buffers is marked not faithful. 38 39 ## Implementation interface 40 41 ` [--limit N] [--min-seconds S] [--bitmap-out PATH] [--report-out PATH] [--audit-passes K]` 42 43 - Timed mode: loop passes against a monotonic clock until S seconds have passed. Elapsed is the 44 actual time spent. After the loop, outside the timing, export the last pass's canonical bitmap and 45 write the report. Print exactly one line on stdout, and only on success: 46 `