Commit 9ebd2c5
committed
amx: the full mnemonic surface (INT8/BF16/FP16/COMPLEX/FP8/TF32/MOVRS/AVX512) with const tile operands
src/hpc/amx_ops.rs exposes every tile op LLVM's X86InstrAMX.td defines as
`asm!` mnemonics on stable 1.98.1 (LLVM 22.1.8 assembles all of them with no
target feature), the tile index as an `asm_const` generic, all eight tiles.
Three-tile ops assert distinct operands in a `const` block, so the
same-tile #UD (Gotcha 11) is a compile error. `amx_features()` returns the
per-tier CPUID bits at LLVM Host.cpp's positions (7.0:EDX 22/24/25,
7.1:EAX[21], 7.1:EDX[8], 1E.1:EAX 4/6/7/8); `amx_report()` prints them. The
AMX-AVX512 row ops (tcvtrow*, tilemovrow) need a zmm operand and therefore
exist under the avx512f cfg only — compile-time selection, no target_feature.
Encoding falsifiers read each monomorphized op's bytes back out of the text
segment (bounded at the wrapper's own `ret`, since the linker packs the
wrappers back to back) and pin them to the EMR-validated `.byte` table and
to the LLVM encodings of the never-executed tiers. In doing so the
"mirrored operand convention" (Gotcha 12) resolved as a misread of the byte
table: Intel order is tdpbusd D, S1(rm, M×K), S2(vvvv, VNNI K×N), and the
validated C4 E2 71 5E C2 is `tdpbusd tmm0, tmm2, tmm1` — the kernel's
placement, plain SDM semantics. Recorded as Gotcha 15 and knowledge doc §5b.
Executed tier is still only TILE/INT8/BF16 (Emerald Rapids); every other tier
is assembler-verified only and the docs say so.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX1 parent a55d841 commit 9ebd2c5
6 files changed
Lines changed: 599 additions & 2 deletions
File tree
- .claude
- knowledge
- src
- hpc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
270 | 283 | | |
271 | 284 | | |
272 | 285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
153 | 162 | | |
154 | 163 | | |
155 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
172 | 218 | | |
173 | 219 | | |
174 | 220 | | |
| |||
0 commit comments