Repository navigation
mathlibs: GB10 xoshiro256** RNG and batched complex FFT from a seeded .om unit (audit rows 29, 30) - #147
Draft
aien-spark wants to merge 3 commits into
Draft
mathlibs: GB10 xoshiro256** RNG and batched complex FFT from a seeded .om unit (audit rows 29, 30)#147aien-spark wants to merge 3 commits into
aien-spark wants to merge 3 commits into
Conversation
… .om unit (audit rows 29, 30) om/mathlibs/mathlibs_ir.om emits the BlackwellIR records for the RNG (raw 64-bit, uniform and normal f32) and the radix-2 complex f32 FFT (4..2048 points, forward and inverse, any batch). src/omega_gpu_om_ir.c replays them through the register allocator and the .om sm_121 encoder; src/omega_gpu_mathlibs_api.c launches them. Both C files are MIGRATION-PENDING with named .om successors. Tests: tests/gpu_mathlibs_test.c (host, warp simulator, chip tiers) in HOST_TESTS as test-gpu-mathlibs. Streams are compared bit for bit with the aien-math fixture (tests/fixtures/mathlibs_rng_aienmath.txt, 792 rows); FFT errors against the Wolfram tolerances in evidence/MATHLIBS-RNG-FFT-2026-10-27/wolfram-constants.txt; mutants must be caught. tests/bw_warp_sim.h gains I2FP, MUFU.LG2, signed STG.E offsets and partial last warps; the sm_121 disassembler names MUFU.LG2 and IMAD.SHL like nvdisasm. Evidence: evidence/MATHLIBS-RNG-FFT-2026-10-27/ (one GB10 run, 268 checks PASS; nvdisasm agrees on all 36 kernels). Portability table, README, ROADMAP, PAIN_POINTS and the replacement map updated.
Collaborator
Author
|
Status update: CI checks have not executed on GitHub Actions for this PR head (0 check runs, formerly targeting merged branch |
# Conflicts: # Makefile # docs/runtime/portability_table.tsv # om/units.sh # src/omega_native.h # src/omega_om_units.c # src/omega_om_units.ident # tests/bw_warp_sim.h
| else if (!strcmp(argv[i], "--out") && i + 1 < argc) out = argv[++i]; | ||
| else { fprintf(stderr, "usage: %s [--host-only | --sim] [--fixture F] [--out FILE]\n", argv[0]); return 2; } | ||
| } | ||
| if (out && !(g_rcpt = fopen(out, "w"))) { fprintf(stderr, "cannot write %s\n", out); return 2; } |
drakestapleton
left a comment
Contributor
There was a problem hiding this comment.
Classification: needs-changes (draft).
- CodeQL fails on a25d7fe with a new high-severity alert at
tests/gpu_mathlibs_test.c:775(file created with mode 0666). Create it with 0600 viaopen(O_CREAT, 0600)+fdopen, as #170 did. make test-sm121disis NOT_RUN.- GB10 evidence is a single run (N=1), receipts in
evidence/MATHLIBS-RNG-FFT-2026-10-27/. Good, but not QUALIFIED as the body says.
To become merge-ready: clear CodeQL, run make test-sm121dis, mark ready for review; a second GB10 run would strengthen the chip claim.
drakestapleton
left a comment
Contributor
There was a problem hiding this comment.
Classification: needs-changes.
- CodeQL fails on a25d7fe: new high-severity alert at
tests/gpu_mathlibs_test.c:775(file created with mode 0666). Create it with mode 0600 (open + fdopen), as #170 did for its fixture writer. make test-sm121disis NOT_RUN per the status comment.- GB10 evidence exists (
evidence/MATHLIBS-RNG-FFT-2026-10-27/chip-receipt.txt, 268 checks PASS) but is a single run (N=1); a second chip run would support the stated tolerances. - Still draft.
- To become merge-ready: clear the CodeQL alert, run
make test-sm121dis, mark ready.
— Grokbot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audit rows 29 (cuFFT-class) and 30 (cuRAND-class). Status: EXERCISED on host, warp simulator and one GB10 run (N=1). Not QUALIFIED.
Evidence
make testCUDA++ HOST TESTS PASS (49 targets), includestest-gpu-mathlibsmake test-om-unitsPASS src/{omega_om_units.c,omega_native.h,omega_om_units.ident} regenerate byte for bytegpu_mathlibs_test --simmathlibs sim: PASS (429 checks)mathlibs chip: PASS (268 checks), hold 09:03:26Z to 09:03:44Zevidence/MATHLIBS-RNG-FFT-2026-10-27/chip-receipt.txt,chip-stdout.txt,chip-provenance.txtevidence/MATHLIBS-RNG-FFT-2026-10-27/nvdisasm-check.txtChip numbers, all from
chip-receipt.txt:rows_covered=792 of 792 comparisons=1683 mismatches=0; uniform 69632 values, 0 mismatches; normalworst_rel=3.411262e-07againsttol=2.87e-06; 8388608-value runs of kinds 1 and 2,bad=0.normwise_errunder its tolerance (worst 1.1323e-07 at N=2048 against 2.0946e-06); batch 2050 over 3 launches,normwise_err=1.0421e-07.evidence/MATHLIBS-RNG-FFT-2026-10-27/wolfram-constants.txt.Provenance:
chip-provenance.txtrecords the binary and source sha256s of the run. After the run,src/omega_gpu_mathlibs_api.cgained a comment only (the MIGRATION-PENDING note). The object built from it is byte-identical, and this head rebuilds the chip binary with the same sha256 (91b796c6...92de):evidence/MATHLIBS-RNG-FFT-2026-10-27/source-after-chip-run.txt.An earlier hold at 09:02:00Z failed 1 of 268 checks:
chip fixture: 1683 used of 792. That was a test bug. The fixture check counted overlapping comparisons instead of distinct rows. Every RNG, FFT and mutant line in that run had 0 mismatches. The check now counts distinct rows (fixture_distinct()), and the 09:03 run is the rerun.What is here
om/mathlibs/mathlibs_ir.om: seeded Omega unit that emits the BlackwellIR records for the xoshiro256** RNG (state = SplitMix64(base + g), raw 64-bit, uniform f32, normal f32) and the complex f32 FFT (Stockham radix 4, with one radix-2 stage first when log2 n is odd; one CTA of n/4 threads per transform; inverse not normalised, as in cuFFT). The first commit message says "radix-2"; the headersrc/omega_gpu_mathlibs_api.his the description to trust.src/omega_gpu_om_ir.{c,h}: replay of those records through the register allocator and encoder. MIGRATION-PENDING C.src/omega_gpu_mathlibs_api.{c,h}: launchers. The.cis MIGRATION-PENDING C; its successor isom/mathlibs/mathlibs_launch.omonce a seeded unit can call the session launch path through omega-bridge.tests/gpu_mathlibs_test.c: host, simulator and chip tiers;test-gpu-mathlibsis inHOST_TESTS.tests/bw_warp_sim.h: I2FP (s32 to f32), MUFU.LG2, signed STG.E immediate offsets, partial last warp.src/omega_sm121_disasm.c: MUFU.LG2 row; IMAD.SHL naming for every power of two, from an nvdisasm probe (imad-shl-probe.*).docs/runtime/portability_table.tsv: rows for the four newsrc/omega_gpu_*files. README, ROADMAP, PAIN_POINTS and the replacement map now say PARTIAL for cuFFT and cuRAND.Limits
NOT_RUN
make test-sm121dis:mk/c3.mk(thegpu_scan_testandgpu_gemm_testrules) is onmainbut not onom/encoder-cubin, so the corpus target cannot build on this base. The mathlibs kernels were checked with the nvdisasm script directly (row above).elapsed_nsvalues in the receipt are single launches and are not a benchmark.Base:
om/encoder-cubin(CUDApp#143). Pins: omega-mv e5b32567 (omc sha256 2c824805...029f), omega-bridge 431fff0a, aien-math 43c629d (fixture source).