Add WebAssembly SIMD STRSM and DTRSM kernels#5760
Merged
martin-frbg merged 2 commits intoOpenMathLib:developfrom Apr 16, 2026
Merged
Add WebAssembly SIMD STRSM and DTRSM kernels#5760martin-frbg merged 2 commits intoOpenMathLib:developfrom
martin-frbg merged 2 commits intoOpenMathLib:developfrom
Conversation
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.
This PR adds WebAssembly SIMD TRSM kernels for
WASM128_GENERICand wires them up forSTRSMandDTRSM.The overall blocked TRSM structure is unchanged. This keeps the existing generic control flow and specializes the small triangular solve path for WASM friendly fixed-size cases used inside the kernel.
To make the target-specific selections take effect reliably, this also changes the base
kernel/wasm/KERNELdefaults to allowWASM128_GENERICoverrides for GEMM/TRSM kernel entries.In local direct WASM benchmarking with Pyodide/Emscripten, direct
cblas_strsmimproved over the current genericWASM128_GENERICpath by about2.3x–3.4xacrossLN/LT/RN/RTcases for the sizes tested (128, 160, 192, 256, 384). Directcblas_dtrsmimproved by about1.6x–2.2xacross theLN/LT/RN/RTcases tested (128, 192, 256, 384).