From: Georgi Gerganov Date: Fri, 20 Sep 2024 18:50:16 +0000 (+0300) Subject: examples : adapt to ggml.h changes (ggml/0) X-Git-Tag: upstream/1.7.4~393 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=54e50957658fd9f26408a237dea0bc828b91fe0c;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp examples : adapt to ggml.h changes (ggml/0) ggml-ci --- diff --git a/examples/common-ggml.cpp b/examples/common-ggml.cpp index a3f2c12f..760cd1f4 100644 --- a/examples/common-ggml.cpp +++ b/examples/common-ggml.cpp @@ -215,6 +215,8 @@ bool ggml_common_quantize_0( case GGML_TYPE_Q4_0_4_4: case GGML_TYPE_Q4_0_4_8: case GGML_TYPE_Q4_0_8_8: + case GGML_TYPE_TQ1_0: + case GGML_TYPE_TQ2_0: case GGML_TYPE_COUNT: { fprintf(stderr, "%s: unsupported quantization type %d (%s)\n", __func__, ttype, ggml_type_name((ggml_type) ttype)); diff --git a/ggml/include/ggml.h b/ggml/include/ggml.h index 2035001e..76294fff 100644 --- a/ggml/include/ggml.h +++ b/ggml/include/ggml.h @@ -1979,6 +1979,9 @@ extern "C" { typedef void (*ggml_custom2_op_t)(struct ggml_tensor * dst , const struct ggml_tensor * a, const struct ggml_tensor * b, int ith, int nth, void * userdata); typedef void (*ggml_custom3_op_t)(struct ggml_tensor * dst , const struct ggml_tensor * a, const struct ggml_tensor * b, const struct ggml_tensor * c, int ith, int nth, void * userdata); +#define GGML_N_TASKS_MAX (-1) + // n_tasks == GGML_N_TASKS_MAX means to use max number of tasks + GGML_API struct ggml_tensor * ggml_map_custom1( struct ggml_context * ctx, struct ggml_tensor * a, diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index 201d5466..28e19373 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -289,7 +289,6 @@ void ggml_abort(const char * file, int line, const char * fmt, ...) { #define GGML_DEBUG 0 #define GGML_GELU_FP16 #define GGML_GELU_QUICK_FP16 -#define GGML_N_TASKS_MAX (-1) #define GGML_SOFT_MAX_UNROLL 4 #define GGML_VEC_DOT_UNROLL 2