Skip to content

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

Open
MMesch wants to merge 1 commit into
OpenMathLib:developfrom
MMesch:wasm-kernel-ifndef-guards
Open

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

Conversation

@MMesch

@MMesch MMesch commented Aug 25, 2026

Copy link
Copy Markdown

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.

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?

1 participant