interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / evidence / ldg-offset-20261107 / README.md

48 lines · 3921 bytes Raw Blame History Source

LDG.E byte offset: the seeded encoder dropped it (2026-11-07)

Status: HOST_TESTED. Not chip-tested in this change.

Defect

At main b774723f537cec16a359fe082b8100317a5b5490, om/encoder/bw_enc_sm121.om encoded op 11 (BW_IR_LDG_E) as w1 = ureg and ignored imm. The C oracle bw_c_encode_insn (src/omega_blackwell_codegen.c:408) writes w1 = ureg | (imm & 0xffffff) << 8 and refuses offsets outside the signed 24-bit field, as the .om encoder already did for LDG.E.64 / LDG.E.128 / STG.E. CUDAPP_ENCODER=om is the default, so every LDG.E with a nonzero offset loaded from offset 0. Producer: src/omega_blackwell_codegen_tern.c:283 (ldg32 at r * row_bytes + d * step_bytes), so tern weight rows other than the first read the first row's words.

How it was found

CUDApp's own corpus diff build (CUDAPP_ENCODER=diff, tools/sm121dis/corpus.sh) aborts in bw_hazard_test: ENCODER DIFF: .om and C encoders disagree (program, 310 insns) after 3264 SAME encodes (corpus-before-main-b774723f.log, corpus-before-difflog-summary.txt). A referee instrument that applies the C oracle to captured encoder inputs names the two instructions: insns 41 and 171, op 11, imm 0x40, C w1 0x00004004, .om w1 0x00000004 (corpus-before-encref-diffs.txt). The inputs were captured with a link-time wrap of omega_bw_enc_sm121. Both instruments (encref.c, ngcap.c) are handwritten C, so they are not in this repository (desk review of b056bf7e); they are kept outside it as labeled instruments, history b056bf7e:evidence/ldg-offset-20261107/.

Oracles (independent, never shipped)

Change

Results (Linux AArch64, DGX Spark, core 1)

CheckBefore (main binding)After
make test-om-encoder-ldg (.om gate)main's encoder: rc 11, row 1 (+0x40) wrong (ldg-gate-before-main.log)PASS 5 exact words, 4 refusals, oracle decodes 5; 3 red checks (ldg-gate.log)
make test-om-encodern/agolden instructions and fixture programs byte-identical; red check aborts (test-om-encoder.log)
make test-om-encoder-mutants3 mutants3/3 red (mutants.log)
make test-om-unitsn/aPASS (units.log)
make test-om-encoder-corpus (corpus diff build)aborts in bw_hazard_test after 3264 SAME3191 distinct kernels identical .om vs C; diff build 4495 program encodes and 398 single-instruction encodes, all SAME (corpus-after.log, exit 0)
freestanding C pathn/aPASS, 14 fixtures, 0 failing checks