Spaces:
Running
Running
examples : adapt to ggml.h changes (ggml/0)
Browse files- examples/common-ggml.cpp +2 -0
- ggml/include/ggml.h +3 -0
- ggml/src/ggml.c +0 -1
examples/common-ggml.cpp
CHANGED
|
@@ -215,6 +215,8 @@ bool ggml_common_quantize_0(
|
|
| 215 |
case GGML_TYPE_Q4_0_4_4:
|
| 216 |
case GGML_TYPE_Q4_0_4_8:
|
| 217 |
case GGML_TYPE_Q4_0_8_8:
|
|
|
|
|
|
|
| 218 |
case GGML_TYPE_COUNT:
|
| 219 |
{
|
| 220 |
fprintf(stderr, "%s: unsupported quantization type %d (%s)\n", __func__, ttype, ggml_type_name((ggml_type) ttype));
|
|
|
|
| 215 |
case GGML_TYPE_Q4_0_4_4:
|
| 216 |
case GGML_TYPE_Q4_0_4_8:
|
| 217 |
case GGML_TYPE_Q4_0_8_8:
|
| 218 |
+
case GGML_TYPE_TQ1_0:
|
| 219 |
+
case GGML_TYPE_TQ2_0:
|
| 220 |
case GGML_TYPE_COUNT:
|
| 221 |
{
|
| 222 |
fprintf(stderr, "%s: unsupported quantization type %d (%s)\n", __func__, ttype, ggml_type_name((ggml_type) ttype));
|
ggml/include/ggml.h
CHANGED
|
@@ -1979,6 +1979,9 @@ extern "C" {
|
|
| 1979 |
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);
|
| 1980 |
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);
|
| 1981 |
|
|
|
|
|
|
|
|
|
|
| 1982 |
GGML_API struct ggml_tensor * ggml_map_custom1(
|
| 1983 |
struct ggml_context * ctx,
|
| 1984 |
struct ggml_tensor * a,
|
|
|
|
| 1979 |
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);
|
| 1980 |
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);
|
| 1981 |
|
| 1982 |
+
#define GGML_N_TASKS_MAX (-1)
|
| 1983 |
+
// n_tasks == GGML_N_TASKS_MAX means to use max number of tasks
|
| 1984 |
+
|
| 1985 |
GGML_API struct ggml_tensor * ggml_map_custom1(
|
| 1986 |
struct ggml_context * ctx,
|
| 1987 |
struct ggml_tensor * a,
|
ggml/src/ggml.c
CHANGED
|
@@ -289,7 +289,6 @@ void ggml_abort(const char * file, int line, const char * fmt, ...) {
|
|
| 289 |
#define GGML_DEBUG 0
|
| 290 |
#define GGML_GELU_FP16
|
| 291 |
#define GGML_GELU_QUICK_FP16
|
| 292 |
-
#define GGML_N_TASKS_MAX (-1)
|
| 293 |
|
| 294 |
#define GGML_SOFT_MAX_UNROLL 4
|
| 295 |
#define GGML_VEC_DOT_UNROLL 2
|
|
|
|
| 289 |
#define GGML_DEBUG 0
|
| 290 |
#define GGML_GELU_FP16
|
| 291 |
#define GGML_GELU_QUICK_FP16
|
|
|
|
| 292 |
|
| 293 |
#define GGML_SOFT_MAX_UNROLL 4
|
| 294 |
#define GGML_VEC_DOT_UNROLL 2
|