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 / backend / amd / gfx942 / sgemm.isa

122 lines · 2478 bytes Raw Blame History
1# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2# Row-major SGEMM: acc=+0; acc=fma(A[m,k],B[k,n],acc), k increasing.
3# 2-D dispatch: group x selects 64 columns; group y selects row m. Local size (64,1,1).
4# v_fmac_f32 is gfx9 VOP2 opcode 0x3b (LLVM18 VOP2Instructions.td:2458).
5# K/A schema in vadd.isa. Descriptor rsrc2 0x184 enables workgroup IDs X AND Y.
6K sgemm 36 8 0 0 28 15 0 64 64 3 0xaf00c1 0x184 8
7A A 0 8 0
8A B 8 8 0
9A C 16 8 0
10A M 24 4 1
11A N 28 4 1
12A K 32 4 1
13F 1 2
14B 1 0 26 6 0x30
15D 1 0 0 0 6
16D 1 1 0 6 7
17D 1 2 0 16 1
18D 1 3 0 17 1
19D 1 4 0 18 8
20D 1 5 1 0 21
21F 2 1
22B 2 0 30 2 2
23D 2 0 0 0 8
24D 2 1 0 8 8
25D 2 2 0 16 7
26D 2 3 0 23 7
27F 3 1
28B 3 0 23 9 0x17d
29D 3 0 0 0 8
30D 3 1 0 8 8
31D 3 2 0 16 7
32F 4 1
33B 4 0 23 9 0x17f
34D 4 0 0 0 16
35D 4 1 0 16 7
36F 5 1
37B 5 0 31 1 0
38D 5 0 0 0 9
39D 5 1 0 9 8
40D 5 2 0 17 8
41D 5 3 0 25 6
42F 6 1
43B 6 0 25 7 0x3e
44D 6 0 0 0 9
45D 6 1 0 9 8
46D 6 2 0 17 8
47F 7 2
48B 7 0 26 6 0x37
49D 7 0 0 0 13
50D 7 1 0 13 1
51D 7 2 0 14 2
52D 7 3 0 16 1
53D 7 4 0 17 1
54D 7 5 0 18 7
55D 7 6 0 25 1
56D 7 7 1 0 8
57D 7 8 1 8 8
58D 7 9 1 16 7
59D 7 10 1 23 1
60D 7 11 1 24 8
61F 8 1
62B 8 0 25 7 0x3f
63D 8 0 0 0 9
64D 8 1 0 9 8
65D 8 2 0 17 8
66
67I 1 0 4 0 1 2 0
68I 1 0 8 0 1 1 16
69I 1 0 10 0 1 1 24
70I 1 0 12 0 1 0 32
71I 5 255 0 0 0x13
72L 0x3ff
73I 4 0xc07f 0x0c
74I 2 3 10 14 0x01 # row >= M -> end
75I 4 @1 0x04
76I 2 2 134 14 0x1c
77I 5 14 0 1 0x34
78I 6 11 1 0xcc
79I 3 106 0x20 20
80I 4 @1 0x08
81I 5 130 1 2 0x12
82I 5 158 1 3 0x10
83I 2 3 12 14 0x24 # A row offset: full 64-bit product
84I 2 3 12 15 0x2c
85I 2 14 130 14 0x1d
86I 2 14 4 14 0x00
87I 2 15 5 15 0x04
88I 8 14 1 8
89I 8 15 1 9
90I 8 7 1 7
91I 5 6 2 10 0x19
92I 5 263 3 11 0x1c
93I 2 3 11 16 0x24 # C row offset: full 64-bit product
94I 2 3 11 17 0x2c
95I 2 16 130 16 0x1d
96I 2 16 8 16 0x00
97I 2 17 9 17 0x04
98I 8 17 1 7
99I 5 16 2 12 0x19
100I 5 263 3 13 0x1c
101I 3 11 0x00 18 # B row stride N*4, 64-bit
102I 3 128 0x00 19
103I 2 18 130 18 0x1d
104I 8 19 1 7 # VCC already consumes the addc constant bus; high stride must be a VGPR
105I 8 128 1 4 # accumulator starts +0.0
106I 2 12 129 13 0x01
107I 4 @3 0x05 # K=0: store +0.0 without any input load
108T 2
109I 7 0 0 2 0 0 0x14 0 8 0 127 0 14
110I 7 0 0 2 0 0 0x14 0 10 0 127 0 6
111I 4 0x0f70 0x0c
112I 5 270 6 4 0x3b # v_fmac_f32 v4, v14, v6: one rounding
113I 5 132 8 8 0x19
114I 5 128 9 9 0x1c
115I 5 18 10 10 0x19
116I 5 263 11 11 0x1c
117I 2 13 129 13 0x01
118I 4 @2 0x04 # checked negative SOPP displacement
119T 3
120I 7 0 0 2 0 0 0x1c 0 12 4 127 0 0
121T 1
122I 4 0 0x01