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 / tools / sm121dis / README.md

137 lines · 10626 bytes Raw Blame History Source

sm121dis: Omega's own GB10 disassembler

A disassembler turns the GPU's machine code back into readable instructions. Omega used to borrow NVIDIA's nvdisasm for that, in every check that reads a kernel back. sm121dis is my own (row C6 of docs/OMEGA.md): the decoder is seeded Omega, om/disasm/sm121_dis.om, lowered by the pinned omega-bridge into src/cudapp_om_sm121_dis.c (om/units.sh, byte for byte); src/omega_sm121_disasm.c only moves the bytes and copies the text. The hand-written C decoder that came first stays in that file behind CUDAPP_MIGRATION_PENDING_C_DISASM, as the differential oracle (make CUDAPP_DISASM=om|c|diff; CUDA++ C6, DRA-475). This folder holds the command line and the comparison with NVIDIA's tool.

What it proves

How to run it

make test-sm121dis            # collect, compare with nvdisasm, then the red check
make test-sm121dis-opmove     # BlackwellIR ops 64..79 against nvdisasm 13.0.85, with three red checks
make test-sm121dis-om-mutants # three .om decoder mutants must each change the corpus text
make test-om-disasm           # no NVIDIA tool: 11 golden words and .om vs C on every row, with two red checks
make test-om-disasm-mutants   # four .om decoder mutants must each fail the .om vs C differential
make test-disasm-words        # word assembly and EXIT padding (src/cudapp_om_words.c) against its C oracle

test-sm121dis-om-mutants, test-om-disasm-mutants and test-disasm-words need the pinned OMEGA_OMC and OMEGA_BRIDGE, like om/units.sh; test-sm121dis-om-mutants reads the corpus test-sm121dis collected. test-sm121dis-opmove needs the pinned OMEGA_OMC and refuses any nvdisasm other than 13.0.85.

nvdisasm is used only here, as the reference to compare against. Nothing it prints goes into a kernel.

Who uses it

The checks that used to call nvdisasm now call mine:

The script and target names are kept so older receipts still line up. make test-zero-nvdisasm proves that none of these checks runs nvdisasm.

Files

FileJob
sm121dis.ccommand line: a listing, -b SM121 (called like nvdisasm), --pairs (for the comparison), --version
corpus.shruns every GPU test with OMEGA_KERNEL_DUMP_DIR set, so each kernel the library encodes is saved
check.shcompares my text with nvdisasm's for every saved kernel, SM121DIS_JOBS at a time (default: every CPU the process may use); PASS only when every word agrees
oracle_pairs.shturns nvdisasm's listing into the same one-line-per-word form
negctl.shORACLE harness: the flipped-bit negative control of the comparison
om_mutants.shthree .om decoder mutants through the pinned compiler and bridge; each must change the corpus text
om_vs_c.shthe .om decoder (default build) against the C decoder (CUDAPP_DISASM=c build) on a folder of kernels, --pairs text byte for byte; no make target calls it yet
oracle-allow.tsvthe declared oracle lines the ZERO-NVDISASM static check accepts, each with its reason

Exact MMIO semantic contract (issue #171)

BW_IR_LDG_MMIO promises LDG.E.MMIO.GPU, not the historical encoder's EF cache policy. make test-sm121-mmio OMEGA_MV=/path/to/pinned/omega concatenates the production encoder with om/encoder/mmio_test.om. The Omega fixture emits one instruction and checks NVIDIA nvdisasm 13.0.85's exact mnemonic and register, descriptor and address operands. It then emits an otherwise identical EF mutant; the same Omega expectation must refuse it with exit status 4. The seeded compiler SHA-256 remains pinned; the oracle's version and binary SHA-256 are recorded. Neither decoder output nor mutant bytes enter production.

This tests an IR semantic promise, unlike a decoder-only comparison that can agree about the wrong instruction. Existing golden receipts are not rewritten. Before/after corpus identities record any emitted-kernel byte impact separately. GB10 cache behavior and device execution remain NOT_RUN; no live model is rebuilt, replaced, or deployed by this check.

The recorded pre/post comparison at base e84326dca9f1ef9afbeaf249fb3e46ae0a2517f7 has 773 identical existing SASS kernels and four identical captured cubins (including a copied bundle used for manifest-tampering controls). The complete before/after SHA-256 maps and empty changed-kernel/artifact lists are in evidence/CUDAPP-SM121-MMIO/corpus-impact.json, bound to exact source, generated binding and NVIDIA oracle identities. The existing producer corpus does not exercise op21; the new single-op fixture does. The generated encoder and host library bytes change as expected, but no deployed artifact is rebuilt or loaded. Corpus equality is not cache-behavior or device qualification.

The final canonical replay uses baseline c6977b4906229fe83f41103b7eff65b64a0986d6 and corrected implementation 3c163287d27b6e5a5f5b90c15b61ac83d8f26e2d. Its complete inventories, commands, logs, source identities and review are under evidence/CUDAPP-SM121-MMIO/c697-final-host/. All 773 existing SASS kernels and all four captured cubins remain byte-identical. Both artifact captures pass all 47 checks. Exact-op and wrong-EF controls, canonical-baseline refusal, binding regeneration, golden encoder parity and specification checks pass with the canonical bridge pin 0c4cb9ff980af278890b231b994eaede4dc7621c. The original corpus-impact.json remains immutable historical evidence, not the canonical replay. The complete host suite and device execution are not claimed by this targeted replay. The review is a source review, not independent hardware qualification.