metal : assert shared memory padding (#27951)

* metal : assert shared memory padding

* cont : add ref
This commit is contained in:
Georgi Gerganov
2026-08-29 17:55:15 +03:00
committed by GitHub
parent 17252c769a
commit 3173a56471
3 changed files with 6 additions and 2 deletions
+3
View File
@@ -800,6 +800,9 @@ void ggml_metal_encoder_set_buffer(ggml_metal_encoder_t encoder, struct ggml_met
}
void ggml_metal_encoder_set_threadgroup_memory_size(ggml_metal_encoder_t encoder, size_t size, int idx) {
// ref: https://developer.apple.com/documentation/metal/mtlcomputecommandencoder/setthreadgroupmemorylength(_:index:)
GGML_ASSERT(size % 16 == 0);
[encoder->obj setThreadgroupMemoryLength:size atIndex:idx];
}