iqk_mul_mat: make it build with the Makefile

This commit is contained in:
Kawrakow
2024-06-08 09:55:47 +03:00
parent c7870afaad
commit 8b03121c33
2 changed files with 7 additions and 3 deletions

View File

@@ -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 $@

1
ggml.c
View File

@@ -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++)