mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-26 11:24:35 +00:00
ggml : explicitly initialize deprecated type traits
This commit is contained in:
parent
a1c3ff68cd
commit
334984e457
22
ggml.c
22
ggml.c
@ -422,6 +422,28 @@ static const ggml_type_traits_t type_traits[GGML_TYPE_COUNT] = {
|
|||||||
.vec_dot = ggml_vec_dot_q4_1_q8_1,
|
.vec_dot = ggml_vec_dot_q4_1_q8_1,
|
||||||
.vec_dot_type = GGML_TYPE_Q8_1,
|
.vec_dot_type = GGML_TYPE_Q8_1,
|
||||||
},
|
},
|
||||||
|
[4] = { // GGML_TYPE_Q4_2
|
||||||
|
.type_name = "DEPRECATED",
|
||||||
|
.blck_size = 0,
|
||||||
|
.type_size = 0,
|
||||||
|
.is_quantized = false,
|
||||||
|
.to_float = NULL,
|
||||||
|
.from_float = NULL,
|
||||||
|
.from_float_reference = NULL,
|
||||||
|
.vec_dot = NULL,
|
||||||
|
.vec_dot_type = GGML_TYPE_COUNT,
|
||||||
|
},
|
||||||
|
[5] = { // GGML_TYPE_Q4_3
|
||||||
|
.type_name = "DEPRECATED",
|
||||||
|
.blck_size = 0,
|
||||||
|
.type_size = 0,
|
||||||
|
.is_quantized = false,
|
||||||
|
.to_float = NULL,
|
||||||
|
.from_float = NULL,
|
||||||
|
.from_float_reference = NULL,
|
||||||
|
.vec_dot = NULL,
|
||||||
|
.vec_dot_type = GGML_TYPE_COUNT,
|
||||||
|
},
|
||||||
[GGML_TYPE_Q5_0] = {
|
[GGML_TYPE_Q5_0] = {
|
||||||
.type_name = "q5_0",
|
.type_name = "q5_0",
|
||||||
.blck_size = QK5_0,
|
.blck_size = QK5_0,
|
||||||
|
@ -129,6 +129,13 @@ int main(int argc, char * argv[]) {
|
|||||||
ggml_type type = (ggml_type) i;
|
ggml_type type = (ggml_type) i;
|
||||||
ggml_type_traits_t qfns = ggml_internal_get_type_traits(type);
|
ggml_type_traits_t qfns = ggml_internal_get_type_traits(type);
|
||||||
|
|
||||||
|
// deprecated - skip
|
||||||
|
if (qfns.blck_size == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("Testing %s\n", ggml_type_name((ggml_type) i));
|
||||||
|
|
||||||
if (qfns.from_float && qfns.to_float) {
|
if (qfns.from_float && qfns.to_float) {
|
||||||
const float total_error = total_quantization_error(qfns, test_size, test_data.data());
|
const float total_error = total_quantization_error(qfns, test_size, test_data.data());
|
||||||
const float max_quantization_error =
|
const float max_quantization_error =
|
||||||
|
Loading…
Reference in New Issue
Block a user