Files
metal2vulkan/crates
Anees Iqbal 720deb7bf6 Authored cases: llvm.agx2.shfl on edge and random pairs and over every 16-bit value, qualified on Metal
Two public cases over the owned kernel_agx_shfl fixture:

- agx-shfl-interleaves-the-bits-of-edge-and-random-pairs (8e51bda5...): 134 pairs in one
  threadgroup (0/0, ffff/ffff, ffff/0, 0/ffff, aaaa/5555, 5555/aaaa, each single bit alone in
  either operand, in both and against its mirror, and 64 LCG pairs), each result read back
  over a 0xab fill.
- agx-shfl-over-every-16-bit-value-matches-the-bit-by-bit-interleave (93662f10...): 65,536
  threads, four pairs each ((t, 0), (0, t), (t, ~t), t with a hash of t), counting the results
  that differ from a bit-by-bit interleave and summing every result two ways.

Verified: corpus-case-check accepted and installed both, and corpus-metal qualified both on the
M3 (apple-m3-max-macos27.0.1, job m3-max-69889). Metal's outputs equal the interleave contract's
exactly: the pairs' sha256 f616d0f9... is that of the 134 interleaves computed on the CPU, and
the sweep reads 0 differences, 0xfffe8000 and 0x643d0000, the CPU's values.

An exhaustive 2^32-pair case is not committed: every public case runs on lavapipe with one thread
in the public leg, where it is not cheap; the exhaustive measurement on the M3 (all 2^32 pairs,
zero differences) is the one that decided the contract.
2026-11-22 22:54:13 -08:00
..