Independent review of R5 (native SHFL.BFLY / F2FP.BF16 entries, patch step removed, f32 global atomic add). Reviewed head 4a83e43e in a fresh clone; CPU only, nothing run on the GPU.
Blockers
None found.
Should-fix
- A missing destination encodes R0, not RZ, for the new atomic.
src/omega_blackwell_codegen.c:265mapsdst_vreg < 0to physical 0, and the new case atsrc/omega_blackwell_codegen.c:532-538uses thatdstunchanged. I encodedBW_IR_ATOMG_ADD_F32_STRONG_SYSwithdst_vreg = -1and nvdisasm givesATOMG.E.ADD.F32.FTZ.RN.STRONG.SYS PT, R0, desc[UR6][R2.64], R3, so the old value silently overwrites whatever lives in R0. The integer twin has the same latent problem (pre-existing), but this entry is pitched at gradient accumulation where callers will usually want to discard the old value. Fix: in this case emit0xff(RZ) wheninsn->dst_vreg < 0, and add a fixture row withd = -1. The fixture's existing RZ row passesd = 255through the identity map, so it doesn't test this path. Scope and order are fixed at STRONG.SYS without saying why, and the header suggests dW use.
src/omega_blackwell_codegen.h:108-111. The bits are right: order field 77..80 = 0xa matches Mesaset_mem_order(Strong(System)), and I decoded the .GPU variant (0x0c1ef306) too. For dW accumulation into device memory read by a later launch, nvcc'satomicAddemits the GPU-scope, no-return form (RED). SYS scope is only needed when the CPU or another agent watches the word during the kernel. The 2 M adds/s inprobe.logwas measured on GPU-uncached host-visible memory, with every thread on one address, under SYS scope. It is not a training-path figure and not a hardware ceiling. Please add one line saying SYS is for host-visible words and that a.GPU/RED variant will be added (and measured against the ceiling) before the trainer uses this op.The probe evidence names a commit that doesn't exist on GitHub.
evidence/R5-ATOMF32-PROBE-29ef3cb6-20261016T0226Z/probe.log:1sayscommit 29ef3cb6. That commit is not in this PR's history andgit fetch origin 29ef3cb6fails (it is probably the pre-rebase commit). SHA256SUMS verify, but nothing ties the chip run to the code under review. Either record which PR commit has the samesrc/andtests/tree (for example withgit rev-parse <commit>^{tree}on both), or re-run the probe on the head.CI covers the new golden words but not the new simulator semantics.
test-codegen-freestanding(gpu-engine lane, path filter matchesomega_blackwell_codegen) runs both new fixtures.gpu_atomf32_probe_test --host-only(Makefile:2551) is not in any workflow, so the FTZ add model attests/bw_warp_sim_tc.h:200and the BFLY/F2FP simulator cases are only run by hand. The othergpu_*_test --host-onlybinaries have the same gap, so this is pre-existing. Adding this one to a host lane is cheap: the build plus run took seconds here.
Nits
src/omega_blackwell_codegen.c:1004: "mode .DOWN 1 -> .BFLY 3". Mesa NAKOpShflencodes bits 58..59 as Idx 0, Up 1, Down 2, Bfly 3. The word arithmetic (set bit 58) is correct; only the "1" in the comment is wrong.src/omega_blackwell_codegen.c:1038-1041: Mesa ranges are half-open, so the float op field87..91is bits 87..90 (Add 0, Min 2, Max 4). Bit 90, which this entry sets fordesc[], falls inside Mesa's op field, so Mesa's map and the emitted word disagree. nvdisasm and the chip are the authority here (I confirmed that setting bit 88 decodes as.MINand bit 90 keeps.ADD). Please say in the comment that the desc bit contradicts Mesa's field and was settled by the decoder.tests/gpu_atomf32_probe_test.c:87,109-113: the subnormal case passes trivially if the atomic does nothing (the word stays 0 and the returned values are 0). It is only meaningful after cases 0 and 1 have passed in the same process, and--cases 2on its own would pass vacuously. Refuse--casesorders that put 2 before 0, or seed the word with a normal value for that case.tests/gpu_atomf32_probe_test.c:4-7: every partial sum is exact, so.RNis never exercised. One case whose sum must round, for example 2^24 + 1.0 with round-half-even, would pin the rounding mode the comment claims.
Verification done
- Bit fields vs sources. I read Mesa NAK
sm70_encode.rsat a08a0b9. ATOMG f32: opcode 0x9a3; type 73..76 = 9 (.ftz); order 77..80 = 0xa; pred-dst 81..83 = PT; eviction 84..86 = 1 (Normal); bit 63 = Ra.64; bit 91 = UR form. All match the emitted words except bit 90 (see nit). SHFL: bits 53..57 lane, c 40..52 = 0x1f, pred-dst PT, mode 58..59 = 3. F2FP: opcode 0x23e, RZ in 64..71, rounding 79..80 = RN. The F2FP and SHFL golden words match the sealedevidence/OWN30B-T3-TC-PEAK-BW-5faa0f70-20261013T2236Z/fa_ops.sass(lines 21-48). - Decoder round-trip (nvdisasm 13.0 -b SM121, my own encodes). SHFL.BFLY for all 32 lanes with varied registers, F2FP with R254/RZ/R128, and ATOMG f32 with R17/R40/R99/UR12 all decode to the intended text. I also decoded flipped bits: clearing bit 90 gives
[R2.64+UR6]; bit 88 gives.MIN; type 0x59 gives.RNwithout FTZ; order 0xf3 gives.GPU. Thenvdisasm_decode.txtlines match. - Hardcoded fields. Guard predicate PT, address offset 0, eviction Normal and scope SYS are fixed. Each is acceptable for this entry if documented (should-fix 2). The register, UR and lane fields are all operands.
- Byte identity, re-run independently. I wrote my own harness (not the author's) and built it against
main(8edeab5e) and this PR, both with the pinned physics at 6d7cf0d. It encodes the way the runtime loads code (encode_into, thenomega_tc_patch_codeon main only, thenomega_qmma_patch_code) and hashes each kernel with sha256. It enumerated 71,912 kernels: prefill attention 40, tc2 61,440, pq 192, qgemm 10,240. My grid is wider than the author's (two n values for tc2, four wait values for qgemm). Old tree with the patch vs this PR: 0 differ. Negative control, old tree without the patch: 35,988 differ (tc2 30,720, i.e. exactly the SWIGLU half; qgemm 5,120; pq 128; prefill attention 20, i.e. the modes with placeholders). The control is meaningful, and its split matches where the emitters are actually used. - Removed patch step. On main,
omega_tc_patch_codehad exactly three callers (omega_gpu_prefill.c:94,omega_gpu_prefill_attn_api.c:138,165), and all three are gone. No references remain toOMEGA_TC_MARK_*,omega_tc_patch_*or the placeholder counts outside sealed evidence. The test-side users of the tc2, pq, qgemm and prefill-attention generators are simulator-only, so no path ran unpatched before. The QMMA patch is untouched. - Host tests (CPU).
test-codegen-freestandingPASS (14 fixtures, includes both new ones).--host-onlyPASS for gpu_prefill_attn_test (69 checks), gpu_tcgemm_test, gpu_pfgemm_test, gpu_qgemm_test and gpu_atomf32_probe_test. - Evidence. The folder exists, SHA256SUMS verify, and
probe.logshows 5/5 PASS with the numbers in the PR body. The wrong-answer control can really fail: integer adds of 0x3f800000 across 2^17 threads wrap to 0, and the check reports 131,054 faults. The probe aborts if the control is not caught (tests/gpu_atomf32_probe_test.c:118-119). - Build-system bug (stale
m16_native.o/nvrm.o). This PR does not touch it. The cause isMakefile:104-108: the objects depend on$(PHYSICS_DIR)/...by path, so pointing PHYSICS_DIR at a different checkout whose sources are older than the existing.odoes not rebuild them, andcheck-physics-lockchecks the directory, not what built the objects. It should be a separate issue, for example stamping the physics commit intobuild/and making these objects depend on the stamp. I found no existing issue for it. - CI at review time. 28 checks passed, about 30 were still queued or running, none had failed.
Reviewed by an independent Claude Opus 5.5 reviewer for the orchestrator.