Repository navigation
perf(gemm): native float32 GEMM on ppc64le - #78
Merged
Merged
Conversation
gemmMicro8x16VSX follows OpenBLAS's POWER9 sgemm (sgemm_macros_power9.S, LOAD8x16): no splats. Each 4-float A vector is rotated three ways with XXSLDWI, every rotation multiplies every B vector (32 XVMADDASP per k step against 6 loads and 6 rotations), and the store untangles the rotated 4x4 blocks with three XXSELs per row. OpenBLAS rotates B; this kernel rotates A, which has half as many vectors per step. POWER9 (cfarm29), abbench 8 rounds, one core, against v0.27.0, which widened float32 to the float64 GEMM: -59/-42/-37% at 64²/256²/1024². Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tannevaled
force-pushed
the
perf/gemm32-ppc64le
branch
from
October 27, 2026 20:19
4457c29 to
b62b0ad
Compare
tannevaled
marked this pull request as ready for review
October 27, 2026 20:19
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.
Native float32 GEMM on ppc64le:
gemmMicro8x16VSX, after OpenBLAS's POWER9 sgemm (kernel/power/sgemm_macros_power9.S,LOAD8x16), with no splats. Each A vector is rotated three ways withXXSLDWI, every rotation multiplies every B vector (32XVMADDASPper k step), and the store untangles each rotated 4×4 block with threeXXSELs per row. OpenBLAS rotates B; rotating A costs half the permutes.MatMul, POWER9 (cfarm29), abbench 8 rounds, 1 coreThe NumPy 2.5.3 wheel on that host is no reference for products: 0.48 ms at 64² and 2.7 s at 1024², consistent with a BLAS without POWER9 kernels. docs/perf.md says so.
Sabotage check: the store reading the wrong rotation made only the qemu ppc64le lane fail, and the sabotage commit has been removed. The real POWER9 ran the kernel suite (including the PROT_NONE fence) and the root suite, both green.
🤖 Generated with Claude Code