Skip to content

Use generic dot kernels for WASM128_GENERIC#5689

Merged
martin-frbg merged 3 commits intoOpenMathLib:developfrom
teddygood:wasm-sdot-followup
Mar 19, 2026
Merged

Use generic dot kernels for WASM128_GENERIC#5689
martin-frbg merged 3 commits intoOpenMathLib:developfrom
teddygood:wasm-sdot-followup

Conversation

@teddygood
Copy link
Contributor

@teddygood teddygood commented Mar 19, 2026

Follow-up to #5685, #2867, and #4023.

This switches SDOTKERNEL and DDOTKERNEL for WASM128_GENERIC from the trivial riscv64 fallback to kernel/generic/dot.c, and adds a WASM SIMD widening path there for DSDOT.

In local direct WASM benchmarking with Emscripten/Node, contiguous inputs improved over the current baseline by about 8.96x at n=1048576, 2.00x at n=2097152, and 1.72x at n=4194304 for sdot, by about 1.33x at n=1048576, 1.47x at n=2097152, and 1.14x at n=4194304 for ddot, and by about 1.14x at n=1048576, 1.83x at n=2097152, and 1.14x at n=4194304 for dsdot.

I also tried a dedicated WASM-specific DSDOT prototype locally, but it did not show a clear overall benefit over the generic implementation, so this keeps the simpler generic path.

@martin-frbg martin-frbg added this to the 0.3.32 milestone Mar 19, 2026
@martin-frbg
Copy link
Collaborator

Great, thanks

@martin-frbg martin-frbg merged commit e9aab19 into OpenMathLib:develop Mar 19, 2026
101 of 102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants