omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / seed / kflow / specs / tmatmul16.spec
| 1 | # tmatmul16.spec -- 16x16x16 tile matmul (f16 in, f32 accumulate) on sm_121 HMMA.16816.F32, OmegaTile (L3). |
| 2 | # Run from the omega-mv root: build/kflow/kflow seed/kflow/specs/tmatmul16.spec STATE |
| 3 | # Harness tmm1: A, B random normal f16 (exponents -5..5), D compared with an f64 CPU reference within |
| 4 | # |d - ref| <= 1966085 * 2^-40 * sum_k |a_ik b_kj| (gamma_15 for u = 2^-23, rounded up; seed/kflow/README.md). |
| 5 | tool asm2 seed/rung2/asm2.bin |
| 6 | tool nvdisasm /usr/local/cuda/bin/nvdisasm |
| 7 | tool cuobjdump /usr/local/cuda/bin/cuobjdump |
| 8 | tool kemu build/kflow/kemu |
| 9 | tool kpack build/kflow/kpack |
| 10 | |
| 11 | job tmm 121 seed/sm121/sm121.tbl seed/kflow/sm121/tmatmul16.s2 - tmm1 48 p8 p8 p8 |
| 12 | expect encode VALID-UNPROVEN |
| 13 | expect verify VALID-UNPROVEN |
| 14 | expect package VALID-UNPROVEN |
| 15 | expect emulate VALID-UNPROVEN |
| 16 | expect gpu NOT_RUN |
| 17 | expect cloud NOT_RUN |
| 18 | expect job VALID-UNPROVEN |
| 19 | |
| 20 | # negative control 1: the HMMA type field flipped in the table (f16 -> bf16, w2 bit 18): nvdisasm prints |
| 21 | # HMMA.16816.F32.BF16, which is not the intent text, so verify is INVALID and the job stops |
| 22 | tsub hmma.f16.2 0x00001800 0x00041800 |
| 23 | job tmmbf 121 seed/sm121/sm121.tbl seed/kflow/sm121/tmatmul16.s2 - tmm1 48 p8 p8 p8 |
| 24 | expect encode VALID-UNPROVEN |
| 25 | expect verify INVALID |
| 26 | expect package NOT_RUN |
| 27 | expect emulate NOT_RUN |
| 28 | expect job INVALID |
| 29 | |
| 30 | # negative control 1b: the same flipped bit with the intent texts ignored: the decode check can no longer |
| 31 | # object (INCOMPLETE), so the emulator must catch it on its own |
| 32 | nointent |
| 33 | tsub hmma.f16.2 0x00001800 0x00041800 |
| 34 | job tmmbfe 121 seed/sm121/sm121.tbl seed/kflow/sm121/tmatmul16.s2 - tmm1 48 p8 p8 p8 |
| 35 | expect verify INCOMPLETE |
| 36 | expect package VALID-UNPROVEN |
| 37 | expect emulate INVALID |
| 38 | expect job INVALID |
| 39 | |
| 40 | # negative control 2: the same bytes, but the harness lays B out transposed in memory (the reference stays |
| 41 | # A x B): the decode check passes and the emulator comparison must fail |
| 42 | job tmmt 121 seed/sm121/sm121.tbl seed/kflow/sm121/tmatmul16.s2 - tmmt 48 p8 p8 p8 |
| 43 | expect verify VALID-UNPROVEN |
| 44 | expect package VALID-UNPROVEN |
| 45 | expect emulate INVALID |
| 46 | expect job INVALID |