interplane.Get Omega
Read in your language

aien-yardsticks

aien-dev/aien-yardsticks

Brought by drakestapleton

branch main Branches Tags History

aien-yardsticks / yardsticks / prime-drag-race-cuda / README.md

30 lines · 1988 bytes Raw Blame History Rendered
1# prime-drag-race-cuda
2
3An outside CUDA yardstick for the AIEN Prime Drag Race (a prime sieve speed contest). It runs the same
4algorithm as the AIEN native GPU kernel, written in CUDA, so the two can be compared fairly on the same
5GB10 chip. It is a yardstick only: it lives outside AIEN and nothing here ships in AIEN.
6
7## What it does
8Each thread owns one 32-bit word of the answer and loops over the odd base primes up to sqrt(limit). No
9atomics. The host builds the base primes and their division constants, copies them over, launches, then
10copies the whole result back to host memory (the copy is counted in every pass, because the result must be
11host-readable). Labels match the native kernel: algorithm=other, faithful=no, bits=1, environment
12linux-hosted-gb10-cuda. Kernel-only time (cudaEvents) is a diagnostic in the report, not the score.
13
14The command line, timing loop, report and bitmap export come from the shared protocol in omega
15(`bench/prime_race/prime_race_impl.{h,c}`). This repo does not copy it. The build records the omega commit,
16this repo's commit, the nvcc version and the flags inside the binary.
17
18## Upstream relation
19Upstream PrimeCUDA/solution_2 (PlummersSoftwareLLC/Primes, pinned a2899c96752b65ac1b08a0e1418ab7e708040ed0)
20splits the work differently. It is reference reading only and was not copied. This program is NONCONFORMING
21for upstream submission (different algorithm split, shared protocol harness).
22
23## Build (compile only, safe anywhere with nvcc)
24 make OMEGA_DIR=/path/to/omega-checkout
25Needs nvcc at /usr/local/cuda/bin (13.0 tested) and `-arch=sm_121` (GB10). Override with `ARCH=...` or `NVCC=...`.
26
27## Run (uses the GPU: only inside a quiet-flag window)
28 build/prime-race-cuda-mirror --limit 1000000 --min-seconds 5 --report-out r.json --bitmap-out b.bin
29 build/prime-race-cuda-mirror --limit 1000000 --audit-passes 5 --bitmap-out audit.bin
30Limit 1,000,000 must give 78,498 primes. Limits above 2^33-2 are refused (32-bit indices).