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 / gpu / nvidia / om / codegen / cg_pf.om

189 lines · 3190 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Successor of omega_blackwell_codegen_pf.c. Command tape replayed by omega_gpu_om_ir_replay.
3note Record is 8 words: op, dst, src1, src2, src3, ureg, imm | control << 32, flags.
4note c is 0 for the byte oracle and 1 for the mutant (the closing EXIT and BRA are dropped).
5note Words are the C builder's emit() output (omega_blackwell_codegen_pf_copy_prog_c), not a recomputed schedule.
6
7const ALL ulong 18446744073709551615
8
9fn w ins edit ulong 8192 i ulong v ulong to void
10put ins i v
11end
12
13fn opw ins edit ulong 8192 n ulong op ulong to void
14w ins mul n 8 op
15end
16
17fn dst ins edit ulong 8192 n ulong v ulong to void
18w ins add mul n 8 1 v
19end
20
21fn s1 ins edit ulong 8192 n ulong v ulong to void
22w ins add mul n 8 2 v
23end
24
25fn s2 ins edit ulong 8192 n ulong v ulong to void
26w ins add mul n 8 3 v
27end
28
29fn s3 ins edit ulong 8192 n ulong v ulong to void
30w ins add mul n 8 4 v
31end
32
33fn uv ins edit ulong 8192 n ulong v ulong to void
34w ins add mul n 8 5 v
35end
36
37fn pk ins edit ulong 8192 n ulong imm ulong ctl ulong to void
38w ins add mul n 8 6 or imm shl ctl 32
39end
40
41fn fl ins edit ulong 8192 n ulong v ulong to void
42w ins add mul n 8 7 v
43end
44
45fn z ins edit ulong 8192 n ulong to void
46s1 ins n ALL
47s2 ins n ALL
48s3 ins n ALL
49uv ins n ALL
50fl ins n 0
51end
52
53fn cg_pf_copy kind ulong a ulong b ulong c ulong ins edit ulong 8192 meta edit ulong 512 to int
54if ne kind 0
55ret 1
56end
57if or ne a 0 ne b 0
58ret 1
59end
60if gt c 1
61ret 1
62end
63put meta 1 7
64put meta 2 1
65put meta 64 2
66put meta 65 2
67put meta 66 1
68put meta 67 1
69put meta 68 1
70put meta 69 1
71put meta 70 4
72put meta 320 2
73opw ins 0 7
74dst ins 0 0
75z ins 0
76pk ins 0 856 960512
77fl ins 0 1
78opw ins 1 5
79dst ins 1 0
80z ins 1
81pk ins 1 896 4335616
82opw ins 2 5
83dst ins 2 1
84z ins 2
85pk ins 2 904 3287040
86opw ins 3 4
87dst ins 3 2
88z ins 3
89pk ins 3 912 3287040
90opw ins 4 3
91dst ins 4 3
92z ins 4
93pk ins 4 33 3287040
94opw ins 5 3
95dst ins 5 4
96z ins 5
97pk ins 5 37 3287040
98opw ins 6 8
99dst ins 6 5
100s1 ins 6 4
101s2 ins 6 ALL
102s3 ins 6 3
103uv ins 6 ALL
104pk ins 6 256 4180992
105fl ins 6 0
106opw ins 7 28
107dst ins 7 ALL
108s1 ins 7 5
109s2 ins 7 2
110s3 ins 7 ALL
111uv ins 7 ALL
112pk ins 7 0 1039360
113fl ins 7 0
114opw ins 8 45
115dst ins 8 ALL
116z ins 8
117pk ins 8 0 1034752
118fl ins 8 2
119opw ins 9 9
120dst ins 9 1
121s1 ins 9 5
122s2 ins 9 ALL
123s3 ins 9 1
124uv ins 9 ALL
125pk ins 9 16 1035264
126fl ins 9 0
127opw ins 10 9
128dst ins 10 0
129s1 ins 10 5
130s2 ins 10 ALL
131s3 ins 10 0
132uv ins 10 ALL
133pk ins 10 16 1035264
134fl ins 10 0
135opw ins 11 57
136dst ins 11 6
137s1 ins 11 1
138s2 ins 11 ALL
139s3 ins 11 ALL
140uv ins 11 0
141pk ins 11 0 141312
142fl ins 11 0
143opw ins 12 12
144dst ins 12 ALL
145s1 ins 12 0
146s2 ins 12 6
147s3 ins 12 ALL
148uv ins 12 0
149pk ins 12 0 3401728
150fl ins 12 0
151opw ins 13 12
152dst ins 13 ALL
153s1 ins 13 0
154s2 ins 13 6
155s3 ins 13 ALL
156uv ins 13 0
157pk ins 13 4 2353152
158fl ins 13 4294967296
159opw ins 14 12
160dst ins 14 ALL
161s1 ins 14 0
162s2 ins 14 6
163s3 ins 14 ALL
164uv ins 14 0
165pk ins 14 8 2353152
166fl ins 14 8589934592
167opw ins 15 12
168dst ins 15 ALL
169s1 ins 15 0
170s2 ins 15 6
171s3 ins 15 ALL
172uv ins 15 0
173pk ins 15 12 2353152
174fl ins 15 12884901888
175n = ulong 16
176if eq c 0
177opw ins 16 45
178dst ins 16 ALL
179z ins 16
180pk ins 16 0 3131904
181opw ins 17 46
182dst ins 17 ALL
183z ins 17
184pk ins 17 0 1032192
185n = ulong 18
186end
187put meta 0 n
188ret 0
189end