vLLM-Moet
Frontier MoE models on RTX PRO 6000 / RTX 5090 (sm_120): DeepSeek-V4.1-Flash on 4x RTX PRO 6000, as a GPU+CPU hybrid on 4x RTX 5090, and 2-bit experts on vLLM v0.24.0
- 581
- Sass
- Apache-2.0
- 4 d ago
Open-source SM120 (Blackwell) SASS assembler — encode, schedule & assemble GPU machine code, including all tensor-core instructions.
Repo kacper-daftcode/cubit, read from GitHub 8 h ago. kacper-daftcode has not joined Take My Repo.
kacper-daftcode/cubit is a public repo on GitHub by kacper-daftcode. Open-source SM120 (Blackwell) SASS assembler — encode, schedule & assemble GPU machine code, including all tensor-core instructions. It declares the MIT license on GitHub. It is written mainly in Rust, has 15 stars and last changed on 2026-11-20. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
An assembler and disassembler for NVIDIA Blackwell SASS — the machine code of SM120 (RTX 50-series /
RTX PRO 6000), with tables for SM103a (B300), SM100a (B200) and SM121a (DGX Spark). It encodes SASS
text to 128-bit instruction words, decodes cubins back to text, rebuilds cubins byte for byte, and
assembles stand-alone kernels with their ELF metadata, without nvcc or ptxas. The instruction
tables come from blackwell-isa, measured against
NVIDIA's nvdisasm; the project's own hand-written SM120 kernels have run in production since
2026-06.
Coverage today (SM120, gated on every push; last 2026-11-06). The strict round trip — decode every word, print it,
re-parse the text, re-encode, compare all 128 bits — passes on 1 811 600 / 1 811 600 instructions
of the production kernel set it is gated on: 169 cubins of FlashInfer 0.7.2 (sparse-MLA, CAKE
DSV4.1, MXFP8 GEMM), b12x MoE and DeepGEMM SM120 kernels. The whole-cubin path
(disassemble --frozen → asm -T) reproduces all 157 of those cubins that contain code byte for
byte. Those numbers are the definition of "coverage" used here; what is not covered is listed in
docs/KNOWN_ISSUES.md.
Re-clone notice (2026-11-03). The repository history was rewritten once to remove a committed build directory (195 MB; see CHANGELOG 0.2.0). Clones and forks made before 2026-11-03 do not share history with
mainany more: re-clone instead of pulling.
git clone https://github.com/kacper-daftcode/cubit.git
cd cubit
cargo build --release # Rust 1.87 or newer; the ISA tables ship in tables/ (gzip, read in place)
./target/release/cubit --help
No CUDA toolkit is needed to assemble or disassemble. The optional checks against NVIDIA's tools
(cubit roundtrip, the probes under tools/probes/) use cuobjdump / nvdisasm from a CUDA 13
installation.
# Decode one instruction word (little-endian 128-bit hex) and encode text back
cubit decode 0x000fe200002000007780778068687832
cubit encode "HMUL2.BF16_V2 R104, R104, 5.19229685853482762853e+33, 5.19229685853482762853e+33 ;"
# Disassemble a cubin; --frozen keeps the compiler's schedule as [B:R:W:Y:S] prefixes and
# emits a self-contained .entry (registers, exact parameter layout, shared memory)
cubit disassemble kernel.cubin -k my_kernel
cubit disassemble --frozen kernel.cubin -o kernel.sass
# Rebuild the cubin from that text: byte-identical when nothing was changed
cubit asm -T kernel.cubin kernel.sass -o rebuilt.cubin && cmp kernel.cubin rebuilt.cubin
# Prove coverage on any cubin: every word must survive decode -> text -> encode
cubit roundtrip-strict kernel.cubin --report report.json --failures failures.jsonl
# Assemble a kernel written from scratch (directive format)
cat > add.sass <<'EOF'
.entry add_one
.reg R0-R7
.param ptr out
LDCU.64 UR4, c[0x0][0x358] ;
LDC.64 R2, c[0x0][0x380] ;
MOV R4, 0x1 ;
STG.E desc[UR4][R2.64], R4 ;
EXIT ;
.endentry
EOF
cubit asm add.sass -o add.cubin
Instruction syntax is NVIDIA's (nvdisasm output). On SM120 kernel parameters start at
c[0x0][0x380] (LDC / LDC.64), the global-memory descriptor for LDG/STG is loaded with
LDCU.64 URx, c[0x0][0x358]. The assembler schedules instructions it finds without a control code
(stalls, scoreboard barriers, yields, drains before back edges); a [B------:R-:W-:Y:S01] prefix
freezes the control code of that instruction. CUBIT_SB_SHARE=1 selects the scoreboard-sharing
colouring (counter semantics, ptxas's practice): bit-identical results on the 84 production MoE
kernels it was measured on and time-neutral there (+0.3 %), 1.6× on scoreboard-starved kernels such
as the sparse-MLA attention; it stays opt-in (KNOWN_ISSUES A13). With it, CUBIT_SB_LONG_KEEP=1 gives a
prefetch its scoreboard to itself (long loads on the top scoreboard, long store latches on the one below,
no short use shares either): without it a wait that belongs to something else drains the prefetch in the
middle of the compute it was issued to overlap. CUBIT_RB_CHAIN=1 adds the 2026-06
read-barrier chain on sub-word global loads; with CUBIT_SB_SHARE=1 it reproduces the shipped speed of
the MC4 MoE prefill kernels (K ≥ 4096) and costs 3–30 % on most others — a per-kernel switch, also
opt-in (KNOWN_ISSUES A19). CUBIT_MMA_SRC_RB=0 drops the read barrier cubit puts on an MMA for its
source fragments (ptxas sets none; measured 2026-11-06 on the 90 production kernels: bits identical,
time-neutral — the decision whether the rule stays the default is the owner's, KNOWN_ISSUES A22).
CUBIT_GUARDED_READER_SETTLES=1 lets the first reader of a load settle its write barrier guarded or not
(ptxas's practice; measured 2026-11-06: the 89 production MoE sources are byte-identical under it, V's
sparse-MLA kernel loses 6 prologue waits, bits identical, time within noise — opt-in, KNOWN_ISSUES A24).
CUBIT_WAIT_POLICY=1 (with CUBIT_SYNC_CLASSES=1) is those three switches and the wait placement that put
cubit's schedule of the served MoE consumer kernel's text at ptxas's on silicon: no word waits behind a young
result that it does not read (three clauses; opt-in, KNOWN_ISSUES A49), and a reader waits both guarded
producers that may have written its register (A50).
CUBIT_YIELD_HOLD=1 or 2 (with CUBIT_SYNC_CLASSES=1): outside the tensor loops a word of the fixed-latency
datapath that sets no barrier gives up the yield flag at a stall of 1 (or 1 and 2) — measured on the served FC1
and its r33 form as cubit schedules them, not ptxas's practice (opt-in, KNOWN_ISSUES A55).
CUBIT_YIELD_HOLD=1n or 2n: the same word gives the flag up only in the nests — the natural loops that hold no
tensor word, where the rule's whole gain stands: the schedule under 2n reads fc1 0.287 ± 0.011 % below ptxas's own
build of the served FC1 at 4 096 rows (both load orders; one card model, free of its power limit; opt-in,
KNOWN_ISSUES A56).
CUBIT_YIELD_HOLD_FRAME=1 (with CUBIT_YIELD_HOLD=1n or 2n): in the nests the same word gives the flag up also
where it came in with its own control word — the frame of a text that is scheduled in part. Under these two
switches, in the recipe of the record text (the vendor's control words on every word outside the stage loop, cubit's
schedule of that loop), FC2 reads 0.124 ± 0.018 % ahead of ptxas (the full form: both load orders, 4 096 rows; one
Server card, free of its power limit); on the default path and in cubit's own frame FC2 stays behind ptxas (opt-in,
KNOWN_ISSUES A58).
CUBIT_TENSOR_YIELD=holds (with CUBIT_SYNC_CLASSES=1): in a tensor loop every hold of the fixed-latency datapath
yields — a word at a stall of 3 to 11 that carries no flag, sets no barrier, waits on none and is not the first
reader behind a wait takes the yield flag; no stall, wait or barrier moves and no flag is taken off. Neither cubit's
scheduler nor ptxas writes it; a search on a card found it. In the recipe of the record text the served FC1 under
the switch reads 0.815 ± 0.011 % ahead of ptxas and the span of the call 0.421 ± 0.009 %, where the schedule
without it reads 0.306 ± 0.012 % and 0.142 ± 0.010 % (the full form: both load orders, 4 096 rows; one Server card,
free of its power limit; opt-in, KNOWN_ISSUES A60).
CUBIT_LOAD_COVER=1 (with CUBIT_WAIT_POLICY=1): the vendor's form of a shared-memory load — a load under the wait
of a younger shared load carries no barrier, and loads that find no scoreboard free stand as one set in front of one
wait, as his do. Without CUBIT_YIELD_HOLD_FRAME=1 cubit is still behind ptxas on FC2: the stage loop under the
switch inside the vendor's frame — the record text — reads fc2 0.054 ± 0.017 % above ptxas's own build of the served
FC2 at 4 096 rows, where the same frame with the loop under the policy alone and his load words carried over reads
0.190 ± 0.018 % above (both load orders; one card model, free of its power limit; opt-in, KNOWN_ISSUES A57).
CUBIT_CONST_ALONE=1: a constant load (LDC, LDCU; every width, guarded or not) shares no barrier with another
constant load while a scoreboard is free — a batch of them is taken apart where each load finds a scoreboard (or
goes back onto its neighbour's) and no other use loses its own, the vendor's form of these loads; loads that one
word reads first stay together, as his do. In cubit's own frame of the served FC2 nineteen of the 47 reads that wait
a scoreboard with more than one producer pending then wait their one producer. A card read that frame under the
switch: no difference in time against the same frame without it (−0.04 ± 0.16 µs a call at 4 096 rows; the short
form, one load order; one Server card, free of its power limit); the frame stands 4.6 % of FC2 behind ptxas with the
switch and without it (opt-in, KNOWN_ISSUES A59).
CUBIT_WAIT_DRAINED=head | paths (with CUBIT_WAIT_POLICY=1): the barrier allocator writes no wait on a scoreboard
that another wait has drained — head: no wait for a barrier of the round before behind the first wait of its own
round; paths: a wait on the first word of every path that needs it and nowhere behind it. A bit whose going would
let two results fly together that are no measured set stays; a hand-scheduled word and the word of an ordered
event are not touched. The rule's closing check walks the jump tables of the kernel's register-indirect branches
(cubit asm -T: the template's constant section; a dispatch whose table cannot be read keeps the waits of what
crosses it), and the rule leaves no rewrite of an operand in flight that the allocator's schedule did not have —
the path audit (CUBIT_HAZ) is its oracle (KNOWN_ISSUES A67). In cubit's own frame of FC2 without m-tile loops (fc2_kernel_ws<4,1>), 748 wait bits, head leaves 132 unwritten and
paths 238. First read on a card on 2026-11-18, on one card model (opt-in, KNOWN_ISSUES A63).
CUBIT_SB_KIND=narrow | wide (with CUBIT_WAIT_POLICY=1): a use takes its scoreboard by its kind — a read barrier
never the scoreboard of its own word's write barrier, the global loads from the top with loads of one form together;
wide: a read barrier joins the lowest scoreboard on which no global load flies, free or not. In cubit's own frame
of FC2 without m-tile loops (fc2_kernel_ws<4,1>) the read barriers stand 80 36 17 13 12 37 on scoreboards 0 … 5 without the switch and 187 0 0 0 2 6
under wide (the vendor: 121 43 8 8 17 1); with CUBIT_WAIT_DRAINED=paths beside it 478 wait bits stand where the
rule alone leaves 510 and the vendor's schedule has 458. A use of another kind that would lose a scoreboard sends the
uses that took it back, by trial; one line a kernel says which uses went back and which use is still without a
scoreboard of its own. First read on a card on 2026-11-18, on one card model (opt-in, KNOWN_ISSUES A65).
CUBIT_LOAD_TOP=1 (with CUBIT_WAIT_POLICY=1): the wait for the result of a global load stands at the top of the
loop that holds the load — on the branch that ends the block of the loop's header, where every path into the next
pass goes through — and not at the reader a few words behind it; a reader that a path reaches without that branch
keeps its wait, and behind the colouring such a load takes the scoreboard on which no word waits for something else
while it is in flight, where there is one. The rule rewrites no read-barrier use, but the colouring answers the new
flights and may give a read barrier another scoreboard than without the switch: a word of an ordered event that was
the first wait behind such a read barrier then waits its new number too, wherever a path still reaches the word with
no wait of that number in front of it (the mirror clause; CUBIT_DUMP_USES: one MIRROR line a bit). Loads that
wait at one top may then fly together on one write barrier in front of one wait: the
vendor's practice at such words, measured on two card models for two loads of the one form LDG.E.CONSTANT of one
thread on one write barrier, in five shapes; pairs of other forms, of more than two loads or further apart than 24
cycles are not measured, and this allocator's own batching rule says the opposite for loads of different address
streams; a build under the switch is a candidate only after its own text has been read on both card models (opt-in,
KNOWN_ISSUES A68).
CUBIT_SB_APART=1 (with CUBIT_WAIT_POLICY=1): a write-barrier use shares no scoreboard with a read barrier that
is pending over its flight. A scoreboard counts — a word that waits it stands until every result and every operand
read armed on it has come back — and under CUBIT_SB_KIND=wide a read barrier joins the low scoreboards without
keeping one busy, so a short producer behind it (S2R, POPC, a constant load) takes the same scoreboard and its
reader waits behind the operand read. Under the switch such a use moves, its setters and its waiters together, to
the lowest scoreboard on which nothing is in flight over its flight — never the scoreboard of a load that waits at
the top of its loop —, and the clause of CUBIT_LOAD_TOP takes no scoreboard on which a read barrier is pending
over the load's flight; where no scoreboard is free the use stays, and a use with a setter under a guard is left
alone. No use loses a setter or a waiter and no read barrier moves; a wait that was written goes only
where a wait of that scoreboard stands in front of the word on every path (the wait rule reads the new numbers).
Two kinds of bits stay on the scoreboard a use left, beside the new one: a word of an ordered event keeps the first
wait on a read barrier that keeps its number (CUBIT_DUMP_USES: one KEPT line a bit); and a waiter that is no
such word keeps its bit where the read barrier of a synchronisation word or a copy word that keeps the number is
pending on it and the word itself, or a word behind it in front of the next wait of that scoreboard, arms the
scoreboard — a second use would fly there beside that read barrier (one BESIDE line a bit). Any other wait that
stood in front of a word only because another use shared the scoreboard may go or come with the number; a build under the
switch is a candidate only after its own text has been read on both card models (opt-in, KNOWN_ISSUES A69).
CUBIT_SB_NEAR=1 (with CUBIT_WAIT_POLICY=1): in a loop that holds a copy word, no word waits for a use it
does not need when that use was armed a few words in front of it. Where the waits stand is written behind the
colouring, and there a word comes to wait a scoreboard a few words behind a setter whose use it neither reads
nor rewrites — the rewriter of a load's address register behind a register read, the reader of another load of
the batch, a branch that releases a far read barrier one word behind a copy word. Under the switch, at the end
of the allocation and on the fields as they stand, two kinds of uses in the innermost loop round an LDGSTS
whose first waiting word stands at most eight words behind the setter — the result of LDC, LDCU, S2R,
S2UR, CS2R or CS2UR under any such word, the read barrier of a copy word under the word of an ordered
event — take the lowest scoreboard that is empty over their flight: nothing pending there, nothing armed there,
no word that waits it but the words that need the use; never below the copy group's. A load of a batch leaves
the batch as a use of its own; the first word that needs the use on every path waits the new number, and the
registers of a moved copy word count the uniform register of its descriptor. No wait bit comes off and no
barrier comes or goes; where no scoreboard is empty the use stays, as does a use the author numbered or one
with a setter under a guard (CUBIT_DUMP_USES: one NEAR line a named use). The event word behind a moved
copy word keeps its bit and no longer waits the copy word's operand read, and the legaliser no longer asks the
arming distance between the two — the vendor's practice at such words, measured at one warp an SM on one card
model, no further. The switch needs neither CUBIT_LOAD_TOP nor CUBIT_SB_APART; a build under it is a
candidate only after its own text has been read on both card models (opt-in, KNOWN_ISSUES A70).
CUBIT_DUMP_COLOUR=1 prints the colouring of the scoreboards use by use (stderr, a look).
CUBIT_DUMP_STALL=1 (with CUBIT_SCHED2=1 CUBIT_SCHED2_LAT=<table>) prints why every stall field has the value it
has, one STALL line a word (stderr, a look; no byte changes): the requirement that is met exactly through the
word — a cell or a default of the latency table with its two words, a resource spacing, the arming distance, an
operand hold, the scoreboard simulation's distance (REQ) —, the first pass's own stall above every requirement
(FIRST), or a raise that nothing asks for any more (LEFT, with the floor the requirements would let it go to);
a word that no path of the flow graph reaches stands on no requirement and is named so (UNREACHED).
CUBIT_SCHED2=1 selects the dependency-aware stall model (a stall is charged where a consumer needs it, not
after every producer); with CUBIT_SCHED2_LAT=sm120 the latencies come from the pair table
tables/dep_latency_sm120.json (ptxas's practice, measured on sm_120 silicon) and hold on every control-flow
path, and CUBIT_MMA_PTXAS=1 replaces the MMA writeback drains by ptxas's issue distances. Measured on the
sparse-MLA attention kernel: bits identical, −15 % time (stall cycles −48 %). CUBIT_SCHED2_MEMSTALL=table (with
CUBIT_SCHED2 and the table; refused without) takes the first pass's own margins off the memory words — 4 behind
every load and store, 10 behind a load it takes for loop-carried — and leaves them to the table's rows (4 in front
of a memory word, as ptxas writes it); the landing rows in front of EXIT and the operand hold of an MMA, which
those margins had kept by accident, become requirements by name, and the retirement stall of a recycled barrier
(CUBIT_RECYCLE_DRAIN) stays only where the final allocation sets a barrier over producers in flight that are not a
measured set. On the attention kernel one pass of the loop goes from 3 134 to 2 804 static cycles
with every check clean — not measured on silicon yet (KNOWN_ISSUES A38). CUBIT_SCHED2_LOWER=1 (on top of
CUBIT_SCHED2_MEMSTALL=table; refused without) runs a pass behind the legaliser and the operand hold that takes back the stalls
no requirement asks for — the passes only raise, and a raise that a later one covers stayed: on the vendor's texts of a served
module one pass of the tensor loop goes from 1 399 / 826 / 1 326 to 1 319 / 805 / 1 289 static cycles (the vendor's own schedules:
1 309 / 792 / 1 262) with every check as before; the attention kernel has nothing to take back. Not measured on silicon (KNOWN_ISSUES A46).
CUBIT_SCHED2_PACE=tensor (with the legaliser; refused without) sets one floor in front of it: in a tensor loop a word
whose opcode is IADD3, LEA, LOP3, PRMT or SHF stands at a stall of 2 at least in front of another word of the
five — the vendor's pacing of that unit (507 of 507 places in his schedules of the served module, never 1). The
legaliser then has less to hold in front of a reader: in the recipe of the record text 439 of the 443 stall counts of
the served FC1's tensor loop are those of the vendor's schedule as far as cubit's table allows it (a text made by hand
that carries his own stall count on 388 of the 443 words; the build carries it on 384), and no word outside the loop
moves. Under the switch the served FC1 reads 5.24 ± 0.12 µs a call below the record text (the short form: one load
order, 4 096 rows; one Server card, free of its power limit — a ranking); with CUBIT_TENSOR_YIELD=holds beside it
the build reads 1.375 ± 0.011 % ahead of ptxas and the span of the call 0.733 ± 0.009 % (the full form: both load
orders, 4 096 rows; the same card; opt-in, KNOWN_ISSUES A61). All of these are opt-in and for
sm_120, and the table is a cubit asm feature: cubit::assemble and the Python module do not honour
CUBIT_SCHED2_LAT (they have no legaliser behind the passes; under plain CUBIT_SCHED2 they run the
scoreboard arming rule). They are certified on hand-written kernels: cubit asm names the instructions whose
results or reads the dependency model does not see (ptxas's predicate-result LOP3, uniform predicate
definitions, BRA.DIV, split 64-bit pairs) and CUBIT_SCHED2_STRICT=1 refuses a kernel that has one.
CUBIT_DEP_VERIFY=1 reports every fixed-latency dependency below the table on any path, also on a
frozen kernel (KNOWN_ISSUES A26; the harness and its results: tools/stallfloor/).
CUBIT_DEP_TABLE=<sm120 | sm120-silicon | path> names the table of the read-only checks (a frozen listing has no scheduler
switch to name it with), and sm120-silicon — there and in CUBIT_SCHED2_LAT — is the 'silicon' edition of the table: the
same table with a lower number in the entries that have silicon evidence on both card models
(tables/dep_latency_sm120_silicon.json, tools/stallfloor/silicon/). It is never read
unless named, and it has no entry yet: today it prices like the default table.
CUBIT_SYNC_CLASSES=1 gives the synchronisation words their control classes (mbarriers, bulk copies, the async-proxy
fence, the release / acquire chains, setmaxnreg, collective regions), completes the scheduler's operand model for the
forms nvcc emits (predicate destinations, the high half of a 64-bit address or operand, the operand hold of an MMA and of
the uniform datapath, F2F as a scoreboard result) and runs the barrier allocator and the latency legaliser on the control-flow graph of an nvcc
kernel without inserting an instruction — the switch under which a kernel of nvcc is scheduled from its plain
instruction text and assembled over ptxas's cubin (asm -T). Opt-in, sm_120, floors and laws measured on silicon; the two
served MoE kernels scheduled this way give identical bits, 16.7 % and 12.7 % slower than ptxas's schedule
(docs/SM120_ASYNC_IDIOMS.md, KNOWN_ISSUES A29).
CUBIT_VERIFY=1 runs the read-only scoreboard verifier on every kernel it
assembles (frozen or scheduled) and prints each unprotected RAW / broken WAR, and each store or asynchronous copy
(LDGSTS) whose registers are rewritten on some path of the flow graph with no wait on its read barrier (STORE PATH,
CUBIT_VERIFY_PATHS; a dispatch — BRX — is followed into every block only a register-indirect branch can reach, a
return ends the walk), and each register whose scoreboarded result is still pending when an instruction writes it again on
some path with no wait on the producer's write barrier (WRITE AFTER WRITE, CUBIT_VERIFY_WAW; writers under
complementary guards are no pair). Under CUBIT_SYNC_CLASSES the barrier allocator closes its own schedule under that
walk — such a writer waits (BUG-489; CUBIT_WAW_WAIT=1 does the same on the default path, which is otherwise byte for
byte what it was; CUBIT_WAW_WAIT=0 is the allocator as it was). And each source register of a warp shuffle that an
instruction rewrites on some path with none of the waits that release it — the shuffle's read barrier, its own write
barrier, a younger shuffle's write barrier (SHUFFLE SOURCE, CUBIT_VERIFY_SHFL; KNOWN_ISSUES A34). And each
register that a word reads through an operand slot with the operand-reuse flag (.reuse) and that is written on some
path before the next word that reads it through that slot, with the flag or without — that reader gets the old
content at every distance; a branch does not end the window, and the slot is the flag bit the table gives the
operand, not the position of its field (REUSE FLAG, CUBIT_VERIFY_REUSE; KNOWN_ISSUES A39). And, for an sm_120
kernel that holds a tensor instruction, the two laws of that instruction that no scoreboard carries: each general
register it reads that a fixed-latency word rewrites closer than 8 issue cycles behind it on some path, and each
BRA closer than 14 behind it (TENSOR HOLD, TENSOR LANDING and the count line CUBIT_VERIFY_TENSOR, printed
with or without a place; a walk of its own that asks neither the operand hold nor the landing rows of the
legaliser; KNOWN_ISSUES A66);
CUBIT_VERIFY_FLOW=1 adds a view of the PATHS beside the three counts: the simulation follows the text — also across a word that never
falls through, which on a kernel with out-of-line blocks reports what no execution has and misses what a forward branch
carries — and the view asks the same three questions of every path of the flow graph (CUBIT_VERIFY_FLOW: …, the object
flow of the JSON line; it also walks the uniform register of a store's address; KNOWN_ISSUES A43).
CUBIT_VERIFY_RBPROBE=1
adds the read-barrier coverage probe of the legality oracle (tools/sched_oracle.py, KNOWN_ISSUES A4).
CUBIT_VERIFY_JSON=<file> appends one JSON line per kernel with the counts of these three checks — the scoreboard
simulation, the stores' read barriers on every path, the fixed-latency dependencies against the table — and every
finding with its instruction indices (src/legality.rs, schema cubit-legality-1; a write-after-write pair and a
rewritten shuffle source are findings of kind waw / shfl-source in the scoreboard list, beside its three counts;
the operand-reuse flags are the object reuse of the line): a
tool that holds a candidate
schedule against its seed takes the set difference instead of parsing the text. It prints nothing, changes no byte and
does not need the other two variables.
cubit legality-diff <seed.jsonl> <candidate.jsonl> is that comparison: the findings of the candidate whose key the seed
does not have, and the findings both have that are closer in the candidate (a dependency with a smaller have, a store
whose overwriter stands at a smaller distance) — a candidate that takes a cycle off a pair its seed already reports keeps
every key. Exit code 0 only when there is neither.
| command | one line |
|---|---|
asm |
assemble a .sass file into a cubin; -T <cubin> rebuilds a template's ELF around the new code, --eiattr-from copies only its metadata |
disassemble |
cubin (or host ELF) → SASS text; --frozen for re-assemblable text with the exact schedule and .entry header |
roundtrip-strict |
the coverage proof: every 128-bit word of every code section must decode, print, re-parse and re-encode identically |
roundtrip |
the legacy round trip against cuobjdump as the reference disassembler |
encode / decode / asm-text |
one instruction or a block of text ↔ instruction words |
patch |
disassemble → re-encode → write a patched cubin |
ra, sched, render |
passes over .sass text: windowed register renaming / allocation (ra --mode full --target sm120: registers placed from zero on sm_120's grid, docs/RA_SYMBOLIC_REGISTERS.md), list scheduling under a cost model, re-printing from the parsed form |
stallfix |
raise stalls in hand-scheduled windows to measured silicon floors (sm_103a and SM120 rules; docs/SM120_STALLFIX_PLAN.md) |
merc-dump |
dump the Mercury (.nv.capmerc) companion sections |
info |
table statistics |
validate |
re-encode a harvest records file (needs a private records.jsonl; the public table check is tools/sync_table.py --validate-only) |
cubit <command> --help has the full option list. Errors are fail-closed: an instruction the
encoder cannot prove, a reserved control code, a .param layout that disagrees with a template's
metadata, or a register count that would change a template kernel's occupancy stop the run with a
message that names the fix (--allow-regcount-change, the declarations to use, …).
.entry <name>
.reg R0-R<n> # registers the code uses
.regcount <N> # optional: the exact EIATTR_REGCOUNT (what --frozen writes)
.param <type> <name> [offset=0x..] [space=N] [logalign=N]
# u8/u16/u32/u64/s*/f16/f32/f64, ptr (8-byte pointer), b8[N] (struct by value)
.shared [.align A] <name>[<bytes>]
<instructions, labels, optional [B:R:W:Y:S] control codes>
.endentry
A file may hold several .entry blocks; they become one multi-kernel cubin.
The four architecture tables published by blackwell-isa are vendored byte-exact under tables/ as
tables/<arch>.json.gz (gzip; 0.5–0.7 MB each instead of 24–33 MB of JSON) and pinned by revision
and SHA-256 of the decompressed JSON in tables/SOURCE.json. Nothing has to be unpacked: the loader
(cubit::table::read_table_bytes, used by the CLI, the Python bindings and the tests) reads
tables/sm120.json from the plain file when one exists and from tables/sm120.json.gz otherwise
(decompression ≈ 30 ms), and tools/tablefile.py does the same for the Python tools. To read the
JSON directly, python3 tools/sync_table.py --unpack writes the plain tables/<arch>.json files
(git-ignored). python3 tools/sync_table.py re-vendors from a blackwell-isa checkout and runs the
suite, --check decompresses and verifies the pins (CI; a stale unpacked copy is an error),
--validate-only checks structure, extraction vocabulary, provenance convention and the control-bit
ratchet. The tables are data, never edited here: fixes go to blackwell-isa (tools/probes/ holds
the measurements that produced the SM120 rows added since 2026-10). The canonical layout — compact JSON, one
encoding row per line, the provenance written once per level (row _src, key _src / _note, the family's
law in _meta.provenance.sources[<tag>].note) — is produced and checked by tools/tablefmt.py (--check,
--rewrite; row_src() / row_note() resolve a row's provenance); the probes write through it and
sync_table.py --validate-only refuses any other layout (2026-11-08: sm121a.json 87 → 33 MiB, GitHub's limit is 100 MiB).
| table | silicon | what the gate proves | not proved |
|---|---|---|---|
sm120.json |
RTX 5090 / RTX PRO 6000 (production kernels 2026-06..10; probe kernels 2026-11-02/03) | strict census 1 811 600 / 1 811 600 words, 157 / 157 cubins byte-identical through --frozen → asm -T, the suite's measured-form fixtures; the silicon laws below |
semantics of rows measured by encoding only (docs/KNOWN_ISSUES.md T6); 7 of 38 838 variants carry no _src at blackwell-isa 89dc967 — every one a documented owner item (the alias-able groups of four mixed keys and the 50-bit WARPSYNC.COLLECTIVE immediate; 111 of 38 866 at 7f12b68, 304 of 38 966 at 37d030f, 18 841 of 26 598 on 2026-11-06 — the T1 production line of 2026-11-06/08 measured them family by family, docs/KNOWN_ISSUES.md T1); their dynamic audit against nvdisasm closed at 0 rows on 2026-11-07 (the former IMMA.SF hypothesis is the measured QMMA.SF MXINT8 × MXINT8 variant, T5); the cuBLASLt sm_120 corpus on the GB10 host (92 543 words) has two decode holes left, UFFMA.SAT and a UIMNMX.U64 form (the 95 LDL.64 [R+UR+imm] holes and the MUFU UR-form field were closed 2026-11-04; T1, V3) |
sm103a.json |
B300 | the suite (encode/decode fixtures, stallfix rules, cost model); re-run 2026-11-03 on the B300 host cold-face-bounces-fin-02: 177 / 177 SM103a cubins of the publish corpus byte-identical through --frozen → asm -T (104 words carried as __raw__), strict semantic round trip 77 548 / 77 656 words (coldface's third pass at 52767f9, 2026-11-06; the whole 328-cubin corpus, copied to the build host and run in every gate since T-20 (2026-11-08): 85 721 / 85 792 words, 296 / 328 cubins strict-exact — 85 704 / 288 through the REDG, LDG.256 / STG.256, ISETP and FSETP batches of that day, + 3 words with the conversions / FP32 ALU batch (the I2F.U16 / FMUL.RZ holes closed), + 14 words and 8 cubins with the UIADD3 .64 groups (T-22); the 3 MOV probe-cubin words with text-inert bits are the last sm103a holes) — the refused words are fail-closed refusals of silicon-unsafe forms (BUG-080 guarded ATOMS, BUG-004 predicate form) plus 2 re-encode residues of text-inert bits (UMOV URd, 0x0 with a reuse bit; docs/KNOWN_ISSUES.md V1, V5) |
no silicon run of cubit-assembled SM103a kernels since 2026-09 |
sm100a.json |
B200 | encoding layer = SM103a + tcgen05 deltas; re-run 2026-11-03 on cold-face-bounces-fin-02: 99.924 % exact-minus-schedule on the archived 20 024 512-instruction sm_100 population (1 134 cubins with a vendor golden), 151 / 151 cub_100a cubins byte-identical through --frozen → asm -T, strict 8 108 / 8 136 words (third pass at 52767f9, 2026-11-06; 8 132 / 8 136 and 147 / 151 cubins strict-exact in T-20's local run of 2026-11-08; one text-inert-bit residue, I2F.S16 — V5) |
no B200 silicon run; scheduling data inherited; until 2026-11-03 cubit mis-read the sm_100a ELF flags as sm_10 (KNOWN_ISSUES A11) |
sm121a.json |
GB10 (DGX Spark) | the suite's GB10 fixtures; re-run 2026-11-04 on the GB10 host gx4 (the 2026-09 census script over the 648 992-instruction corpus, 91 927 unique words): 91 927 / 91 927 decode, text parity initially 99.59 % (373 differences). Closed to 100 % the same day (session T-4, two batches) and confirmed by the full re-run at the pushed revision (gx4, 2026-11-05, cubit 2ac57c0): 91 927 / 91 927 words decode, 1 text mismatch — LEPC, a PC-relative target the isolated-word census renders at address 0 (byte-identical in a full disassembly). Regression 2026-11-06 → 08: 564 signed FSETP words lost their decode when a measured-family decoder arm applied to every table while the sm121a harvest rows had no sign fields; closed 2026-11-08 (T-20) by measuring FSETP / DSETP on -b SM121 — 91 927 / 91 927 decode again, 1 text mismatch, strict re-encode 91 887 / 91 927 (the census now runs locally on the 91 927 unique words, tests/sm121a_fsetp_dsetp.rs pins the 2 688 family words); 91 926 / 91 927 re-encode since T-22 (91 910 after the conversions / FP32 ALU batch: the 23 FFMA immediate words carry their .reuse; 91 926 after the UIADD3 .64 groups were measured; the one left is BUG-037's alignment refusal of a cuBLASLt HMMA.1688.F32 word — tests/corpus_pins.rs). tests/sm121a_parity_20261104.rs; docs/KNOWN_ISSUES.md V3 |
timing / scheduling data; no cubit-assembled kernel executed on a GB10 |
Select a table with -t tables/<arch>.json (or the .json.gz path) or CUBIT_TABLE; the output
cubin's ELF flags follow the table.
SM120 laws measured on silicon (cubit-assembled probe kernels, driver-API launches, 2026-11-02 on an
RTX 5090 and 2026-11-03/04 on 4x NVIDIA RTX PRO 6000 Server Edition; re-measured 2026-11-05 on a second
SKU, 2x RTX 5090 / GB202 — every law below holds identically; logs under the session's T/gpu/ and
T/remote/rtx5090/):
CUDA_ERROR_ILLEGAL_INSTRUCTION), measured at 64 and 128 with
the safe pair as control. asm warns; kernels that reconfigure registers (USETMAXREG) are exempt.IMAD.WIDE pairs (BUG-008): the 4-operand form reads c as the 64-bit pair c:c+1 (nvcc's idiom),
the 5-operand PT form is the same, c = RZ zero-extends, and an odd c faults the launch — the
encoder refuses it and names the measurement.F2I words with a reuse bit set execute with the plain result although
nvdisasm 13.1 and 13.3 refuse to print them; cubit decodes them (nvdisasm is a text oracle).HMUL2 immediates multiply like the register form (identity, negation, .H1_H1 broadcast).stallfix: the measured dependency-path floors (tables/sm120.json, stallfix
section, rules v4; docs/SM120_STALLFIX_PLAN.md §4). The r2ur floor
was measured 2026-11-04 (silicon v3, warp-uniform kernels) at 4 (= the global floor); a predicate producer
directly followed by its @P guard consumer needs S13 (v4, 2026-11-05: the S12..S15 band measured,
S12 still wrong; the same law for a guarded branch); S00 behaves as a hardware interlock. The 26 v3
floors and the model checks are identical on GB202.ARRIVES.LDGSTSBAR.64.ARVCNT arrives with
cp.async.mbarrier.arrive.noinc semantics (the form without .ARVCNT is net-neutral), UTMASTG.2D [smem, x, y], [tensor map] stores the tensor-map box at the coordinates, and LDSM.U4x16P64TO8.M816.2
gives lane l the four U4 elements of row l/4, columns 4·(l mod 4)..+3 of matrix m in Rd+m
(zero-extended to bytes; Rd+2/Rd+3 untouched).cuModuleLoad on it, 580.x drivers load it (docs/KNOWN_ISSUES.md A14)..EL descriptor-pair atomics (NEEDS 28, 2026-11-05 on the RTX PRO 6000): ATOMG.E.<op>.EL.STRONG.GPU Pd, Rd, desc[URm][Rn.64], Rb (bits 63 + 76) executes, lands at the 64-bit descriptor address (> 4 GiB) and
returns the old value like nvcc's non-EL pair — the 2026-03 "silent U32 downcast" was a mis-keyed table row,
since rebuilt and pinned (KNOWN_ISSUES A15).Rd of an
ATOM*/ATOMG/ATOMS Pd, Rd, … form that is not covered by the atomic's write barrier reads garbage
(0xac0799b5 for the expected 0x100); the scheduler tracks the destination, the address and the data of
the family since (A17)..nv.shared is the whole per-CTA allocation (BUG-483, 2026-11-05/06): a 1 KB over-declaration crossed the
32 KB carveout step at 4 CTAs/SM and made the L1-bound MC4 MoE kernels 1.4–2.0× slower; the section is sized
exactly now (A18).-b SM103 names IADD.XOR
computes a+b+c on sm_120 silicon — IADD.XOR is an sm103a / sm100a row only; the sm120 rows keep the bit
outside their masks.ILLEGAL_INSTRUCTION; the encoder refuses such text
(nvdisasm prints it).LDC.64, CS2R, LDSM, LDCU.64, the data of a wide
shared store, the address pair of a global load or store, the pairs of IADD.64. 23 of 23 off-grid probe kernels end
the launch with 715; cubit asm refuses such a kernel on sm_120 (CUBIT_ALLOW_OFF_GRID=1 for a probe generator; the
word-level cubit encode is not guarded).CUBIT_RB_CHAIN=1 + CUBIT_SB_SHARE=1 reproduce the 2026-06 speed of mc4_k4096 /
mc4_k6144 (1.38× → 1.01×, 1.61× → 0.96× of the shipped time) and cost 3–30 % on 57 of the other 79 kernels
(A19 — per-kernel switches, the default is the owner's NEEDS 31); CUBIT_MMA_SRC_RB=0 changes no bit and no
measurable time (C/B median 1.000; V's sparse-MLA kernel 1 055 → 1 054 µs) — the MMA-source read barriers are
free on this set and stay on (A22, NEEDS 38); CUBIT_GUARDED_READER_SETTLES=1 changes no MoE source and
removes 6 prologue waits from V's kernel (bits identical, time within the run-to-run band — A24, NEEDS 37).
Bits identical in every arm.python3 -m venv .venv && . .venv/bin/activate
pip install maturin && pip install -e . # builds the native extension (verified on Python 3.12, 2026-11-02)
import cubit
lo, hi = cubit.encode("IADD3 R5, PT, PT, R9, R4, R5 ;", addr=0)
info = cubit.decode(lo, hi, addr=0) # key, mod_group, fields ...
code, n = cubit.asm(" EXIT ;\n", addr=0) # bytes, instruction count
insns = cubit.decode_kernel("kernel.cubin", "my_kernel")
cubit.select_table("sm103a") # per-process table switch
See docs/PYTHON_API_ARCH_SELECT.md.
bugNNN files are the encoder's executable specification)setmaxnreg and votes as ptxas lowers and schedules them on sm_120a, with the measured laws and the scheduler's open itemscubit ra --target sm120 guarantees, the register grid of sm_120src/ the crate (library + `cubit` binary)
tables/ vendored ISA tables (four architectures, gzip: 2.3 MB; 108 MB of JSON unpacked) + SOURCE.json pins
tests/ 468 test files (one binary each); tests/fixtures/ = nvdisasm fixtures of measured forms (< 1 MB)
tools/ sync_table.py (vendoring gate), tablefmt.py (canonical table layout), asm_roundtrip.py, audit_table.py, audit_dynamic.py,
gen_tests_index.py, check_public_surface.sh, probes/ (measurements)
examples/ SASS kernels with host harnesses (QMMA GEMV, pipelined MMA, IMMA U8, sparse GEMV),
audit_manifest / audit_words / recheck_failures example binaries
test_data/ one SASS source used by the examples' tests
docs/ see above
nvdisasm names a
word, not what the hardware does with it. Rows measured in 2026-10/11 without execution are
listed in KNOWN_ISSUES T6.stallfix rules are measured for sm_103a (v3, 2026-11-07 .. -11 on B300: 42 paths,
docs/POSTFIX103_STALLFIX.md; the pass writes no S12..S15 there) and SM120 (v4,
2026-11-03/05: the v3 floors + the S12..S15 guard band); the SM120 R2UR boundary floor was measured 2026-11-04
(silicon v3) at 4.asm -T) copies the template's metadata; a kernel whose registers, shared
memory or parameters differ from the template needs a standalone build or a matching template.python3 tools/test_suite.py --release runs the ~470 test binaries in parallel and finishes in about
2 minutes on 16 cores (2026-11-06; the same passed / failed / ignored totals as cargo test); plain cargo test --release
runs them one after another in about 12 minutes (parsed tables are cached per process from their second load on).disassemble --frozen →
asm -T); re-assembling its .sass source with a newer cubit is a regeneration whose control codes
follow the current allocator (KNOWN_ISSUES A20).MIT — see LICENSE.
kacper-daftcode/cubit is a public repo on GitHub by kacper-daftcode. Open-source SM120 (Blackwell) SASS assembler — encode, schedule & assemble GPU machine code, including all tensor-core instructions.
It declares the MIT license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-11-20. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Reverse-engineered instruction set architecture database for NVIDIA SM120 (Blackwell) GPUs.
Qwen3.6/3.8-27B on one RTX 5090: 576K pooled context across 12 sessions at FP8-level quality from 5.75 bpw. EXL3 trellis weights, 4-bit trellis-coded KV, MTP spec-decode, paged batching, hand-written SM120 kernels, OpenAI API.
PCIe P2P on consumer RTX 5090 via one GSP firmware registry key — no driver patches.

Surgical uncensoring of large language models via Optimal Transport activation hooks