interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / seed / kflow / specs / tmatmul16.spec

46 lines · 2048 bytes Raw Blame History
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).
5tool asm2 seed/rung2/asm2.bin
6tool nvdisasm /usr/local/cuda/bin/nvdisasm
7tool cuobjdump /usr/local/cuda/bin/cuobjdump
8tool kemu build/kflow/kemu
9tool kpack build/kflow/kpack
10
11job tmm 121 seed/sm121/sm121.tbl seed/kflow/sm121/tmatmul16.s2 - tmm1 48 p8 p8 p8
12expect encode VALID-UNPROVEN
13expect verify VALID-UNPROVEN
14expect package VALID-UNPROVEN
15expect emulate VALID-UNPROVEN
16expect gpu NOT_RUN
17expect cloud NOT_RUN
18expect 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
22tsub hmma.f16.2 0x00001800 0x00041800
23job tmmbf 121 seed/sm121/sm121.tbl seed/kflow/sm121/tmatmul16.s2 - tmm1 48 p8 p8 p8
24expect encode VALID-UNPROVEN
25expect verify INVALID
26expect package NOT_RUN
27expect emulate NOT_RUN
28expect 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
32nointent
33tsub hmma.f16.2 0x00001800 0x00041800
34job tmmbfe 121 seed/sm121/sm121.tbl seed/kflow/sm121/tmatmul16.s2 - tmm1 48 p8 p8 p8
35expect verify INCOMPLETE
36expect package VALID-UNPROVEN
37expect emulate INVALID
38expect 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
42job tmmt 121 seed/sm121/sm121.tbl seed/kflow/sm121/tmatmul16.s2 - tmmt 48 p8 p8 p8
43expect verify VALID-UNPROVEN
44expect package VALID-UNPROVEN
45expect emulate INVALID
46expect job INVALID