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 / om / gpu / dsv41 / mma / mma_fp4_s2.om

175 lines · 6116 bytes Raw Blame History
1note Fixed SM121a instruction stream calibrated against the included PTX oracle.
2om2
3fn ins a ulong b ulong to void
4buf = new uchar 16 0
5for i ulong 8
6put buf i uchar and shr a mul i 8 255
7put buf add 8 i uchar and shr b mul i 8 255
8end
9if ne write 1 buf 0 16 16
10exit 4
11end
12end
13fn main to int
14note LDC R1, c[0x0][0x37c] ;
15ins 0x0000df00ff017b82 0x000fe20000000800
16note S2R R12, SR_LANEID ;
17ins 0x00000000000c7919 0x000e2e0000000000
18note LDC R16, c[0x0][0x3a8] ;
19ins 0x0000ea00ff107b82 0x000e620000000800
20note LDCU.128 UR8, c[0x0][0x380] ;
21ins 0x00007000ff0877ac 0x000ea20008000c00
22note MOV R19, RZ ;
23ins 0x000000ff00137202 0x000fe20000000f00
24note S2R R0, SR_CTAID.X ;
25ins 0x0000000000007919 0x000ee20000002500
26note LDCU.64 UR6, c[0x0][0x358] ;
27ins 0x00006b00ff0677ac 0x000f280008000a00
28note S2UR UR5, SR_CTAID.Y ;
29ins 0x00000000000579c3 0x000e620000002600
30note UMOV UR4, URZ ;
31ins 0x000000ff00047c82 0x000fce0008000000
32note LDC.64 R2, c[0x0][0x398] ;
33ins 0x0000e600ff027b82 0x000f700000000a00
34note LDC.64 R20, c[0x0][0x390] ;
35ins 0x0000e400ff147b82 0x000f220000000a00
36note SHF.R.U32.HI R13, RZ, 0x2, R12 ;
37ins 0x00000002ff0d7819 0x001fe2000001160c
38note IMAD R15, R16, UR5, RZ ;
39ins 0x00000005100f7c24 0x002fe2000f8e02ff
40note LOP3.LUT R12, R12, 0x3, RZ, 0xc0, !PT ;
41ins 0x000000030c0c7812 0x000fc600078ec0ff
42note IMAD R5, R0, 0x8, R13 ;
43ins 0x0000000800057824 0x008fe400078e020d
44note IMAD R14, R12, 0x4, R15 ;
45ins 0x000000040c0e7824 0x000fe200078e020f
46note MOV R15, RZ ;
47ins 0x000000ff000f7202 0x000fe20000000f00
48note IMAD R7, R5, R16, RZ ;
49ins 0x0000001005077224 0x000fe200078e02ff
50note SHF.R.U32.HI R16, RZ, 0x5, R16 ;
51ins 0x00000005ff107819 0x000fc60000011610
52note IMAD R7, R12, 0x4, R7 ;
53ins 0x000000040c077824 0x000fe200078e0207
54note IADD.64 R14, R14, UR8 ;
55ins 0x000000080e0e7c35 0x004fe4000f8e0200
56note IMAD.WIDE.U32 R2, R5, R16, R2 ;
57ins 0x0000001005027225 0x020fe200078e0002
58note CS2R R4, SRZ ;
59ins 0x0000000000047805 0x000fe2000001ff00
60note SHF.R.U32.HI R18, RZ, 0x1, R7 ;
61ins 0x00000001ff127819 0x000fe20000011607
62note CS2R R6, SRZ ;
63ins 0x0000000000067805 0x000fe2000001ff00
64note IMAD.WIDE.U32 R20, R16, UR5, R20 ;
65ins 0x0000000510147c25 0x010fc6000f8e0014
66note IADD.64 R18, R18, UR10 ;
67ins 0x0000000a12127c35 0x000fd0000f8e0200
68note LDG.E.U16 R9, desc[UR6][R18.64] ;
69ins 0x0000000612097981 0x000ea8000c1e1500
70note LDG.E.U16 R23, desc[UR6][R18.64+0x8] ;
71ins 0x0000080612177981 0x0000e8000c1e1500
72note LDG.E R8, desc[UR6][R14.64] ;
73ins 0x000000060e087981 0x000f28000c1e1900
74note LDG.E R10, desc[UR6][R14.64+0x10] ;
75ins 0x000010060e0a7981 0x000368000c1e1900
76note LDG.E.U8 R17, desc[UR6][R20.64] ;
77ins 0x0000000614117981 0x000368000c1e1100
78note LDG.E.U8 R22, desc[UR6][R2.64] ;
79ins 0x0000000602167981 0x000362000c1e1100
80note UIADD3 UR4, UPT, UPT, UR4, 0x1, URZ ;
81ins 0x0000000104047890 0x000fe2000fffe0ff
82note IADD.64 R18, R18, 0x10 ;
83ins 0x0000001012127835 0x001fc400078e0200
84note IADD.64 R14, R14, 0x20 ;
85ins 0x000000200e0e7835 0x002fe400078e0200
86note IADD.64 R20, R20, 0x1 ;
87ins 0x0000000114147835 0x000fe400078e0200
88note ISETP.LE.U32.AND P0, PT, R16, UR4, PT ;
89ins 0x0000000410007c0c 0x000fe2000bf03070
90note IADD.64 R2, R2, 0x1 ;
91ins 0x0000000102027835 0x000fc600078e0200
92note LOP3.LUT R11, R9.reuse, 0xf, RZ, 0xc0, !PT ;
93ins 0x0000000f090b7812 0x044fe400078ec0ff
94note LOP3.LUT R24, R9, 0xf0, RZ, 0xc0, !PT ;
95ins 0x000000f009187812 0x000fe400078ec0ff
96note LOP3.LUT R25, R23.reuse, 0xf, RZ, 0xc0, !PT ;
97ins 0x0000000f17197812 0x048fe400078ec0ff
98note LOP3.LUT R26, R23, 0xf0, RZ, 0xc0, !PT ;
99ins 0x000000f0171a7812 0x000fe200078ec0ff
100note IMAD R11, R24, 0x10, R11 ;
101ins 0x00000010180b7824 0x000fe200078e020b
102note LOP3.LUT R24, R9, 0xf00, RZ, 0xc0, !PT ;
103ins 0x00000f0009187812 0x000fc600078ec0ff
104note IMAD R25, R26, 0x10, R25 ;
105ins 0x000000101a197824 0x000fe200078e0219
106note LOP3.LUT R26, R23, 0xf00, RZ, 0xc0, !PT ;
107ins 0x00000f00171a7812 0x000fe200078ec0ff
108note IMAD R11, R24, 0x100, R11 ;
109ins 0x00000100180b7824 0x000fe200078e020b
110note LOP3.LUT R24, R9, 0xf000, RZ, 0xc0, !PT ;
111ins 0x0000f00009187812 0x000fe200078ec0ff
112note MOV R9, R8 ;
113ins 0x0000000800097202 0x010fe40000000f00
114note IMAD R25, R26, 0x100, R25 ;
115ins 0x000001001a197824 0x000fe200078e0219
116note LOP3.LUT R26, R23, 0xf000, RZ, 0xc0, !PT ;
117ins 0x0000f000171a7812 0x000fe200078ec0ff
118note IMAD R24, R24, 0x1000, R11 ;
119ins 0x0000100018187824 0x000fe200078e020b
120note MOV R11, R10 ;
121ins 0x0000000a000b7202 0x020fc60000000f00
122note IMAD R25, R26, 0x1000, R25 ;
123ins 0x000010001a197824 0x000fe400078e0219
124note IMAD.SHL.U32 R24, R24, 0x4, RZ ;
125ins 0x0000000418187824 0x000fe400078e00ff
126note IMAD.SHL.U32 R25, R25, 0x4, RZ ;
127ins 0x0000000419197824 0x000fce00078e00ff
128note QMMA.SF.16832.F32.E4M3.E2M1.E8 R4, R8, R24, R4, R17, R22, URZ ;
129ins 0x716011180804747a 0x000fe2000020be04
130note NOP ;
131ins 0x0000000000007918 0x000fda0000000000
132note @!P0 BRA 0x1b0 ;
133ins 0xfffffffc007c8947 0x000fde000383ffff
134note ISETP.NE.U32.AND P0, PT, R13, RZ, PT ;
135ins 0x000000ff0d00720c 0x000fda0003f05070
136note @P0 EXIT ;
137ins 0x000000000000094d 0x000fea0003800000
138note LDC R7, c[0x0][0x370] ;
139ins 0x0000dc00ff077b82 0x000e300000000800
140note LDC.64 R2, c[0x0][0x3a0] ;
141ins 0x0000e800ff027b82 0x000e620000000a00
142note IMAD R7, R7, UR5, R0 ;
143ins 0x0000000507077c24 0x001fc8000f8e0200
144note IMAD R7, R7, 0x4, R12 ;
145ins 0x0000000407077824 0x000fc800078e020c
146note IMAD.SHL.U32 R7, R7, 0x2, RZ ;
147ins 0x0000000207077824 0x000fc800078e00ff
148note IMAD.WIDE.U32 R2, R7, 0x4, R2 ;
149ins 0x0000000407027825 0x002fca00078e0002
150note STG.E.64 desc[UR6][R2.64], R4 ;
151ins 0x0000000402007986 0x000fe2000c101b06
152note EXIT ;
153ins 0x000000000000794d 0x000fea0003800000
154note BRA 0x460;
155ins 0xfffffffc00fc7947 0x000fc0000383ffff
156note NOP;
157ins 0x0000000000007918 0x000fc00000000000
158note NOP;
159ins 0x0000000000007918 0x000fc00000000000
160note NOP;
161ins 0x0000000000007918 0x000fc00000000000
162note NOP;
163ins 0x0000000000007918 0x000fc00000000000
164note NOP;
165ins 0x0000000000007918 0x000fc00000000000
166note NOP;
167ins 0x0000000000007918 0x000fc00000000000
168note NOP;
169ins 0x0000000000007918 0x000fc00000000000
170note NOP;
171ins 0x0000000000007918 0x000fc00000000000
172note NOP;
173ins 0x0000000000007918 0x000fc00000000000
174ret 0
175end