Skip to content

metal : pick up upstream graph chunking and short mat-vec lanes - #496

Merged
bri-prism merged 1 commit into
prismfrom
metal/upstream-perf-1126
Nov 27, 2026
Merged

bri-prism merged 1 commit into
prismfrom
metal/upstream-perf-1126

Conversation

@bri-prism

@bri-prism bri-prism commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

What

Two upstream Metal commits that prism doesn't have, unchanged, as one commit:

Both apply cleanly. The original messages and authorship are on the upstream PRs.

Measured (Apple M5 Pro, prism 76ef9d2 vs this branch, llama-bench -fa 1, interleaved, 2 x 3 reps)

  • Small model: tg128 221.3 -> 228.3 t/s (+3.2%), pp512 flat.
  • Large model: tg128, pp512 and pp2/4/8 flat. Our own multi-column kernels serve the small batches, so the mat-vec change doesn't reach them.

Checks

  • test-backend-ops -b MTL0 -o MUL_MAT: 3201/3201.
  • Greedy output identical to prism (and to the CPU backend).

From upstream master, unchanged:
- ggml-org#32947 (52f6e02): commit the graph in chunks with one command
  buffer thread
- ggml-org#33034 (7135e2f): spread the short mat-vec lanes over src1 rows

The original commit messages and authorship are on the upstream PRs.

Apple M5 Max, prism 76ef9d2 vs this, llama-bench -fa 1, interleaved, 2 x 3 reps:
- small model: tg128 +3.2%, pp512 flat
- large model: tg128, pp512 and pp2/4/8 flat
test-backend-ops -b MTL0 -o MUL_MAT 3201/3201; greedy output identical.
@bri-prism
bri-prism merged commit 7e9b670 into prism Nov 27, 2026
10 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant