Repository navigation
Commit e730109
committed
simd: nightly realization complete, codegen witness, shared masking parity, CodeRabbit round 2
Nightly (`--features nightly-simd`) now realizes the whole facade, not just
the mask family: `simd_nightly/w1a_types.rs` adds I8x16 (from_i4_packed_u64
sign-extends 0x8 -> -8, saturating_abs(i8::MIN) == i8::MAX), U16x8 +
gather_u16, U8x8, palette_lookup_u8x8, prefetch_read_t0/1/2 (documented
no-ops) and batch_packed_i4_16, re-exported through simd_nightly and the
nightly arm of simd.rs. The five W1a tests in simd_int_ops run on nightly
instead of being cfg-gated away. Lib test target and clippy are clean on
nightly (192 focused tests + 12 W1a).
Codegen witness (examples/ternlog_codegen_probe.rs, [profile.ci-codegen],
scripts/codegen-witness.sh, .cargo/config-v4.toml): a tiny opt-level-3
example whose symbols are checked for the instruction each arm must select.
Running it found that the CARGO_TARGET_<triple>_RUSTFLAGS recipe loses to
.cargo/config.toml's cfg-keyed x86-64-v3 (cargo joins both, last
-Ctarget-cpu wins; measured with cargo -v), so the tier4-avx512-check CI
job had been checking the AVX2 arm. Fixed to `--config .cargo/config-v4.toml`
and the job now asserts vpternlog is emitted. Witness PASS on avx2 (v3),
avx512 (v4, 1/1/6 vpternlog) and neon (cross, asm-only; the aarch64 build
exposed a missing U32x16::reduce_sum on the NEON and wasm backends, added).
Slice-level probes allow bounded loop-control GPR ops (cap 12, measured 9/6).
crates/simd-masking-parity: ONE parity program over the shipped facade
(all 256 ternlog tables x2 widths, U64x8 algebra, I32x16 compares,
every predicate->mask at rows 0/1/63/64/65/130 with the zero-tail and
full-overwrite contract, mask algebra + in-place forms + any/all on tails,
care-match contiguous and strided, masked sum/min/max, strided group sum,
blend). rlib + cdylib + bin; green natively (v3) and under node with and
without +simd128 (the scalar realization).
CodeRabbit round 2: the 13 mask functions that were public as
ndarray::simd_int_ops::<f> on master are re-exported from simd_int_ops
(verified complete against master's pub fn list); Group F block no longer
splits the oracle README table; a == a comparisons replaced in both parity
harnesses; neon-asm-rung3.sh fails on a build error instead of grading
stale assembly; the U32x16 ternlog doc paragraph sits on the test it
describes.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX1 parent 7bd1072 commit e730109
28 files changed
Lines changed: 1905 additions & 35 deletions
File tree
- .cargo
- .claude
- knowledge/simd-codegen-oracle
- .github/workflows
- crates
- neon-simd-parity/src
- simd-masking-parity
- src
- wasm-simd-parity/src
- examples
- scripts
- src
- simd_nightly
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
163 | 166 | | |
164 | 167 | | |
165 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| |||
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
253 | 264 | | |
254 | 265 | | |
255 | | - | |
256 | | - | |
257 | 266 | | |
258 | 267 | | |
259 | 268 | | |
260 | 269 | | |
261 | 270 | | |
262 | | - | |
| 271 | + | |
263 | 272 | | |
264 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
265 | 278 | | |
266 | 279 | | |
267 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
452 | 456 | | |
453 | 457 | | |
454 | 458 | | |
| 459 | + | |
455 | 460 | | |
456 | 461 | | |
457 | 462 | | |
| |||
484 | 489 | | |
485 | 490 | | |
486 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
487 | 505 | | |
488 | 506 | | |
489 | 507 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments