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/aien-yardsticks/blob/main/yardsticks/prime-drag-race-cuda/README.md # aien-yardsticks aien-dev/aien-yardsticks 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 `aien-yardsticks / yardsticks / prime-drag-race-cuda / README.md` 30 lines ยท 1988 bytes Raw Blame History Rendered 1 # prime-drag-race-cuda 2 3 An outside CUDA yardstick for the AIEN Prime Drag Race (a prime sieve speed contest). It runs the same 4 algorithm as the AIEN native GPU kernel, written in CUDA, so the two can be compared fairly on the same 5 GB10 chip. It is a yardstick only: it lives outside AIEN and nothing here ships in AIEN. 6 7 ## What it does 8 Each thread owns one 32-bit word of the answer and loops over the odd base primes up to sqrt(limit). No 9 atomics. The host builds the base primes and their division constants, copies them over, launches, then 10 copies the whole result back to host memory (the copy is counted in every pass, because the result must be 11 host-readable). Labels match the native kernel: algorithm=other, faithful=no, bits=1, environment 12 linux-hosted-gb10-cuda. Kernel-only time (cudaEvents) is a diagnostic in the report, not the score. 13 14 The 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, 16 this repo's commit, the nvcc version and the flags inside the binary. 17 18 ## Upstream relation 19 Upstream PrimeCUDA/solution_2 (PlummersSoftwareLLC/Primes, pinned `a2899c96752b65ac1b08a0e1418ab7e708040ed0`) 20 splits the work differently. It is reference reading only and was not copied. This program is NONCONFORMING 21 for 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 25 Needs 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 30 Limit 1,000,000 must give 78,498 primes. Limits above 2^33-2 are refused (32-bit indices).