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/CUDApp/blob/main/om/cmdlist/record.om # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / om / cmdlist / record.om` 183 lines · 3594 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Seeded command-list record builder. The fixed driver image is carried verbatim 3 note from src/omega_blackwell_qmd.c at `daee8b6`; no host words or effects. 4 const CLMASK ulong `4294967295` 5 const CLBAD ulong `18446744073709551615` 6 fn clrecord_bank a view ulong 16 args view ulong 32 o edit ulong 512 to ulong 7 if or eq get a 0 0 gt get a 0 4096 8 ret 1 9 end 10 if ge get a 1 get a 0 11 ret 2 12 end 13 if or eq get a 2 0 gt get a 2 32 14 ret 1 15 end 16 if eq get a 3 0 17 ret 1 18 end 19 if eq get a 5 0 20 ret 1 21 end 22 if eq get a 6 0 23 ret 1 24 end 25 if eq get a 7 0 26 ret 1 27 end 28 if gt get a 9 32768 29 ret 3 30 end 31 for i ulong 512 32 put o i 0 33 end 34 put o 0 `641859584` 35 put o 1 3 36 put o 48 `2499697920` 37 put o 49 `3893478299` 38 put o 62 `1048575` 39 put o 64 `536870912` 40 put o 65 3 41 put o 66 `570425344` 42 put o 67 3 43 put o 68 `606601216` 44 put o 69 3 45 put o 70 `604045312` 46 put o 71 3 47 put o 80 1 48 put o 82 `67158016` 49 put o 83 2 50 put o 91 1024 51 put o 108 `79311560` 52 put o 114 1 53 put o 118 288 54 put o 126 `632711424` 55 put o 127 3 56 put o 128 1 57 put o 129 1 58 put o 130 1 59 put o 132 `1065353216` 60 put o 133 `1065353216` 61 put o 134 `1065353216` 62 put o 135 1024 63 put o 136 1 64 put o 137 1 65 put o 138 1 66 put o 139 1 67 put o 148 `79311560` 68 put o 154 1 69 put o 158 288 70 put o 166 `632711424` 71 put o 167 3 72 put o 168 1 73 put o 169 1 74 put o 170 1 75 put o 172 `1065353216` 76 put o 173 `1065353216` 77 put o 174 `1065353216` 78 put o 175 1024 79 put o 176 1 80 put o 177 1 81 put o 178 1 82 put o 179 1 83 put o 180 48 84 put o 183 `16777216` 85 put o 185 59840 86 put o 189 59840 87 put o 190 `16777216` 88 put o 191 59839 89 put o 210 `606602112` 90 put o 211 3 91 put o 212 `606602140` 92 put o 213 3 93 put o 216 64 94 put o 217 1 95 put o 218 1 96 put o 220 1 97 put o 221 1 98 put o 222 1 99 put o 223 `16776640` 100 bv = add get a 10 mul get a 1 1024 101 put o 68 shr bv 32 102 put o 69 and bv CLMASK 103 put o 210 shr add bv 896 32 104 put o 211 and add bv 896 CLMASK 105 put o 212 shr add bv 924 32 106 put o 213 and add bv 924 CLMASK 107 put o 216 get a 3 108 ty = get a 4 109 if eq ty 0 110 ty = ulong 1 111 end 112 put o 217 ty 113 put o 220 get a 5 114 put o 221 get a 6 115 for i ulong get a 2 116 put o add 224 i and get args i CLMASK 117 end 118 qv = add get a 11 mul get a 1 1024 119 sv = add get a 12 mul get a 1 16 120 put o 260 `20905984` 121 put o 265 3 122 put o 266 `1638400` 123 put o 268 and shr add qv 512 8 CLMASK 124 put o 270 `793772964` 125 put o 271 and sv CLMASK 126 put o 272 shr sv 32 127 put o 273 6 128 put o 275 `2172715008` 129 put o 276 56 130 put o 278 `67108864` 131 ret 0 132 end 133 134 fn clrecord_qmd a view ulong 16 o edit ulong 512 to ulong 135 bv = add get a 10 mul get a 1 1024 136 qv = add get a 11 mul get a 1 1024 137 ty = get o 217 138 put o 288 and shr get a 7 4 CLMASK 139 put o 289 or and shr get a 7 36 `2097151` shl ulong 10 21 140 put o 290 or and get a 3 65535 shl and ty 65535 16 141 gp = ulong 64 142 if gt get a 8 64 143 gp = mul div and add and get a 8 CLMASK 7 CLMASK 8 8 144 if eq gp 0 145 gp = ulong 16 146 end 147 end 148 put o 291 or 131073 shl and gp 511 8 149 sm = ulong 8 150 if ne get a 9 0 151 sm = div add get a 9 127 128 152 end 153 put o 292 or and `78923784` xor CLMASK 2047 sm 154 put o 295 get a 5 155 put o 296 get a 6 156 put o 297 1 157 put o 298 and shr bv 6 CLMASK 158 put o 299 or and shr bv 38 524287 shl ulong 64 19 159 put o 300 and shr get a 13 6 CLMASK 160 put o 301 or and shr get a 13 38 524287 shl ulong 144 19 161 put o 308 and shr add bv 768 6 CLMASK 162 put o 309 or and shr add bv 768 38 524287 shl ulong 16 19 163 put o 312 and shr get a 13 6 CLMASK 164 put o 313 or and shr get a 13 38 524287 shl ulong 4096 19 165 put o 314 `271581201` 166 put o 315 and shr get a 7 8 CLMASK 167 put o 388 `8388610` 168 put o 394 `2293760` 169 put o 396 and shr qv 8 CLMASK 170 put o 398 `5243392` 171 put o 418 65537 172 put o 419 2049 173 ret 0 174 end 175 176 fn cmdlist_record a view ulong 16 args view ulong 32 o edit ulong 512 to ulong 177 r = clrecord_bank a args o 178 if ne r 0 179 ret r 180 end 181 ret clrecord_qmd a o 182 end 183