interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / om / codegen / qm_self.om

88 lines · 1550 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Reuse existing QMMA record packing and scheduling, no new instruction encoder.
3fn qm_self kind ulong a ulong c ulong d ulong b edit ulong 8192 m edit ulong 512 to ulong
4x = new ulong 16 0
5for i ulong 512
6put m i 0
7end
8put m 2 1
9put m 320 2
10v = omega_cg_qmma_v m 2
11v = omega_cg_qmma_v m 4
12v = omega_cg_qmma_v m 2
13v = omega_cg_qmma_v m 4
14omega_cg_qmma_i x 7
15put x 1 0
16put x 6 856
17put x 8 1
18omega_cg_qmma_emit b m x 4
19omega_cg_qmma_i x 5
20put x 1 0
21put x 6 896
22omega_cg_qmma_emit b m x 2
23for i ulong 3
24omega_cg_qmma_i x 57
25put x 1 add i 1
26put x 2 0
27put x 5 0
28put x 6 mul i 16
29k = ulong 3
30if eq i 0
31k = 2
32end
33if eq i 1
34put x 0 56
35end
36omega_cg_qmma_emit b m x k
37end
38omega_cg_qmma_i x 16
39put x 1 3
40put x 2 1
41put x 3 2
42put x 4 3
43put x 6 1362114610
44put x 7 15
45omega_cg_qmma_emit b m x 11
46omega_cg_qmma_i x 0
47put x 7 15
48omega_cg_qmma_emit b m x 11
49v = omega_cg_qmma_v m 1
50omega_cg_qmma_i x 37
51put x 1 v
52put x 2 3
53put x 3 3
54put x 13 1
55put x 6 1178940467
56omega_cg_qmma_emit b m x 0
57omega_cg_qmma_i x 12
58put x 2 0
59put x 3 v
60put x 5 0
61put x 6 64
62omega_cg_qmma_emit b m x 5
63omega_cg_qmma_i x 16
64put x 1 3
65put x 2 1
66put x 3 2
67put x 4 3
68put x 7 15
69omega_cg_qmma_emit b m x 11
70omega_cg_qmma_i x 0
71put x 7 15
72omega_cg_qmma_emit b m x 11
73for i ulong 4
74omega_cg_qmma_i x 12
75put x 2 0
76put x 3 3
77put x 5 0
78put x 6 mul i 4
79omega_cg_qmma_emit b m x 5
80end
81omega_cg_qmma_i x 45
82omega_cg_qmma_emit b m x 7
83omega_cg_qmma_i x 46
84put x 7 1032192
85omega_cg_qmma_pack b x get m 0
86put m 0 add get m 0 1
87ret get m 4
88end