Add a WASM SIMD128 4x4 DTRMM microkernel - #5986
Merged
Merged
Conversation
Generic scalar DTRMM was the remaining Level-3 gap (~15 GFLOPS vs ~23 DGEMM). Keep SIMD for double only; single-precision TRMM already auto-vectorized and a shared S+D kernel slowed SGEMM. Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #5983 / #5680 / #4023: replace the generic scalar 4×4 DTRMM kernel used by
WASM128_GENERICwith a WASM SIMD128 microkernel. Double only.DTRMMKERNELnow useskernel/wasm/trmmkernel_4x4_wasm128.c; packing staysgemm_{n,t}copy_4.../generic/trmmkernel_4x4.c. Single-precision TRMM already auto-vectorizes, and a shared S+D SIMD kernel previously slowed SGEMM.ifndef DTRMMKERNELinkernel/wasm/KERNELalready keeps the target file from being overwritten.Benchmarks
Node / Emscripten,
TARGET=WASM128_GENERIC,USE_THREAD=0,COMMON_OPT=-O2. Same machine, 5 warmup + 10 timed samples (median). Speedup > 1 means this branch is faster thandevelop.Geomean vs
develop: DTRMM 2.42x. STRMM 1.02x, SGEMM 1.03x, DGEMM 1.03x (unchanged within noise).Test plan
utestunder node (106/106)ctestL1/L2/L3 (x{s,d,c,z}cblat{1,2,3}) under node, including STRMM/DTRMM