Skip to content

metal : assert shared memory padding - #27951

Merged
ggerganov merged 2 commits into
masterfrom
gg/metal-assert-smem-pad
Aug 29, 2026
Merged

metal : assert shared memory padding#27951
ggerganov merged 2 commits into
masterfrom
gg/metal-assert-smem-pad

Conversation

@ggerganov

Copy link
Copy Markdown
Member

Overview

pick #27944

Per the Metal docs the threadgroup memory size should be multiple of 16 bytes. Add assert and adjust a few kernels that were violating this.

This is slightly different from #27944 where the padding is always done implicitly. For now, I want the callers of ggml_metal_encoder_set_threadgroup_memory_size() to be aware if this requirement

Requirements

@ggerganov
ggerganov requested a review from a team as a code owner August 29, 2026 11:02
@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning Apple Metal https://en.wikipedia.org/wiki/Metal_(API) labels Aug 29, 2026
@ggerganov
ggerganov merged commit 3173a56 into master Aug 29, 2026
31 of 34 checks passed
@ggerganov
ggerganov deleted the gg/metal-assert-smem-pad branch August 29, 2026 14:55
jbooth pushed a commit to jbooth/llama.cpp that referenced this pull request Aug 30, 2026
* metal : assert shared memory padding

* cont : add ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Apple Metal https://en.wikipedia.org/wiki/Metal_(API) ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant