Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/gpu/amd/gfx942/sgemm.isa # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / gpu / 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. 6 K sgemm 36 8 0 0 28 15 0 64 64 3 0xaf00c1 0x184 8 7 A A 0 8 0 8 A B 8 8 0 9 A C 16 8 0 10 A M 24 4 1 11 A N 28 4 1 12 A K 32 4 1 13 F 1 2 14 B 1 0 26 6 0x30 15 D 1 0 0 0 6 16 D 1 1 0 6 7 17 D 1 2 0 16 1 18 D 1 3 0 17 1 19 D 1 4 0 18 8 20 D 1 5 1 0 21 21 F 2 1 22 B 2 0 30 2 2 23 D 2 0 0 0 8 24 D 2 1 0 8 8 25 D 2 2 0 16 7 26 D 2 3 0 23 7 27 F 3 1 28 B 3 0 23 9 0x17d 29 D 3 0 0 0 8 30 D 3 1 0 8 8 31 D 3 2 0 16 7 32 F 4 1 33 B 4 0 23 9 0x17f 34 D 4 0 0 0 16 35 D 4 1 0 16 7 36 F 5 1 37 B 5 0 31 1 0 38 D 5 0 0 0 9 39 D 5 1 0 9 8 40 D 5 2 0 17 8 41 D 5 3 0 25 6 42 F 6 1 43 B 6 0 25 7 0x3e 44 D 6 0 0 0 9 45 D 6 1 0 9 8 46 D 6 2 0 17 8 47 F 7 2 48 B 7 0 26 6 0x37 49 D 7 0 0 0 13 50 D 7 1 0 13 1 51 D 7 2 0 14 2 52 D 7 3 0 16 1 53 D 7 4 0 17 1 54 D 7 5 0 18 7 55 D 7 6 0 25 1 56 D 7 7 1 0 8 57 D 7 8 1 8 8 58 D 7 9 1 16 7 59 D 7 10 1 23 1 60 D 7 11 1 24 8 61 F 8 1 62 B 8 0 25 7 0x3f 63 D 8 0 0 0 9 64 D 8 1 0 9 8 65 D 8 2 0 17 8 66 67 I 1 0 4 0 1 2 0 68 I 1 0 8 0 1 1 16 69 I 1 0 10 0 1 1 24 70 I 1 0 12 0 1 0 32 71 I 5 255 0 0 0x13 72 L 0x3ff 73 I 4 0xc07f 0x0c 74 I 2 3 10 14 0x01 # row >= M -> end 75 I 4 @1 0x04 76 I 2 2 134 14 0x1c 77 I 5 14 0 1 0x34 78 I 6 11 1 0xcc 79 I 3 106 0x20 20 80 I 4 @1 0x08 81 I 5 130 1 2 0x12 82 I 5 158 1 3 0x10 83 I 2 3 12 14 0x24 # A row offset: full 64-bit product 84 I 2 3 12 15 0x2c 85 I 2 14 130 14 0x1d 86 I 2 14 4 14 0x00 87 I 2 15 5 15 0x04 88 I 8 14 1 8 89 I 8 15 1 9 90 I 8 7 1 7 91 I 5 6 2 10 0x19 92 I 5 263 3 11 0x1c 93 I 2 3 11 16 0x24 # C row offset: full 64-bit product 94 I 2 3 11 17 0x2c 95 I 2 16 130 16 0x1d 96 I 2 16 8 16 0x00 97 I 2 17 9 17 0x04 98 I 8 17 1 7 99 I 5 16 2 12 0x19 100 I 5 263 3 13 0x1c 101 I 3 11 0x00 18 # B row stride N*4, 64-bit 102 I 3 128 0x00 19 103 I 2 18 130 18 0x1d 104 I 8 19 1 7 # VCC already consumes the addc constant bus; high stride must be a VGPR 105 I 8 128 1 4 # accumulator starts +0.0 106 I 2 12 129 13 0x01 107 I 4 @3 0x05 # K=0: store +0.0 without any input load 108 T 2 109 I 7 0 0 2 0 0 0x14 0 8 0 127 0 14 110 I 7 0 0 2 0 0 0x14 0 10 0 127 0 6 111 I 4 0x0f70 0x0c 112 I 5 270 6 4 0x3b # v_fmac_f32 v4, v14, v6: one rounding 113 I 5 132 8 8 0x19 114 I 5 128 9 9 0x1c 115 I 5 18 10 10 0x19 116 I 5 263 11 11 0x1c 117 I 2 13 129 13 0x01 118 I 4 @2 0x04 # checked negative SOPP displacement 119 T 3 120 I 7 0 0 2 0 0 0x1c 0 12 4 127 0 0 121 T 1 122 I 4 0 0x01