Skip to content

strided-rs v0.4.7

Choose a tag to compare

@shinaoka shinaoka released this 11 Oct 00:37
· 74 commits to main since this release
9fa6511

strided-rs v0.4.7

Performance

  • Permutation engine (#292).
    The parallel 2D transpose splits the whole row x column tile grid instead of
    only the row tiles, so a near-vector-shaped transpose (one extent below the
    micro-kernel block) uses every worker. The grouped high-rank tile target is
    widened to two micro-kernel blocks so the destination-contiguous inner run
    spans several cache lines, and the group length is bounded so one large axis
    cannot absorb the permutation and drop its outer parallel loop. A rootless
    ConstStride1 plan (one strided stream) is split across workers.
  • Uninitialized full-overwrite copies. copy_into_uninit routes
    non-contiguous f32/f64 copies through the permutation engine, serial or
    parallel, under the active execution policy; equal contiguous layouts and
    every other dtype keep the element map. copy_into_par proves the destination
    offsets are separated before splitting tiles and otherwise keeps the serial
    engine, and a bounded policy below the pool size uses the policy-aware element
    map.
  • Axis reductions. The output-block axis-reduction kernel folds each
    reduced step into the adjacent-output accumulator block with a SIMD vector
    operation for the sum, product, and sum-of-squares families. Results stay
    bitwise identical to the scalar fold.

Measured on the tenferro-rs CPU benchmark cases (four threads, AMD EPYC, pinned
to four CPUs): permutation materialization improves by up to about 1.9x
(reverse_23d_2 28.0 -> 16.6 ms, transpose_3d_256_201 37.5 -> 24.5 ms) and
axis reduce_sum / reduce_prod by about 1.25x and 1.28x at four threads.

Compatibility

No public API changes; the release is source compatible with 0.4.6.

Full comparison: v0.4.6...v0.4.7