Skip to content

Commit 2576c16

Browse files
committed
ggml : fix Q5_0 qh -> uint32_t
1 parent 5bebc0a commit 2576c16

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ggml-cuda.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ static_assert(sizeof(block_q4_3) == 2 * sizeof(ggml_fp16_t) + QK4_3 / 2, "wrong
4141
typedef struct {
4242
__half d; // delta
4343
__half m; // min
44-
int32_t qh; // 5-th bit of quants
44+
uint32_t qh; // 5-th bit of quants
4545
uint8_t qs[QK5_0 / 2]; // nibbles / quants
4646
} block_q5_0;
47-
static_assert(sizeof(block_q5_0) == 2 * sizeof(ggml_fp16_t) + sizeof(int32_t) + QK5_0 / 2, "wrong q5_0 block size/padding");
47+
static_assert(sizeof(block_q5_0) == 2 * sizeof(ggml_fp16_t) + sizeof(uint32_t) + QK5_0 / 2, "wrong q5_0 block size/padding");
4848

4949
#define QK8_0 32
5050
typedef struct {

ggml.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,10 +677,10 @@ static_assert(sizeof(block_q4_3) == 2 * sizeof(ggml_fp16_t) + QK4_3 / 2, "wrong
677677
typedef struct {
678678
ggml_fp16_t d; // delta
679679
ggml_fp16_t m; // min
680-
int32_t qh; // 5-th bit of quants
680+
uint32_t qh; // 5-th bit of quants
681681
uint8_t qs[QK5_0 / 2]; // nibbles / quants
682682
} block_q5_0;
683-
static_assert(sizeof(block_q5_0) == 2 * sizeof(ggml_fp16_t) + sizeof(int32_t) + QK5_0 / 2, "wrong q5_0 block size/padding");
683+
static_assert(sizeof(block_q5_0) == 2 * sizeof(ggml_fp16_t) + sizeof(uint32_t) + QK5_0 / 2, "wrong q5_0 block size/padding");
684684

685685
#define QK8_0 32
686686
typedef struct {

0 commit comments

Comments
 (0)