ggml : fix ggml_backend_buft_get_alloc_size() guard (#28038)

This commit is contained in:
Georgi Gerganov
2026-08-30 20:25:15 +03:00
committed by GitHub
parent 62acc89c26
commit 6d1479c148
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -915,6 +915,7 @@ static size_t ggml_backend_cuda_buffer_type_get_alloc_size(ggml_backend_buffer_t
: ggml_nbytes(tensor);
int64_t ne0 = tensor->ne[0];
// [TAG_ALLOC_SIZE_EXPAND]
if (ggml_is_quantized(tensor->type)) {
if (ne0 % MATRIX_ROW_PADDING != 0) {
GGML_ASSERT(tensor->nb[0] == ggml_element_size(tensor));