Skip to content

wasm: guard remaining KERNEL assignments so KERNEL.$(TARGET_CORE) overrides survive - #5996

Merged
martin-frbg merged 1 commit into
OpenMathLib:developfrom
MMesch:wasm-kernel-ifndef-guards
Aug 26, 2026
Merged

wasm: guard remaining KERNEL assignments so KERNEL.$(TARGET_CORE) overrides survive#5996
martin-frbg merged 1 commit into
OpenMathLib:developfrom
MMesch:wasm-kernel-ifndef-guards

Conversation

@MMesch

@MMesch MMesch commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #5993. Base kernel/wasm/KERNEL is included after KERNEL.$(TARGET_CORE) (kernel/Makefile:119-121), so unguarded = assignments in the base file clobber per-target overrides. #5984 (AXPY), #5983 (GEMM/TRMM), and #5990 (GEMV) fixed this family-by-family; this PR wraps every remaining assignment in ifndef so future WASM sub-targets can override any kernel without a matching guard edit here.

On develop, the still-unguarded families this PR moves are SDOT / DDOT / SROT / DROT. SIMD-opcode counts in libopenblas.so for these kernels (measured against the v0.3.34 tag, since that predates the prior guard PRs):

kernel simd_before simd_after
sdot_k 0 27
ddot_k 0 25
srot_k 12 74
drot_k 12 66

Downstream (emscripten-forge/recipes#6343): 1.5-2x speedup on numpy.correlate under Node/Emscripten (TARGET=WASM128_GENERIC, USE_THREAD=0).

Tested with utest and CBLAS ctest L1/L2/L3 under Node.

@martin-frbg

Copy link
Copy Markdown
Collaborator

Thank you

@martin-frbg martin-frbg added this to the 0.3.35 milestone Aug 26, 2026
@martin-frbg
martin-frbg merged commit 47048dd into OpenMathLib:develop Aug 26, 2026
104 of 106 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.

guards missing in wasm/KERNEL file?

2 participants