You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wave8 opt: u32-friendly bit transpose (avoid RV32 u64 penalty) #2530
The u64 SWAR transpose regressed 2.4x on RV32 (#2524). A 32-bit SWAR / byte-shuffle that never crosses the 32-bit word boundary MIGHT avoid the penalty. LOW CONFIDENCE: the x86 host also lost (0.90x) with native u64, suggesting delta-swap is latency-bound vs the naive independent bit-ops. Benchmark before adopting.
Tried and rejected: a u32 two-pass 8×8 transpose (16-lane = two 8×8 via u32 halves) was implemented + bit-verified, but on ESP32-P4 (RV32) it ran 10524 µs/frame vs the unrolled naive's 6595 µs (1.6× slower); the HD u32 8×8 also lost for the 8-lane (4680 vs 3336 µs). The unrolled naive is fastest. See #2524. Closing as not worthwhile unless a fundamentally different u32 scheme is proposed.
Resolved by #2534. The shipped spread-LUT transpose (src/fl/channels/detail/bit_spread_lut.hpp) is exactly the u32-native transpose this issue asked for — it avoids the RV32 u64 penalty entirely and measured 1.98×/1.90× (16/8-lane), bit-exact.
Activity
zackees commentedon May 29, 2026
Tried and rejected: a u32 two-pass 8×8 transpose (16-lane = two 8×8 via u32 halves) was implemented + bit-verified, but on ESP32-P4 (RV32) it ran 10524 µs/frame vs the unrolled naive's 6595 µs (1.6× slower); the HD u32 8×8 also lost for the 8-lane (4680 vs 3336 µs). The unrolled naive is fastest. See #2524. Closing as not worthwhile unless a fundamentally different u32 scheme is proposed.
zackees commentedon May 29, 2026
Resolved by #2534. The shipped spread-LUT transpose (
src/fl/channels/detail/bit_spread_lut.hpp) is exactly the u32-native transpose this issue asked for — it avoids the RV32 u64 penalty entirely and measured 1.98×/1.90× (16/8-lane), bit-exact.