ggml : designate enum vals for integer types (#6050)

This commit is contained in:
Georgi Gerganov 2024-03-14 12:38:37 +02:00 committed by GitHub
parent 68265ebfc6
commit 3fe8d7a17f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

10
ggml.h
View File

@ -337,18 +337,18 @@ extern "C" {
struct ggml_object; struct ggml_object;
struct ggml_context; struct ggml_context;
// NOTE: always add types at the end of the enum to keep backward compatibility
enum ggml_type { enum ggml_type {
GGML_TYPE_F32 = 0, GGML_TYPE_F32 = 0,
GGML_TYPE_F16 = 1, GGML_TYPE_F16 = 1,
GGML_TYPE_Q4_0 = 2, GGML_TYPE_Q4_0 = 2,
GGML_TYPE_Q4_1 = 3, GGML_TYPE_Q4_1 = 3,
// GGML_TYPE_Q4_2 = 4, support has been removed // GGML_TYPE_Q4_2 = 4, support has been removed
// GGML_TYPE_Q4_3 (5) support has been removed // GGML_TYPE_Q4_3 = 5, support has been removed
GGML_TYPE_Q5_0 = 6, GGML_TYPE_Q5_0 = 6,
GGML_TYPE_Q5_1 = 7, GGML_TYPE_Q5_1 = 7,
GGML_TYPE_Q8_0 = 8, GGML_TYPE_Q8_0 = 8,
GGML_TYPE_Q8_1 = 9, GGML_TYPE_Q8_1 = 9,
// k-quantizations
GGML_TYPE_Q2_K = 10, GGML_TYPE_Q2_K = 10,
GGML_TYPE_Q3_K = 11, GGML_TYPE_Q3_K = 11,
GGML_TYPE_Q4_K = 12, GGML_TYPE_Q4_K = 12,
@ -363,9 +363,9 @@ extern "C" {
GGML_TYPE_IQ3_S = 21, GGML_TYPE_IQ3_S = 21,
GGML_TYPE_IQ2_S = 22, GGML_TYPE_IQ2_S = 22,
GGML_TYPE_IQ4_XS = 23, GGML_TYPE_IQ4_XS = 23,
GGML_TYPE_I8, GGML_TYPE_I8 = 24,
GGML_TYPE_I16, GGML_TYPE_I16 = 25,
GGML_TYPE_I32, GGML_TYPE_I32 = 26,
GGML_TYPE_COUNT, GGML_TYPE_COUNT,
}; };