interplane.Get Omega
Read in your language

sovereign-intelligence

Front door to Drake Stapleton's sovereign stack.

Brought by drakestapleton

branch main Branches Tags History

sovereign-intelligence / gpu / cuda-crack / isa / README.md

59 lines · 4361 bytes Raw Blame History Source

isa/: sm_121 (GB10) encoding tables

sm121-forms.txt is generated by gen/run.sh: the Omega program gen/isa.om is compiled together with my Omega encoder gen/bw_enc_sm121.om (CUDApp b774723f, sha256 fe16b024c3242d12c7c8ef759d84c34a22c7d21cba676cd987f4f3a1ff56ba86) by the pinned omc (sha256 3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194). Two runs give the same file, sha256 587d81e2bc8b3dc6fdb48d477a76b717300732ccdb984f05f5b3df658e58e2d7.

How the tables are derived

For every IR op 0..63 and every selector (which operands are present, uniform flag, guard predicate), the generator encodes one base instruction, then flips one input bit at a time: each bit of the destination and three source register numbers, the uniform register, the 32-bit immediate and the barrier register. It compares the 96 instruction bits of words 0..2. Word 3 is the scheduling control word and is kept whole.

Format

All numbers are decimal. Words are 32-bit, little-endian in memory; bit n of the 128-bit instruction is bit n mod 32 of word n / 32.

F id op sel fix0 fix1 fix2 msk0 msk1 msk2 ctl
D id field m0 m1 m2 start width

An instruction belongs to a form when its bits outside the form's mask equal the form's fixed bits.

Check

check/check.sh checks the table in two stages.

1. The D records are checked against the F records. For each form:

The table has 859 D records: 845 have width > 0 and 14 have width 0.

2. The 70 kernels that ran on the GB10 (E2/E3) are rebuilt from this file alone. For each instruction, the check finds the first form that explains it, then writes three things: the form's fixed bits, the instruction's operand-field bits and its control word. All 70 rebuilt kernels match the sha256 list recorded on the chip run (kernels-om.sha256).

There are four negative controls, and each must fail:

The output is in check/CHECK.txt.

What the check proves:

What it does not prove: how the 14 width 0 fields transform their input, for example a branch offset or a sign extension. That transform lives in the encoder source (gen/bw_enc_sm121.om). Regenerating the table (gen/run.sh && git diff --exit-code isa/) shows that the whole file, D records included, is what the encoder produces.

Known limit

The encoder honours guard predicates only on BRA, EXIT, BAR and one store. So sel bits 6 and 7 change the encoding only for ops 22, 45, 46, 54 and 55. The tables reflect the encoder as it is; they do not add predicates it does not emit.