From 2cf0d9ef3b1a5ad19a84574e800462a8db4e2ec2 Mon Sep 17 00:00:00 2001 From: Dongyan Qian Date: Sat, 8 Feb 2025 10:05:32 +0800 Subject: [PATCH] ggml-cpu-aarch64: Fix compilation issues In function 'block_q4_0x4 make_block_q4_0x4(block_q4_0*, unsigned int)', inlined from 'int repack_q4_0_to_q4_0_4_bl(ggml_tensor*, int, const void*, size_t)' at ggml-cpu-aarch64.cpp:3614:19: warning: writing 32 bytes into a region of size 0 [-Wstringop-overflow=] 3614 | memcpy(&out.qs[dst_offset], &elems, sizeof(uint64_t)); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ggml-cpu-aarch64.cpp: In function 'int repack_q4_0_to_q4_0_4_bl(ggml_tensor*, int, const void*, size_t)': ggml-cpu-aarch64.cpp:3685:20: note: at offset 72 into destination object '' of size 72 3685 | *dst++ = make_block_q4_0x4(dst_tmp, interleave_block); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Dongyan Qian --- ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp b/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp index b311a5b1c4b73..bf2239747e9ad 100644 --- a/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp +++ b/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp @@ -40,7 +40,7 @@ static_assert(sizeof(block<4, 8>) == 8 * sizeof(ggml_half) + QK8_0 * 4, "wrong b static_assert(sizeof(block<8, 4>) == 4 * sizeof(ggml_half) + QK8_0 * 4, "wrong block<8,4> size/padding"); static_assert(sizeof(block<8, 8>) == 8 * sizeof(ggml_half) + QK8_0 * 8, "wrong block<8,8> size/padding"); -using block_q4_0x4 = block<4, 4>; +using block_q4_0x4 = block<4, QK4_0>; using block_q4_0x8 = block<4, 8>; using block_q8_0x4 = block<8, 4>; using block_q8_0x8 = block<8, 8>;