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 / sm80 / resadd.s2

196 lines · 4090 bytes Raw Blame History
1; resadd.s2 -- Qwen3 decode residual add x[i] += a[i] (f32, 2048 values, one CTA of 256 threads, 8 per
2; thread) for sm_80, written by hand for asm2 with seed/sm80/sm80.tbl. Ported from CUDA++'s sm_121 RES ADD
3; (omega_blackwell_codegen_dec.h, RES words; the asm2 listing dec_k2_mo1_s256_m0.s2) with the dead loads
4; of w/nw/y/eps/scale dropped. Parameters keep CUDA++'s constant bank 0: x 0x380, a 0x388, w 0x390,
5; nw 0x398, y 0x3a0, eps 0x3a8, scale 0x3ac. ULDC is not needed: loads and stores use [R.64] with URZ.
6; Each ";=" line is the instruction text expected from nvdisasm -b SM80 for the next instruction
7; (kflow's intent check). Control words (c stall yield write-sb read-sb wait-mask reuse) are MODELED:
8; scoreboards 0/1 (LDC), 2 (S2R), 3 and 5 (loads, x then a), 4 (load address reads), 0 (store reads).
9; The first prediction of the memory texts said LDG.E.128/STG.E [R.64]; nvdisasm 13.0 prints order 7 as
10; .STRONG.GPU and the URZ address term, the same as NAK's vecadd. The intent lines were corrected to that.
11; Not run on any sm_80 GPU (NOT_RUN); the host emulator kemu is the only behaviour check.
12;= LDC.64 R2, c[0x0][0x380]
13ldc.0 7 2 255
14cb.1 0x380 0
15ldc.2 5 0
16c 1 1 0 7 0 0
17;= LDC.64 R4, c[0x0][0x388]
18ldc.0 7 4 255
19cb.1 0x388 0
20ldc.2 5 0
21c 1 1 1 7 0 0
22;= S2R R6, SR_TID.X
23s2r.0 7 6
24z.1
25s2r.2 0x21
26c 1 1 2 7 0 0
27;= MOV R7, 0x1
28mov.i.0 7 7
29n.1 1
30mov.2 15
31c 1 1 7 7 0 0
32;= IMAD.SHL.U32 R8, R6, 0x20, RZ
33imad.i.0 7 8 6
34n.1 32
35imad.2 255 0
36c 4 1 7 7 4 0
37;= IMAD.WIDE.U32 R10, R8, 0x1, R2
38imadw.i.0 7 10 8
39n.1 1
40imad.2 2 0
41c 4 1 7 7 1 0
42;= LDG.E.128.STRONG.GPU R12, [R10.64+URZ]
43ldg.0 7 12 10
44ldg.1 63 0
45ldg.2 0 1 6 7 1 1
46c 1 1 3 4 0 0
47;= LDG.E.128.STRONG.GPU R16, [R10.64+URZ+0x10]
48ldg.0 7 16 10
49ldg.1 63 16
50ldg.2 0 1 6 7 1 1
51c 1 1 3 4 0 0
52;= IMAD.WIDE.U32 R10, R8, 0x1, R4
53imadw.i.0 7 10 8
54n.1 1
55imad.2 4 0
56c 4 1 7 7 18 0
57;= LDG.E.128.STRONG.GPU R20, [R10.64+URZ]
58ldg.0 7 20 10
59ldg.1 63 0
60ldg.2 0 1 6 7 1 1
61c 1 1 5 7 0 0
62;= LDG.E.128.STRONG.GPU R24, [R10.64+URZ+0x10]
63ldg.0 7 24 10
64ldg.1 63 16
65ldg.2 0 1 6 7 1 1
66c 1 1 5 7 0 0
67;= FADD R12, R12, R20
68fadd.0 7 12 12
69r.1 20
70fadd.2 0 0 0
71c 4 1 7 7 40 0
72;= FADD R13, R13, R21
73fadd.0 7 13 13
74r.1 21
75fadd.2 0 0 0
76c 4 1 7 7 0 0
77;= FADD R14, R14, R22
78fadd.0 7 14 14
79r.1 22
80fadd.2 0 0 0
81c 4 1 7 7 0 0
82;= FADD R15, R15, R23
83fadd.0 7 15 15
84r.1 23
85fadd.2 0 0 0
86c 4 1 7 7 0 0
87;= FADD R16, R16, R24
88fadd.0 7 16 16
89r.1 24
90fadd.2 0 0 0
91c 4 1 7 7 0 0
92;= FADD R17, R17, R25
93fadd.0 7 17 17
94r.1 25
95fadd.2 0 0 0
96c 4 1 7 7 0 0
97;= FADD R18, R18, R26
98fadd.0 7 18 18
99r.1 26
100fadd.2 0 0 0
101c 4 1 7 7 0 0
102;= FADD R19, R19, R27
103fadd.0 7 19 19
104r.1 27
105fadd.2 0 0 0
106c 4 1 7 7 0 0
107;= IMAD.WIDE.U32 R4, R8, 0x1, R2
108imadw.i.0 7 4 8
109n.1 1
110imad.2 2 0
111c 4 1 7 7 0 0
112;= STG.E.STRONG.GPU [R4.64+URZ], R12
113stg.0 7 4
114stg.1 12 0
115stg.2 63 1 4 7 1 1
116c 2 1 7 0 0 0
117;= IMAD.WIDE.U32 R4, R7, 0x4, R4
118imadw.i.0 7 4 7
119n.1 4
120imad.2 4 0
121c 4 1 7 7 1 0
122;= STG.E.STRONG.GPU [R4.64+URZ], R13
123stg.0 7 4
124stg.1 13 0
125stg.2 63 1 4 7 1 1
126c 2 1 7 0 0 0
127;= IMAD.WIDE.U32 R4, R7, 0x4, R4
128imadw.i.0 7 4 7
129n.1 4
130imad.2 4 0
131c 4 1 7 7 1 0
132;= STG.E.STRONG.GPU [R4.64+URZ], R14
133stg.0 7 4
134stg.1 14 0
135stg.2 63 1 4 7 1 1
136c 2 1 7 0 0 0
137;= IMAD.WIDE.U32 R4, R7, 0x4, R4
138imadw.i.0 7 4 7
139n.1 4
140imad.2 4 0
141c 4 1 7 7 1 0
142;= STG.E.STRONG.GPU [R4.64+URZ], R15
143stg.0 7 4
144stg.1 15 0
145stg.2 63 1 4 7 1 1
146c 2 1 7 0 0 0
147;= IMAD.WIDE.U32 R4, R7, 0x4, R4
148imadw.i.0 7 4 7
149n.1 4
150imad.2 4 0
151c 4 1 7 7 1 0
152;= STG.E.STRONG.GPU [R4.64+URZ], R16
153stg.0 7 4
154stg.1 16 0
155stg.2 63 1 4 7 1 1
156c 2 1 7 0 0 0
157;= IMAD.WIDE.U32 R4, R7, 0x4, R4
158imadw.i.0 7 4 7
159n.1 4
160imad.2 4 0
161c 4 1 7 7 1 0
162;= STG.E.STRONG.GPU [R4.64+URZ], R17
163stg.0 7 4
164stg.1 17 0
165stg.2 63 1 4 7 1 1
166c 2 1 7 0 0 0
167;= IMAD.WIDE.U32 R4, R7, 0x4, R4
168imadw.i.0 7 4 7
169n.1 4
170imad.2 4 0
171c 4 1 7 7 1 0
172;= STG.E.STRONG.GPU [R4.64+URZ], R18
173stg.0 7 4
174stg.1 18 0
175stg.2 63 1 4 7 1 1
176c 2 1 7 0 0 0
177;= IMAD.WIDE.U32 R4, R7, 0x4, R4
178imadw.i.0 7 4 7
179n.1 4
180imad.2 4 0
181c 4 1 7 7 1 0
182;= STG.E.STRONG.GPU [R4.64+URZ], R19
183stg.0 7 4
184stg.1 19 0
185stg.2 63 1 4 7 1 1
186c 2 1 7 0 0 0
187;= EXIT
188exit.0 7
189z.1
190exit.2
191c 5 1 7 7 1 0
192;= BRA 0x240
193bra.0 7
194bra.1 0x0fffffff
195bra.2 -1 7
196c 0 0 7 7 0 0