summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIwan Kawrakow <iwan.kawrakow@gmail.com>2024-06-08 09:55:47 +0300
committerIwan Kawrakow <iwan.kawrakow@gmail.com>2024-06-22 12:02:50 +0300
commit8b95156e83a10f180f6635bceccc3d577ce83130 (patch)
treee25e3764ae834de3bb31b053fc917f3412ed0265
parentcd3d8ae0e719b47fb0ef63b0f7b9e1dacbab7de1 (diff)
iqk_mul_mat: make it build with the Makefile
-rw-r--r--Makefile9
-rw-r--r--ggml.c1
2 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 02f6362f..af9f72cb 100644
--- a/Makefile
+++ b/Makefile
@@ -170,8 +170,8 @@ endif
# keep standard at C11 and C++11
MK_CPPFLAGS = -I. -Icommon
-MK_CFLAGS = -std=c11 -fPIC -v
-MK_CXXFLAGS = -std=c++11 -fPIC -v
+MK_CFLAGS = -std=c11 -fPIC
+MK_CXXFLAGS = -std=c++17 -fPIC
MK_NVCCFLAGS = -std=c++11
# -Ofast tends to produce faster code, but may not be available for some compilers.
@@ -475,6 +475,8 @@ ifdef LLAMA_BLIS
OBJS += ggml-blas.o
endif # LLAMA_BLIS
+OBJS += iqk_mul_mat.o
+
ifndef LLAMA_NO_LLAMAFILE
MK_CPPFLAGS += -DGGML_USE_LLAMAFILE
OBJS += sgemm.o
@@ -702,6 +704,9 @@ OBJS += ggml-alloc.o ggml-backend.o ggml-quants.o unicode.o unicode-data.o
COMMON_H_DEPS = common/common.h common/sampling.h common/log.h llama.h
COMMON_DEPS = common.o sampling.o grammar-parser.o build-info.o json-schema-to-grammar.o
+iqk_mul_mat.o: iqk_mul_mat.cpp ggml-impl.h ggml.h ggml-quants.h ggml-common.h iqk_mul_mat.h
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
ifndef LLAMA_NO_LLAMAFILE
sgemm.o: sgemm.cpp sgemm.h ggml.h
$(CXX) $(CXXFLAGS) -c $< -o $@
diff --git a/ggml.c b/ggml.c
index 985fc26f..ccab8a57 100644
--- a/ggml.c
+++ b/ggml.c
@@ -12388,7 +12388,6 @@ IQK_MulMat_Not_Available:;
#if GGML_USE_LLAMAFILE
if (src1->type != vec_dot_type) {
- const void* wdata = (src1->type == vec_dot_type) ? src1->data : params->wdata;
const size_t row_size = ggml_row_size(vec_dot_type, ne10);
for (int64_t i13 = 0; i13 < ne13; i13++)