Commit 8d85637
committed
simd: verify-pass fixes — backend engine on the unfused reference tier
Three-angle adversarial verify (numerics/swap-trace/docs) on the
completion diff. Substantive finding acted on: the fused tier's scalar
polyfill (AVX2 arm F64x8::mul_add = per-lane f64::mul_add) lowers to a
libm fma() call on baseline x86-64 builds without the fma target
feature — downstream consumers do not inherit this repo's .cargo pin,
so backend::native::gemm_f64 now routes through the UNFUSED reference
tier instead: no libm dependence on any backend, ~7% slower than fused
on pinned builds (10.0 vs 10.7 GFLOP/s), and the backend engine is now
bit-identical to the certification reference. gemm_f64_tiled_fma stays
public for FMA-pinned consumers.
Doc fixes from the same pass: removed two stale 'gemm_f64 delegates to
matrixmultiply' claims that contradicted the swap (simd.rs re-export
comment, gemm_f64_tiled rustdoc); added # Panics to gemm_f64 (checked
preconditions vs the old wrapper's silent UB on short slices, matching
CBLAS xerbla); scoped fma determinism to per-(build,runtime) — wasm
relaxed-simd fusion is implementation-defined; corrected the AVX2
vfmadd naming (per-lane polyfill, fused semantics); fixed the
integer-corpus bound comment (k_max=128).
Gates: clippy -D warnings clean, 2185/2185 lib tests, 4 gemm doctests.1 parent ec0373f commit 8d85637
4 files changed
Lines changed: 77 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
32 | 43 | | |
33 | 44 | | |
34 | 45 | | |
| |||
46 | 57 | | |
47 | 58 | | |
48 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
49 | 72 | | |
50 | 73 | | |
51 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
247 | 260 | | |
248 | 261 | | |
249 | 262 | | |
250 | 263 | | |
251 | | - | |
| 264 | + | |
252 | 265 | | |
253 | 266 | | |
254 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
577 | 576 | | |
578 | | - | |
579 | | - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
580 | 582 | | |
581 | 583 | | |
582 | 584 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
897 | 898 | | |
898 | 899 | | |
899 | 900 | | |
| |||
953 | 954 | | |
954 | 955 | | |
955 | 956 | | |
956 | | - | |
957 | | - | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
958 | 963 | | |
959 | 964 | | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
964 | 972 | | |
965 | 973 | | |
966 | 974 | | |
| |||
1316 | 1324 | | |
1317 | 1325 | | |
1318 | 1326 | | |
1319 | | - | |
1320 | | - | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
1321 | 1330 | | |
1322 | 1331 | | |
1323 | 1332 | | |
| |||
0 commit comments