Skip to content

Commit b042b55

Browse files
committed
Disable I2_K cpu quantization.
To allow compilation.
1 parent 604bbc6 commit b042b55

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

ggml/src/ggml-cpu/ggml-cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ static const struct ggml_type_traits_cpu type_traits_cpu[GGML_TYPE_COUNT] = {
363363
.nrows = 1,
364364
},
365365
[GGML_TYPE_IQ2_K] = {
366-
.from_float = quantize_row_iq2_k,
366+
// .from_float = quantize_row_iq2_k,
367367
.vec_dot = ggml_vec_dot_iq2_k_q8_K,
368368
.vec_dot_type = GGML_TYPE_Q8_K,
369369
.nrows = 1,

ggml/src/ggml-cpu/quants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void quantize_row_tq2_0(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, i
3535
void quantize_row_iq4_nl (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
3636
void quantize_row_iq4_xs (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
3737

38-
void quantize_row_iq2_k (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
38+
// void quantize_row_iq2_k (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
3939
void quantize_row_iq3_k (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
4040
void quantize_row_iq4_k (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
4141
void quantize_row_iq5_k (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);

ggml/src/ggml-quants.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5487,7 +5487,7 @@ inline int best_index_iq2nl(const int8_t * values, float x) {
54875487
return x - values[idx] < values[idx+1] - x ? idx : idx + 1;
54885488
}
54895489

5490-
static void quantize_row_iq2_k_impl(const float * x, void * vy, int n_per_row, const float * quant_weights) {
5490+
/* static void quantize_row_iq2_k_impl(const float * x, void * vy, int n_per_row, const float * quant_weights) {
54915491
54925492
constexpr int kBlockSize = 16;
54935493
@@ -5645,7 +5645,7 @@ size_t quantize_iq2_k(const float * src, void * dst, int64_t nrows, int64_t n_pe
56455645
qrow += nblock*sizeof(block_iq2_k);
56465646
}
56475647
return nrows * nblock * sizeof(block_iq2_k);
5648-
}
5648+
} */
56495649

56505650
void dequantize_row_iq2_k(const block_iq2_k * x, float * y, int64_t k) {
56515651
assert(k % QK_K == 0);
@@ -5696,7 +5696,7 @@ inline int best_index_iq3nl(const int8_t * values, float x) {
56965696
}
56975697
static void quantize_row_iq3_k_impl(const float * x, void * vy, int n_per_row, const float * quant_weights) {
56985698

5699-
constexpr int ntry = 3;
5699+
int ntry = 3;
57005700

57015701
block_iq3_k * y = (block_iq3_k *)vy;
57025702

ggml/src/ggml-quants.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ GGML_API void quantize_row_iq4_xs_ref (const float * GGML_RESTRICT x, block_iq4_
4040
GGML_API void quantize_row_iq3_s_ref (const float * GGML_RESTRICT x, block_iq3_s * GGML_RESTRICT y, int64_t k);
4141
GGML_API void quantize_row_iq2_s_ref (const float * GGML_RESTRICT x, block_iq2_s * GGML_RESTRICT y, int64_t k);
4242

43-
GGML_API void quantize_row_iq2_k_ref (const float * GGML_RESTRICT x, block_iq2_k * GGML_RESTRICT y, int64_t k);
44-
GGML_API void quantize_row_iq3_k_ref (const float * GGML_RESTRICT x, block_iq3_k * GGML_RESTRICT y, int64_t k);
43+
// GGML_API void quantize_row_iq2_k_ref (const float * GGML_RESTRICT x, block_iq2_k * GGML_RESTRICT y, int64_t k);
44+
GGML_API void quantize_row_iq3_k_ref (const float * GGML_RESTRICT x, block_iq3_k * GGML_RESTRICT y, int64_t k);
4545
GGML_API void quantize_row_iq4_k_ref (const float * GGML_RESTRICT x, block_iq4_k * GGML_RESTRICT y, int64_t k);
4646
GGML_API void quantize_row_iq5_k_ref (const float * GGML_RESTRICT x, block_iq5_k * GGML_RESTRICT y, int64_t k);
4747
GGML_API void quantize_row_iq6_k_ref (const float * GGML_RESTRICT x, block_iq6_k * GGML_RESTRICT y, int64_t k);
@@ -135,7 +135,7 @@ GGML_API size_t quantize_q5_1(const float * GGML_RESTRICT src, void * GGML_RESTR
135135
GGML_API size_t quantize_q6_0(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
136136
GGML_API size_t quantize_q8_0(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
137137

138-
GGML_API size_t quantize_iq2_k(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
138+
// GGML_API size_t quantize_iq2_k(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
139139
GGML_API size_t quantize_iq3_k(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
140140
GGML_API size_t quantize_iq4_k(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
141141
GGML_API size_t quantize_iq5_k(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);

ggml/src/ggml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ static const struct ggml_type_traits type_traits[GGML_TYPE_COUNT] = {
883883
.is_quantized = true,
884884
.to_float = (ggml_to_float_t) dequantize_row_iq2_k,
885885
// .from_float = quantize_row_iq2_k,
886-
.from_float_ref = (ggml_from_float_t) quantize_row_iq2_k_ref,
886+
// .from_float_ref = (ggml_from_float_t) quantize_row_iq2_k_ref,
887887
// .vec_dot = vec_dot_iq2_k_q8_k,
888888
// .vec_dot_type = GGML_TYPE_Q8_K,
889889
// .nrows = 1,

0 commit comments

Comments
 (0)