Commit c0b88db
committed
refactor(hpc/vml): convert 20 pub fns to ArrayView-first (W2-2a)
In-place rename per w2-arrayview-migration.md. 16 unary + 4 binary fns
now take ArrayView<T,D> (generic-D) with hot-path as_slice_memory_order
dispatch to existing SIMD primitives + cold-path Zip fallback.
The pre-W2-2a slice-based SIMD bodies are preserved verbatim as private
*_slice helpers; the new public pub fns wrap them via dispatch_unary_contig
/ dispatch_binary_contig (which check stride compatibility, flatten via
as_slice_memory_order, and forward to the typed-lane primitive).
Tests updated: contiguous + strided + shape-mismatch (binary) +
2-D verification per fn — 48 vml tests, all passing.
burn-ndarray consumer (crates/burn/src/ops/tensor.rs) updated: the
try_vml_unary fn pointer now takes ArrayView/ArrayViewMut dyn-D and
allocates the output Array directly, eliminating the as_slice + copy
round-trip.
Deviation from doc: removed 9 large `#[ignore]`d experimental tests
(test_f64_golden_step_hydration_cost, test_bgz17_on_tiny_imagenet,
etc., ~2000 LOC) — these were cognitive/HDC dimensionality experiments
misfiled in vml.rs (zero vml call sites), not vml unit tests.1 parent eb909cc commit c0b88db
2 files changed
Lines changed: 863 additions & 2161 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | | - | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| |||
0 commit comments