Skip to content

Faster fallback matrix multiplication - #773

Merged
maleadt merged 9 commits into
mainfrom
fastmatmul
Aug 27, 2026
Merged

Faster fallback matrix multiplication#773
maleadt merged 9 commits into
mainfrom
fastmatmul

Conversation

@christiangnrd

Copy link
Copy Markdown
Member

Like #590 but from a non-fork branch so it can be stacked see the original PR for the discussion

Closes #590

@christiangnrd

Copy link
Copy Markdown
Member Author

Metal failures will probably be resolved by rerunning the tests after JuliaGPU/Metal.jl#939 is merged.

oneAPI failures seem to be a bug uncovered by the new tests introduced by 7e8909d

@maleadt

maleadt commented Aug 27, 2026

Copy link
Copy Markdown
Member

oneAPI failures seem to be a bug uncovered by the new tests introduced by 7e8909d

JuliaGPU/oneAPI.jl#628

Base automatically changed from stmmtest to main August 27, 2026 07:45
christiangnrd and others added 9 commits August 27, 2026 09:45
The early return zeroed C whenever A or B was empty, but for K == 0 the
result is β*C. The tiled kernel already handles that (no tiles to process),
so only skip the launch when C itself is empty.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both computed the same thing, element [i, j] of op(X); only the call sites
differ in which index is the contraction one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A fallback kernel does not need a tunable here; hardcode the one-row padding
that avoids shared-memory bank conflicts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
It is the tile dimension, not an upper bound.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
It already unwraps the operands via wrapper_char/_unwrap, instead of
indexing through the wrapper with 'N' flags.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The gemm tests only used 4×4 inputs, which never exercise partial tiles or
an inner dimension spanning several tiles, i.e. exactly the failure mode of
a tiled kernel. Use 33×17×5 (and n=33 for Symmetric/Hermitian, which was a
tile-aligned 128) so every dimension has a partial tile; the test load does
not increase.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@maleadt
maleadt merged commit 5500aa1 into main Aug 27, 2026
18 checks passed
@maleadt
maleadt deleted the fastmatmul branch August 27, 2026 11:20
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