Cut down from #262 (ttio2tech): only the intrinsics and their test.
- HIP's __byte_perm indexes a byte array in private memory (scratch traffic in the IQ4_XS/Q2_0 table
lookups); byte_perm() is the same selection (nibble & 7 of the pair {y:x}) in one v_perm_b32.
- __vsub4, __vsubss4 and __vcmpne4 work on all four byte lanes at once (Hacker's Delight 2-18) instead
of a per-lane loop.
- tests/hip/intrinsics checks them on 1,024 random operands against host references (passes on gfx1201).
Left out: the arch/setup/device.cu parts (0.1.30 already builds and checks gfx1201; main's dp4a covers
gfx1100-1102/1200/1201) and the gfx1201 hipBLASLt table (none is shipped for gfx1201).
A/B vs main on amdbox (Coder IQ1_M, 128 greedy tokens): identity with a fixed cache (--expert-cache 1500
--prefill 2048), 5 + 5 starts per card, 4K / 16K / 4K again: the modal outputs are identical on the R9700
and on the RX 9070 XT (one start of 20 differed from its arm's mode, the known HIP start drift). Speed with
setup's settings (auto cache/chunk), 2 + 2 starts per card, tok/s:
| card | arm | 4K cold | 4K warm | 16K cold | 16K warm | decode |
| R9700 | main | 1,027 | 1,792 | 1,695 | 1,812 | 46.0-52.2 |
| | #262 | 1,023 | 1,786 | 1,681 | 1,808 | 53.0-61.0 |
| RX 9070 XT | main | 781 | 1,018 | 1,421 | 1,517 | 32.7-41.4 |
| | #262 | 780 | 1,017 | 1,424 | 1,517 | 34.9-44.0 |
Decode +15% on the R9700, +5-7% on the 9070 XT; prompts unchanged.
Co-Authored-By: ttio2tech <125389792+ttio2tech@users.noreply.github.com>