Skip to content

Distribute and run LLMs with a single file.

Restore support for non-AVX microprocessors

Justine Tunneya674cfb00337
diff --git a/build/config.mk b/build/config.mk
index d48def45..ff1a015d 100644
--- a/build/config.mk
+++ b/build/config.mk
@@ -16,7 +16,7 @@ ARFLAGS = rcsD
CXXFLAGS = -frtti -std=gnu++23
CCFLAGS = -O -fexceptions -fsignaling-nans -ffunction-sections -fdata-sections
CPPFLAGS_ = -iquote. -mcosmo -DGGML_MULTIPLATFORM -Wno-attributes -DLLAMAFILE_DEBUG
-TARGET_ARCH = -Xx86_64-mavx -Xx86_64-mtune=znver4
+TARGET_ARCH = -Xx86_64-mtune=znver4
TMPDIR = o//tmp
IGNORE := $(shell mkdir -p $(TMPDIR))
diff --git a/llama.cpp/BUILD.mk b/llama.cpp/BUILD.mk
index 0ef3fafd..7a3e3803 100644
--- a/llama.cpp/BUILD.mk
+++ b/llama.cpp/BUILD.mk
@@ -54,17 +54,21 @@ o/$(MODE)/llama.cpp/common.o: \
private CCFLAGS += -Os
o/$(MODE)/llama.cpp/ggml-quants.o: private CXXFLAGS += -Os
-o/$(MODE)/llama.cpp/ggml-quants-amd-avx.o: private TARGET_ARCH += -Xx86_64-mtune=sandybridge
-o/$(MODE)/llama.cpp/ggml-quants-amd-avx2.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2
-o/$(MODE)/llama.cpp/ggml-quants-amd-avx512.o: private TARGET_ARCH += -Xx86_64-mtune=cannonlake -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f
+o/$(MODE)/llama.cpp/ggml-quants-amd-k8.o: private TARGET_ARCH += -Xx86_64-mtune=k8
+o/$(MODE)/llama.cpp/ggml-quants-amd-ssse3.o: private TARGET_ARCH += -Xx86_64-mtune=core2 -Xx86_64-mssse3
+o/$(MODE)/llama.cpp/ggml-quants-amd-avx.o: private TARGET_ARCH += -Xx86_64-mtune=sandybridge -Xx86_64-mavx
+o/$(MODE)/llama.cpp/ggml-quants-amd-avx2.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2
+o/$(MODE)/llama.cpp/ggml-quants-amd-avx512.o: private TARGET_ARCH += -Xx86_64-mtune=cannonlake -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f
o/$(MODE)/llama.cpp/ggml-vector.o: private CXXFLAGS += -Os
-o/$(MODE)/llama.cpp/ggml-vector-amd-avx.o: private TARGET_ARCH += -Xx86_64-mtune=sandybridge
-o/$(MODE)/llama.cpp/ggml-vector-amd-fma.o: private TARGET_ARCH += -Xx86_64-mtune=bdver2 -Xx86_64-mfma
-o/$(MODE)/llama.cpp/ggml-vector-amd-f16c.o: private TARGET_ARCH += -Xx86_64-mtune=ivybridge -Xx86_64-mf16c
-o/$(MODE)/llama.cpp/ggml-vector-amd-avx2.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2
-o/$(MODE)/llama.cpp/ggml-vector-amd-avx512.o: private TARGET_ARCH += -Xx86_64-mtune=cannonlake -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f
-o/$(MODE)/llama.cpp/ggml-vector-amd-avx512bf16.o: private TARGET_ARCH += -Xx86_64-mtune=znver4 -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f -Xx86_64-mavx512vl -Xx86_64-mavx512bf16
+o/$(MODE)/llama.cpp/ggml-vector-amd-k8.o: private TARGET_ARCH += -Xx86_64-mtune=k8
+o/$(MODE)/llama.cpp/ggml-vector-amd-ssse3.o: private TARGET_ARCH += -Xx86_64-mtune=core2 -Xx86_64-mssse3
+o/$(MODE)/llama.cpp/ggml-vector-amd-avx.o: private TARGET_ARCH += -Xx86_64-mtune=sandybridge -Xx86_64-mavx
+o/$(MODE)/llama.cpp/ggml-vector-amd-fma.o: private TARGET_ARCH += -Xx86_64-mtune=bdver2 -Xx86_64-mavx -Xx86_64-mfma
+o/$(MODE)/llama.cpp/ggml-vector-amd-f16c.o: private TARGET_ARCH += -Xx86_64-mtune=ivybridge -Xx86_64-mavx -Xx86_64-mf16c
+o/$(MODE)/llama.cpp/ggml-vector-amd-avx2.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2
+o/$(MODE)/llama.cpp/ggml-vector-amd-avx512.o: private TARGET_ARCH += -Xx86_64-mtune=cannonlake -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f
+o/$(MODE)/llama.cpp/ggml-vector-amd-avx512bf16.o: private TARGET_ARCH += -Xx86_64-mtune=znver4 -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f -Xx86_64-mavx512vl -Xx86_64-mavx512bf16
o/$(MODE)/llama.cpp/ggml-vector-arm82.o: private TARGET_ARCH += -Xaarch64-march=armv8.2-a+fp16
$(LLAMA_CPP_OBJS): llama.cpp/BUILD.mk
diff --git a/llama.cpp/ggml-quants-amd-k8.c b/llama.cpp/ggml-quants-amd-k8.c
new file mode 100644
index 00000000..33dc6344
--- /dev/null
+++ b/llama.cpp/ggml-quants-amd-k8.c
@@ -0,0 +1,100 @@
+#ifdef __x86_64__
+#define quantize_row_q4_0_reference quantize_row_q4_0_reference_amd_k8
+#define quantize_row_q4_1_reference quantize_row_q4_1_reference_amd_k8
+#define quantize_row_q5_0_reference quantize_row_q5_0_reference_amd_k8
+#define quantize_row_q5_1_reference quantize_row_q5_1_reference_amd_k8
+#define quantize_row_q8_0_reference quantize_row_q8_0_reference_amd_k8
+#define quantize_row_q8_1_reference quantize_row_q8_1_reference_amd_k8
+#define quantize_row_q2_K_reference quantize_row_q2_K_reference_amd_k8
+#define quantize_row_q3_K_reference quantize_row_q3_K_reference_amd_k8
+#define quantize_row_q4_K_reference quantize_row_q4_K_reference_amd_k8
+#define quantize_row_q5_K_reference quantize_row_q5_K_reference_amd_k8
+#define quantize_row_q6_K_reference quantize_row_q6_K_reference_amd_k8
+#define quantize_row_q8_K_reference quantize_row_q8_K_reference_amd_k8
+#define quantize_row_iq3_xxs_reference quantize_row_iq3_xxs_reference_amd_k8
+#define quantize_row_iq4_nl_reference quantize_row_iq4_nl_reference_amd_k8
+#define quantize_row_iq4_xs_reference quantize_row_iq4_xs_reference_amd_k8
+#define quantize_row_iq3_s_reference quantize_row_iq3_s_reference_amd_k8
+#define quantize_row_iq2_s_reference quantize_row_iq2_s_reference_amd_k8
+#define quantize_row_q4_0 quantize_row_q4_0_amd_k8
+#define quantize_row_q4_1 quantize_row_q4_1_amd_k8
+#define quantize_row_q5_0 quantize_row_q5_0_amd_k8
+#define quantize_row_q5_1 quantize_row_q5_1_amd_k8
+#define quantize_row_q8_0 quantize_row_q8_0_amd_k8
+#define quantize_row_q8_1 quantize_row_q8_1_amd_k8
+#define quantize_row_q2_K quantize_row_q2_K_amd_k8
+#define quantize_row_q3_K quantize_row_q3_K_amd_k8
+#define quantize_row_q4_K quantize_row_q4_K_amd_k8
+#define quantize_row_q5_K quantize_row_q5_K_amd_k8
+#define quantize_row_q6_K quantize_row_q6_K_amd_k8
+#define quantize_row_q8_K quantize_row_q8_K_amd_k8
+#define quantize_row_iq3_xxs quantize_row_iq3_xxs_amd_k8
+#define quantize_row_iq4_nl quantize_row_iq4_nl_amd_k8
+#define quantize_row_iq4_xs quantize_row_iq4_xs_amd_k8
+#define quantize_row_iq3_s quantize_row_iq3_s_amd_k8
+#define quantize_row_iq2_s quantize_row_iq2_s_amd_k8
+#define dequantize_row_q4_0 dequantize_row_q4_0_amd_k8
+#define dequantize_row_q4_1 dequantize_row_q4_1_amd_k8
+#define dequantize_row_q5_0 dequantize_row_q5_0_amd_k8
+#define dequantize_row_q5_1 dequantize_row_q5_1_amd_k8
+#define dequantize_row_q8_0 dequantize_row_q8_0_amd_k8
+#define dequantize_row_q2_K dequantize_row_q2_K_amd_k8
+#define dequantize_row_q3_K dequantize_row_q3_K_amd_k8
+#define dequantize_row_q4_K dequantize_row_q4_K_amd_k8
+#define dequantize_row_q5_K dequantize_row_q5_K_amd_k8
+#define dequantize_row_q6_K dequantize_row_q6_K_amd_k8
+#define dequantize_row_q8_K dequantize_row_q8_K_amd_k8
+#define dequantize_row_iq2_xxs dequantize_row_iq2_xxs_amd_k8
+#define dequantize_row_iq2_xs dequantize_row_iq2_xs_amd_k8
+#define dequantize_row_iq2_s dequantize_row_iq2_s_amd_k8
+#define dequantize_row_iq3_xxs dequantize_row_iq3_xxs_amd_k8
+#define dequantize_row_iq1_s dequantize_row_iq1_s_amd_k8
+#define dequantize_row_iq1_m dequantize_row_iq1_m_amd_k8
+#define dequantize_row_iq4_nl dequantize_row_iq4_nl_amd_k8
+#define dequantize_row_iq4_xs dequantize_row_iq4_xs_amd_k8
+#define dequantize_row_iq3_s dequantize_row_iq3_s_amd_k8
+#define ggml_vec_dot_q4_0_q8_0 ggml_vec_dot_q4_0_q8_0_amd_k8
+#define ggml_vec_dot_q4_1_q8_1 ggml_vec_dot_q4_1_q8_1_amd_k8
+#define ggml_vec_dot_q5_0_q8_0 ggml_vec_dot_q5_0_q8_0_amd_k8
+#define ggml_vec_dot_q5_1_q8_1 ggml_vec_dot_q5_1_q8_1_amd_k8
+#define ggml_vec_dot_q8_0_q8_0 ggml_vec_dot_q8_0_q8_0_amd_k8
+#define ggml_vec_dot_q2_K_q8_K ggml_vec_dot_q2_K_q8_K_amd_k8
+#define ggml_vec_dot_q3_K_q8_K ggml_vec_dot_q3_K_q8_K_amd_k8
+#define ggml_vec_dot_q4_K_q8_K ggml_vec_dot_q4_K_q8_K_amd_k8
+#define ggml_vec_dot_q5_K_q8_K ggml_vec_dot_q5_K_q8_K_amd_k8
+#define ggml_vec_dot_q6_K_q8_K ggml_vec_dot_q6_K_q8_K_amd_k8
+#define ggml_vec_dot_iq2_xxs_q8_K ggml_vec_dot_iq2_xxs_q8_K_amd_k8
+#define ggml_vec_dot_iq2_xs_q8_K ggml_vec_dot_iq2_xs_q8_K_amd_k8
+#define ggml_vec_dot_iq2_s_q8_K ggml_vec_dot_iq2_s_q8_K_amd_k8
+#define ggml_vec_dot_iq3_xxs_q8_K ggml_vec_dot_iq3_xxs_q8_K_amd_k8
+#define ggml_vec_dot_iq1_s_q8_K ggml_vec_dot_iq1_s_q8_K_amd_k8
+#define ggml_vec_dot_iq1_m_q8_K ggml_vec_dot_iq1_m_q8_K_amd_k8
+#define ggml_vec_dot_iq4_nl_q8_0 ggml_vec_dot_iq4_nl_q8_0_amd_k8
+#define ggml_vec_dot_iq4_xs_q8_K ggml_vec_dot_iq4_xs_q8_K_amd_k8
+#define ggml_vec_dot_iq3_s_q8_K ggml_vec_dot_iq3_s_q8_K_amd_k8
+#define quantize_iq2_xxs quantize_iq2_xxs_amd_k8
+#define quantize_iq2_xs quantize_iq2_xs_amd_k8
+#define quantize_iq2_s quantize_iq2_s_amd_k8
+#define quantize_iq3_xxs quantize_iq3_xxs_amd_k8
+#define quantize_iq1_s quantize_iq1_s_amd_k8
+#define quantize_iq1_m quantize_iq1_m_amd_k8
+#define quantize_iq4_nl quantize_iq4_nl_amd_k8
+#define quantize_iq4_xs quantize_iq4_xs_amd_k8
+#define quantize_iq3_s quantize_iq3_s_amd_k8
+#define quantize_q2_K quantize_q2_K_amd_k8
+#define quantize_q3_K quantize_q3_K_amd_k8
+#define quantize_q4_K quantize_q4_K_amd_k8
+#define quantize_q5_K quantize_q5_K_amd_k8
+#define quantize_q6_K quantize_q6_K_amd_k8
+#define quantize_q4_0 quantize_q4_0_amd_k8
+#define quantize_q4_1 quantize_q4_1_amd_k8
+#define quantize_q5_0 quantize_q5_0_amd_k8
+#define quantize_q5_1 quantize_q5_1_amd_k8
+#define quantize_q8_0 quantize_q8_0_amd_k8
+#define iq2xs_init_impl iq2xs_init_impl_amd_k8
+#define iq2xs_free_impl iq2xs_free_impl_amd_k8
+#define iq3xs_init_impl iq3xs_init_impl_amd_k8
+#define iq3xs_free_impl iq3xs_free_impl_amd_k8
+#define ggml_validate_row_data ggml_validate_row_data_amd_k8
+#include "ggml-quants.inc"
+#endif // __x86_64__
diff --git a/llama.cpp/ggml-quants-amd-ssse3.c b/llama.cpp/ggml-quants-amd-ssse3.c
new file mode 100644
index 00000000..da04de3f
--- /dev/null
+++ b/llama.cpp/ggml-quants-amd-ssse3.c
@@ -0,0 +1,100 @@
+#ifdef __x86_64__
+#define quantize_row_q4_0_reference quantize_row_q4_0_reference_amd_ssse3
+#define quantize_row_q4_1_reference quantize_row_q4_1_reference_amd_ssse3
+#define quantize_row_q5_0_reference quantize_row_q5_0_reference_amd_ssse3
+#define quantize_row_q5_1_reference quantize_row_q5_1_reference_amd_ssse3
+#define quantize_row_q8_0_reference quantize_row_q8_0_reference_amd_ssse3
+#define quantize_row_q8_1_reference quantize_row_q8_1_reference_amd_ssse3
+#define quantize_row_q2_K_reference quantize_row_q2_K_reference_amd_ssse3
+#define quantize_row_q3_K_reference quantize_row_q3_K_reference_amd_ssse3
+#define quantize_row_q4_K_reference quantize_row_q4_K_reference_amd_ssse3
+#define quantize_row_q5_K_reference quantize_row_q5_K_reference_amd_ssse3
+#define quantize_row_q6_K_reference quantize_row_q6_K_reference_amd_ssse3
+#define quantize_row_q8_K_reference quantize_row_q8_K_reference_amd_ssse3
+#define quantize_row_iq3_xxs_reference quantize_row_iq3_xxs_reference_amd_ssse3
+#define quantize_row_iq4_nl_reference quantize_row_iq4_nl_reference_amd_ssse3
+#define quantize_row_iq4_xs_reference quantize_row_iq4_xs_reference_amd_ssse3
+#define quantize_row_iq3_s_reference quantize_row_iq3_s_reference_amd_ssse3
+#define quantize_row_iq2_s_reference quantize_row_iq2_s_reference_amd_ssse3
+#define quantize_row_q4_0 quantize_row_q4_0_amd_ssse3
+#define quantize_row_q4_1 quantize_row_q4_1_amd_ssse3
+#define quantize_row_q5_0 quantize_row_q5_0_amd_ssse3
+#define quantize_row_q5_1 quantize_row_q5_1_amd_ssse3
+#define quantize_row_q8_0 quantize_row_q8_0_amd_ssse3
+#define quantize_row_q8_1 quantize_row_q8_1_amd_ssse3
+#define quantize_row_q2_K quantize_row_q2_K_amd_ssse3
+#define quantize_row_q3_K quantize_row_q3_K_amd_ssse3
+#define quantize_row_q4_K quantize_row_q4_K_amd_ssse3
+#define quantize_row_q5_K quantize_row_q5_K_amd_ssse3
+#define quantize_row_q6_K quantize_row_q6_K_amd_ssse3
+#define quantize_row_q8_K quantize_row_q8_K_amd_ssse3
+#define quantize_row_iq3_xxs quantize_row_iq3_xxs_amd_ssse3
+#define quantize_row_iq4_nl quantize_row_iq4_nl_amd_ssse3
+#define quantize_row_iq4_xs quantize_row_iq4_xs_amd_ssse3
+#define quantize_row_iq3_s quantize_row_iq3_s_amd_ssse3
+#define quantize_row_iq2_s quantize_row_iq2_s_amd_ssse3
+#define dequantize_row_q4_0 dequantize_row_q4_0_amd_ssse3
+#define dequantize_row_q4_1 dequantize_row_q4_1_amd_ssse3
+#define dequantize_row_q5_0 dequantize_row_q5_0_amd_ssse3
+#define dequantize_row_q5_1 dequantize_row_q5_1_amd_ssse3
+#define dequantize_row_q8_0 dequantize_row_q8_0_amd_ssse3
+#define dequantize_row_q2_K dequantize_row_q2_K_amd_ssse3
+#define dequantize_row_q3_K dequantize_row_q3_K_amd_ssse3
+#define dequantize_row_q4_K dequantize_row_q4_K_amd_ssse3
+#define dequantize_row_q5_K dequantize_row_q5_K_amd_ssse3
+#define dequantize_row_q6_K dequantize_row_q6_K_amd_ssse3
+#define dequantize_row_q8_K dequantize_row_q8_K_amd_ssse3
+#define dequantize_row_iq2_xxs dequantize_row_iq2_xxs_amd_ssse3
+#define dequantize_row_iq2_xs dequantize_row_iq2_xs_amd_ssse3
+#define dequantize_row_iq2_s dequantize_row_iq2_s_amd_ssse3
+#define dequantize_row_iq3_xxs dequantize_row_iq3_xxs_amd_ssse3
+#define dequantize_row_iq1_s dequantize_row_iq1_s_amd_ssse3
+#define dequantize_row_iq1_m dequantize_row_iq1_m_amd_ssse3
+#define dequantize_row_iq4_nl dequantize_row_iq4_nl_amd_ssse3
+#define dequantize_row_iq4_xs dequantize_row_iq4_xs_amd_ssse3
+#define dequantize_row_iq3_s dequantize_row_iq3_s_amd_ssse3
+#define ggml_vec_dot_q4_0_q8_0 ggml_vec_dot_q4_0_q8_0_amd_ssse3
+#define ggml_vec_dot_q4_1_q8_1 ggml_vec_dot_q4_1_q8_1_amd_ssse3
+#define ggml_vec_dot_q5_0_q8_0 ggml_vec_dot_q5_0_q8_0_amd_ssse3
+#define ggml_vec_dot_q5_1_q8_1 ggml_vec_dot_q5_1_q8_1_amd_ssse3
+#define ggml_vec_dot_q8_0_q8_0 ggml_vec_dot_q8_0_q8_0_amd_ssse3
+#define ggml_vec_dot_q2_K_q8_K ggml_vec_dot_q2_K_q8_K_amd_ssse3
+#define ggml_vec_dot_q3_K_q8_K ggml_vec_dot_q3_K_q8_K_amd_ssse3
+#define ggml_vec_dot_q4_K_q8_K ggml_vec_dot_q4_K_q8_K_amd_ssse3
+#define ggml_vec_dot_q5_K_q8_K ggml_vec_dot_q5_K_q8_K_amd_ssse3
+#define ggml_vec_dot_q6_K_q8_K ggml_vec_dot_q6_K_q8_K_amd_ssse3
+#define ggml_vec_dot_iq2_xxs_q8_K ggml_vec_dot_iq2_xxs_q8_K_amd_ssse3
+#define ggml_vec_dot_iq2_xs_q8_K ggml_vec_dot_iq2_xs_q8_K_amd_ssse3
+#define ggml_vec_dot_iq2_s_q8_K ggml_vec_dot_iq2_s_q8_K_amd_ssse3
+#define ggml_vec_dot_iq3_xxs_q8_K ggml_vec_dot_iq3_xxs_q8_K_amd_ssse3
+#define ggml_vec_dot_iq1_s_q8_K ggml_vec_dot_iq1_s_q8_K_amd_ssse3
+#define ggml_vec_dot_iq1_m_q8_K ggml_vec_dot_iq1_m_q8_K_amd_ssse3
+#define ggml_vec_dot_iq4_nl_q8_0 ggml_vec_dot_iq4_nl_q8_0_amd_ssse3
+#define ggml_vec_dot_iq4_xs_q8_K ggml_vec_dot_iq4_xs_q8_K_amd_ssse3
+#define ggml_vec_dot_iq3_s_q8_K ggml_vec_dot_iq3_s_q8_K_amd_ssse3
+#define quantize_iq2_xxs quantize_iq2_xxs_amd_ssse3
+#define quantize_iq2_xs quantize_iq2_xs_amd_ssse3
+#define quantize_iq2_s quantize_iq2_s_amd_ssse3
+#define quantize_iq3_xxs quantize_iq3_xxs_amd_ssse3
+#define quantize_iq1_s quantize_iq1_s_amd_ssse3
+#define quantize_iq1_m quantize_iq1_m_amd_ssse3
+#define quantize_iq4_nl quantize_iq4_nl_amd_ssse3
+#define quantize_iq4_xs quantize_iq4_xs_amd_ssse3
+#define quantize_iq3_s quantize_iq3_s_amd_ssse3
+#define quantize_q2_K quantize_q2_K_amd_ssse3
+#define quantize_q3_K quantize_q3_K_amd_ssse3
+#define quantize_q4_K quantize_q4_K_amd_ssse3
+#define quantize_q5_K quantize_q5_K_amd_ssse3
+#define quantize_q6_K quantize_q6_K_amd_ssse3
+#define quantize_q4_0 quantize_q4_0_amd_ssse3
+#define quantize_q4_1 quantize_q4_1_amd_ssse3
+#define quantize_q5_0 quantize_q5_0_amd_ssse3
+#define quantize_q5_1 quantize_q5_1_amd_ssse3
+#define quantize_q8_0 quantize_q8_0_amd_ssse3
+#define iq2xs_init_impl iq2xs_init_impl_amd_ssse3
+#define iq2xs_free_impl iq2xs_free_impl_amd_ssse3
+#define iq3xs_init_impl iq3xs_init_impl_amd_ssse3
+#define iq3xs_free_impl iq3xs_free_impl_amd_ssse3
+#define ggml_validate_row_data ggml_validate_row_data_amd_ssse3
+#include "ggml-quants.inc"
+#endif // __x86_64__
diff --git a/llama.cpp/ggml-quants.cpp b/llama.cpp/ggml-quants.cpp
index 797d0990..4ffbaf6b 100644
--- a/llama.cpp/ggml-quants.cpp
+++ b/llama.cpp/ggml-quants.cpp
@@ -6,486 +6,680 @@
extern "C" void quantize_row_q4_0_reference_amd_avx512(const float * GGML_RESTRICT x, block_q4_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_0_reference_amd_avx2(const float * GGML_RESTRICT x, block_q4_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_0_reference_amd_avx(const float * GGML_RESTRICT x, block_q4_0 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_0_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q4_0 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_0_reference_amd_k8(const float * GGML_RESTRICT x, block_q4_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_0_reference_arm80(const float * GGML_RESTRICT x, block_q4_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_1_reference_amd_avx512(const float * GGML_RESTRICT x, block_q4_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_1_reference_amd_avx2(const float * GGML_RESTRICT x, block_q4_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_1_reference_amd_avx(const float * GGML_RESTRICT x, block_q4_1 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_1_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q4_1 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_1_reference_amd_k8(const float * GGML_RESTRICT x, block_q4_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_1_reference_arm80(const float * GGML_RESTRICT x, block_q4_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_0_reference_amd_avx512(const float * GGML_RESTRICT x, block_q5_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_0_reference_amd_avx2(const float * GGML_RESTRICT x, block_q5_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_0_reference_amd_avx(const float * GGML_RESTRICT x, block_q5_0 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_0_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q5_0 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_0_reference_amd_k8(const float * GGML_RESTRICT x, block_q5_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_0_reference_arm80(const float * GGML_RESTRICT x, block_q5_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_1_reference_amd_avx512(const float * GGML_RESTRICT x, block_q5_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_1_reference_amd_avx2(const float * GGML_RESTRICT x, block_q5_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_1_reference_amd_avx(const float * GGML_RESTRICT x, block_q5_1 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_1_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q5_1 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_1_reference_amd_k8(const float * GGML_RESTRICT x, block_q5_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_1_reference_arm80(const float * GGML_RESTRICT x, block_q5_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_0_reference_amd_avx512(const float * GGML_RESTRICT x, block_q8_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_0_reference_amd_avx2(const float * GGML_RESTRICT x, block_q8_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_0_reference_amd_avx(const float * GGML_RESTRICT x, block_q8_0 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_0_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q8_0 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_0_reference_amd_k8(const float * GGML_RESTRICT x, block_q8_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_0_reference_arm80(const float * GGML_RESTRICT x, block_q8_0 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_1_reference_amd_avx512(const float * GGML_RESTRICT x, block_q8_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_1_reference_amd_avx2(const float * GGML_RESTRICT x, block_q8_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_1_reference_amd_avx(const float * GGML_RESTRICT x, block_q8_1 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_1_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q8_1 * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_1_reference_amd_k8(const float * GGML_RESTRICT x, block_q8_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_1_reference_arm80(const float * GGML_RESTRICT x, block_q8_1 * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q2_K_reference_amd_avx512(const float * GGML_RESTRICT x, block_q2_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q2_K_reference_amd_avx2(const float * GGML_RESTRICT x, block_q2_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q2_K_reference_amd_avx(const float * GGML_RESTRICT x, block_q2_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q2_K_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q2_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q2_K_reference_amd_k8(const float * GGML_RESTRICT x, block_q2_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q2_K_reference_arm80(const float * GGML_RESTRICT x, block_q2_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q3_K_reference_amd_avx512(const float * GGML_RESTRICT x, block_q3_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q3_K_reference_amd_avx2(const float * GGML_RESTRICT x, block_q3_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q3_K_reference_amd_avx(const float * GGML_RESTRICT x, block_q3_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q3_K_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q3_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q3_K_reference_amd_k8(const float * GGML_RESTRICT x, block_q3_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q3_K_reference_arm80(const float * GGML_RESTRICT x, block_q3_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_K_reference_amd_avx512(const float * GGML_RESTRICT x, block_q4_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_K_reference_amd_avx2(const float * GGML_RESTRICT x, block_q4_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_K_reference_amd_avx(const float * GGML_RESTRICT x, block_q4_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_K_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q4_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_K_reference_amd_k8(const float * GGML_RESTRICT x, block_q4_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_K_reference_arm80(const float * GGML_RESTRICT x, block_q4_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_K_reference_amd_avx512(const float * GGML_RESTRICT x, block_q5_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_K_reference_amd_avx2(const float * GGML_RESTRICT x, block_q5_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_K_reference_amd_avx(const float * GGML_RESTRICT x, block_q5_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_K_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q5_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_K_reference_amd_k8(const float * GGML_RESTRICT x, block_q5_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_K_reference_arm80(const float * GGML_RESTRICT x, block_q5_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q6_K_reference_amd_avx512(const float * GGML_RESTRICT x, block_q6_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q6_K_reference_amd_avx2(const float * GGML_RESTRICT x, block_q6_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q6_K_reference_amd_avx(const float * GGML_RESTRICT x, block_q6_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q6_K_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q6_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q6_K_reference_amd_k8(const float * GGML_RESTRICT x, block_q6_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q6_K_reference_arm80(const float * GGML_RESTRICT x, block_q6_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_K_reference_amd_avx512(const float * GGML_RESTRICT x, block_q8_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_K_reference_amd_avx2(const float * GGML_RESTRICT x, block_q8_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_K_reference_amd_avx(const float * GGML_RESTRICT x, block_q8_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_K_reference_amd_ssse3(const float * GGML_RESTRICT x, block_q8_K * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_K_reference_amd_k8(const float * GGML_RESTRICT x, block_q8_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_K_reference_arm80(const float * GGML_RESTRICT x, block_q8_K * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_xxs_reference_amd_avx512(const float * GGML_RESTRICT x, block_iq3_xxs * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_xxs_reference_amd_avx2(const float * GGML_RESTRICT x, block_iq3_xxs * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_xxs_reference_amd_avx(const float * GGML_RESTRICT x, block_iq3_xxs * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq3_xxs_reference_amd_ssse3(const float * GGML_RESTRICT x, block_iq3_xxs * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq3_xxs_reference_amd_k8(const float * GGML_RESTRICT x, block_iq3_xxs * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_xxs_reference_arm80(const float * GGML_RESTRICT x, block_iq3_xxs * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_nl_reference_amd_avx512 (const float * GGML_RESTRICT x, block_iq4_nl * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_nl_reference_amd_avx2 (const float * GGML_RESTRICT x, block_iq4_nl * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_nl_reference_amd_avx (const float * GGML_RESTRICT x, block_iq4_nl * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq4_nl_reference_amd_ssse3 (const float * GGML_RESTRICT x, block_iq4_nl * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq4_nl_reference_amd_k8 (const float * GGML_RESTRICT x, block_iq4_nl * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_nl_reference_arm80 (const float * GGML_RESTRICT x, block_iq4_nl * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_xs_reference_amd_avx512 (const float * GGML_RESTRICT x, block_iq4_xs * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_xs_reference_amd_avx2 (const float * GGML_RESTRICT x, block_iq4_xs * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_xs_reference_amd_avx (const float * GGML_RESTRICT x, block_iq4_xs * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq4_xs_reference_amd_ssse3 (const float * GGML_RESTRICT x, block_iq4_xs * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq4_xs_reference_amd_k8 (const float * GGML_RESTRICT x, block_iq4_xs * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_xs_reference_arm80 (const float * GGML_RESTRICT x, block_iq4_xs * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_s_reference_amd_avx512 (const float * GGML_RESTRICT x, block_iq3_s * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_s_reference_amd_avx2 (const float * GGML_RESTRICT x, block_iq3_s * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_s_reference_amd_avx (const float * GGML_RESTRICT x, block_iq3_s * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq3_s_reference_amd_ssse3 (const float * GGML_RESTRICT x, block_iq3_s * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq3_s_reference_amd_k8 (const float * GGML_RESTRICT x, block_iq3_s * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_s_reference_arm80 (const float * GGML_RESTRICT x, block_iq3_s * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq2_s_reference_amd_avx512 (const float * GGML_RESTRICT x, block_iq2_s * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq2_s_reference_amd_avx2 (const float * GGML_RESTRICT x, block_iq2_s * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq2_s_reference_amd_avx (const float * GGML_RESTRICT x, block_iq2_s * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq2_s_reference_amd_ssse3 (const float * GGML_RESTRICT x, block_iq2_s * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq2_s_reference_amd_k8 (const float * GGML_RESTRICT x, block_iq2_s * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq2_s_reference_arm80 (const float * GGML_RESTRICT x, block_iq2_s * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_0_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_0_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_0_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_0_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_0_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_0_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_1_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_1_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_1_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_1_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_1_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_1_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_0_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_0_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_0_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_0_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_0_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_0_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_1_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_1_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_1_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_1_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_1_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_1_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_0_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_0_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_0_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_0_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_0_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_0_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_1_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_1_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_1_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_1_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_1_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_1_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q2_K_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q2_K_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q2_K_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q2_K_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q2_K_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q2_K_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q3_K_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q3_K_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q3_K_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q3_K_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q3_K_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q3_K_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_K_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_K_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_K_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_K_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q4_K_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q4_K_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_K_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_K_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_K_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_K_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q5_K_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q5_K_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q6_K_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q6_K_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q6_K_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q6_K_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q6_K_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q6_K_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_K_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_K_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_K_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_K_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_q8_K_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_q8_K_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_xxs_amd_avx512(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_xxs_amd_avx2(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_xxs_amd_avx(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq3_xxs_amd_ssse3(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq3_xxs_amd_k8(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_xxs_arm80(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_nl_amd_avx512 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_nl_amd_avx2 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_nl_amd_avx (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq4_nl_amd_ssse3 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq4_nl_amd_k8 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_nl_arm80 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_xs_amd_avx512 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_xs_amd_avx2 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_xs_amd_avx (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq4_xs_amd_ssse3 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq4_xs_amd_k8 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq4_xs_arm80 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_s_amd_avx512 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_s_amd_avx2 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_s_amd_avx (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq3_s_amd_ssse3 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq3_s_amd_k8 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq3_s_arm80 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq2_s_amd_avx512 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq2_s_amd_avx2 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq2_s_amd_avx (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq2_s_amd_ssse3 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
+extern "C" void quantize_row_iq2_s_amd_k8 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void quantize_row_iq2_s_arm80 (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_0_amd_avx512(const block_q4_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_0_amd_avx2(const block_q4_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_0_amd_avx(const block_q4_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q4_0_amd_ssse3(const block_q4_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q4_0_amd_k8(const block_q4_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_0_arm80(const block_q4_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_1_amd_avx512(const block_q4_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_1_amd_avx2(const block_q4_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_1_amd_avx(const block_q4_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q4_1_amd_ssse3(const block_q4_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q4_1_amd_k8(const block_q4_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_1_arm80(const block_q4_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_0_amd_avx512(const block_q5_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_0_amd_avx2(const block_q5_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_0_amd_avx(const block_q5_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q5_0_amd_ssse3(const block_q5_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q5_0_amd_k8(const block_q5_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_0_arm80(const block_q5_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_1_amd_avx512(const block_q5_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_1_amd_avx2(const block_q5_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_1_amd_avx(const block_q5_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q5_1_amd_ssse3(const block_q5_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q5_1_amd_k8(const block_q5_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_1_arm80(const block_q5_1 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q8_0_amd_avx512(const block_q8_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q8_0_amd_avx2(const block_q8_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q8_0_amd_avx(const block_q8_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q8_0_amd_ssse3(const block_q8_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q8_0_amd_k8(const block_q8_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q8_0_arm80(const block_q8_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q2_K_amd_avx512(const block_q2_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q2_K_amd_avx2(const block_q2_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q2_K_amd_avx(const block_q2_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q2_K_amd_ssse3(const block_q2_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q2_K_amd_k8(const block_q2_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q2_K_arm80(const block_q2_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q3_K_amd_avx512(const block_q3_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q3_K_amd_avx2(const block_q3_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q3_K_amd_avx(const block_q3_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q3_K_amd_ssse3(const block_q3_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q3_K_amd_k8(const block_q3_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q3_K_arm80(const block_q3_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_K_amd_avx512(const block_q4_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_K_amd_avx2(const block_q4_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_K_amd_avx(const block_q4_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q4_K_amd_ssse3(const block_q4_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q4_K_amd_k8(const block_q4_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q4_K_arm80(const block_q4_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_K_amd_avx512(const block_q5_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_K_amd_avx2(const block_q5_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_K_amd_avx(const block_q5_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q5_K_amd_ssse3(const block_q5_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q5_K_amd_k8(const block_q5_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q5_K_arm80(const block_q5_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q6_K_amd_avx512(const block_q6_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q6_K_amd_avx2(const block_q6_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q6_K_amd_avx(const block_q6_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q6_K_amd_ssse3(const block_q6_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q6_K_amd_k8(const block_q6_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q6_K_arm80(const block_q6_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q8_K_amd_avx512(const block_q8_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q8_K_amd_avx2(const block_q8_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q8_K_amd_avx(const block_q8_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q8_K_amd_ssse3(const block_q8_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_q8_K_amd_k8(const block_q8_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_q8_K_arm80(const block_q8_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_xxs_amd_avx512(const block_iq2_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_xxs_amd_avx2(const block_iq2_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_xxs_amd_avx(const block_iq2_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq2_xxs_amd_ssse3(const block_iq2_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq2_xxs_amd_k8(const block_iq2_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_xxs_arm80(const block_iq2_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_xs_amd_avx512 (const block_iq2_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_xs_amd_avx2 (const block_iq2_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_xs_amd_avx (const block_iq2_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq2_xs_amd_ssse3 (const block_iq2_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq2_xs_amd_k8 (const block_iq2_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_xs_arm80 (const block_iq2_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_s_amd_avx512 (const block_iq2_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_s_amd_avx2 (const block_iq2_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_s_amd_avx (const block_iq2_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq2_s_amd_ssse3 (const block_iq2_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq2_s_amd_k8 (const block_iq2_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq2_s_arm80 (const block_iq2_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq3_xxs_amd_avx512(const block_iq3_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq3_xxs_amd_avx2(const block_iq3_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq3_xxs_amd_avx(const block_iq3_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq3_xxs_amd_ssse3(const block_iq3_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq3_xxs_amd_k8(const block_iq3_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq3_xxs_arm80(const block_iq3_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq1_s_amd_avx512 (const block_iq1_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq1_s_amd_avx2 (const block_iq1_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq1_s_amd_avx (const block_iq1_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq1_s_amd_ssse3 (const block_iq1_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq1_s_amd_k8 (const block_iq1_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq1_s_arm80 (const block_iq1_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq1_m_amd_avx512 (const block_iq1_m * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq1_m_amd_avx2 (const block_iq1_m * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq1_m_amd_avx (const block_iq1_m * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq1_m_amd_ssse3 (const block_iq1_m * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq1_m_amd_k8 (const block_iq1_m * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq1_m_arm80 (const block_iq1_m * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq4_nl_amd_avx512 (const block_iq4_nl * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq4_nl_amd_avx2 (const block_iq4_nl * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq4_nl_amd_avx (const block_iq4_nl * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq4_nl_amd_ssse3 (const block_iq4_nl * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq4_nl_amd_k8 (const block_iq4_nl * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq4_nl_arm80 (const block_iq4_nl * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq4_xs_amd_avx512 (const block_iq4_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq4_xs_amd_avx2 (const block_iq4_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq4_xs_amd_avx (const block_iq4_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq4_xs_amd_ssse3 (const block_iq4_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq4_xs_amd_k8 (const block_iq4_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq4_xs_arm80 (const block_iq4_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq3_s_amd_avx512 (const block_iq3_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq3_s_amd_avx2 (const block_iq3_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq3_s_amd_avx (const block_iq3_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq3_s_amd_ssse3 (const block_iq3_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
+extern "C" void dequantize_row_iq3_s_amd_k8 (const block_iq3_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void dequantize_row_iq3_s_arm80 (const block_iq3_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
extern "C" void ggml_vec_dot_q4_0_q8_0_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q4_0_q8_0_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q4_0_q8_0_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q4_0_q8_0_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q4_0_q8_0_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q4_0_q8_0_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q4_1_q8_1_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q4_1_q8_1_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q4_1_q8_1_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q4_1_q8_1_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q4_1_q8_1_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q4_1_q8_1_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_0_q8_0_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_0_q8_0_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_0_q8_0_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q5_0_q8_0_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q5_0_q8_0_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_0_q8_0_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_1_q8_1_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_1_q8_1_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_1_q8_1_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q5_1_q8_1_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q5_1_q8_1_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_1_q8_1_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q8_0_q8_0_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q8_0_q8_0_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q8_0_q8_0_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q8_0_q8_0_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q8_0_q8_0_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q8_0_q8_0_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q2_K_q8_K_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q2_K_q8_K_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q2_K_q8_K_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q2_K_q8_K_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q2_K_q8_K_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q2_K_q8_K_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q3_K_q8_K_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q3_K_q8_K_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q3_K_q8_K_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q3_K_q8_K_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q3_K_q8_K_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q3_K_q8_K_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q4_K_q8_K_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q4_K_q8_K_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q4_K_q8_K_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q4_K_q8_K_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q4_K_q8_K_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q4_K_q8_K_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_K_q8_K_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_K_q8_K_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_K_q8_K_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q5_K_q8_K_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q5_K_q8_K_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q5_K_q8_K_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q6_K_q8_K_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q6_K_q8_K_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q6_K_q8_K_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q6_K_q8_K_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_q6_K_q8_K_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_q6_K_q8_K_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_xxs_q8_K_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_xxs_q8_K_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_xxs_q8_K_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq2_xxs_q8_K_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq2_xxs_q8_K_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_xxs_q8_K_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_xs_q8_K_amd_avx512 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_xs_q8_K_amd_avx2 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_xs_q8_K_amd_avx (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq2_xs_q8_K_amd_ssse3 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq2_xs_q8_K_amd_k8 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_xs_q8_K_arm80 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_s_q8_K_amd_avx512 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_s_q8_K_amd_avx2 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_s_q8_K_amd_avx (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq2_s_q8_K_amd_ssse3 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq2_s_q8_K_amd_k8 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq2_s_q8_K_arm80 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq3_xxs_q8_K_amd_avx512(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq3_xxs_q8_K_amd_avx2(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq3_xxs_q8_K_amd_avx(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq3_xxs_q8_K_amd_ssse3(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq3_xxs_q8_K_amd_k8(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq3_xxs_q8_K_arm80(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq1_s_q8_K_amd_avx512 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq1_s_q8_K_amd_avx2 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq1_s_q8_K_amd_avx (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq1_s_q8_K_amd_ssse3 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq1_s_q8_K_amd_k8 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq1_s_q8_K_arm80 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq1_m_q8_K_amd_avx512 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq1_m_q8_K_amd_avx2 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq1_m_q8_K_amd_avx (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq1_m_q8_K_amd_ssse3 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq1_m_q8_K_amd_k8 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq1_m_q8_K_arm80 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq4_nl_q8_0_amd_avx512 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq4_nl_q8_0_amd_avx2 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq4_nl_q8_0_amd_avx (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq4_nl_q8_0_amd_ssse3 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq4_nl_q8_0_amd_k8 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq4_nl_q8_0_arm80 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq4_xs_q8_K_amd_avx512 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq4_xs_q8_K_amd_avx2 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq4_xs_q8_K_amd_avx (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq4_xs_q8_K_amd_ssse3 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq4_xs_q8_K_amd_k8 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq4_xs_q8_K_arm80 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq3_s_q8_K_amd_avx512 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq3_s_q8_K_amd_avx2 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq3_s_q8_K_amd_avx (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq3_s_q8_K_amd_ssse3 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
+extern "C" void ggml_vec_dot_iq3_s_q8_K_amd_k8 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" void ggml_vec_dot_iq3_s_q8_K_arm80 (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc);
extern "C" size_t quantize_iq2_xxs_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq2_xxs_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq2_xxs_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq2_xxs_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq2_xxs_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq2_xxs_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq2_xs_amd_avx512 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq2_xs_amd_avx2 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq2_xs_amd_avx (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq2_xs_amd_ssse3 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq2_xs_amd_k8 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq2_xs_arm80 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq2_s_amd_avx512 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq2_s_amd_avx2 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq2_s_amd_avx (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq2_s_amd_ssse3 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq2_s_amd_k8 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq2_s_arm80 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq3_xxs_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq3_xxs_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq3_xxs_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq3_xxs_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq3_xxs_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq3_xxs_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq1_s_amd_avx512 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq1_s_amd_avx2 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq1_s_amd_avx (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq1_s_amd_ssse3 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq1_s_amd_k8 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq1_s_arm80 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq1_m_amd_avx512 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq1_m_amd_avx2 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq1_m_amd_avx (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq1_m_amd_ssse3 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq1_m_amd_k8 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq1_m_arm80 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq4_nl_amd_avx512 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq4_nl_amd_avx2 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq4_nl_amd_avx (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq4_nl_amd_ssse3 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq4_nl_amd_k8 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq4_nl_arm80 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq4_xs_amd_avx512 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq4_xs_amd_avx2 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq4_xs_amd_avx (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq4_xs_amd_ssse3 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq4_xs_amd_k8 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq4_xs_arm80 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq3_s_amd_avx512 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq3_s_amd_avx2 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq3_s_amd_avx (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq3_s_amd_ssse3 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_iq3_s_amd_k8 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_iq3_s_arm80 (const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q2_K_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q2_K_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q2_K_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q2_K_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q2_K_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q2_K_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q3_K_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q3_K_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q3_K_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q3_K_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q3_K_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q3_K_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_K_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_K_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_K_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q4_K_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q4_K_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_K_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_K_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_K_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_K_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q5_K_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q5_K_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_K_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q6_K_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q6_K_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q6_K_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q6_K_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q6_K_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q6_K_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_0_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_0_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_0_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q4_0_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q4_0_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_0_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_1_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_1_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_1_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q4_1_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q4_1_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q4_1_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_0_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_0_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_0_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q5_0_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q5_0_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_0_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_1_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_1_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_1_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q5_1_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q5_1_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q5_1_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q8_0_amd_avx512(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q8_0_amd_avx2(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q8_0_amd_avx(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q8_0_amd_ssse3(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
+extern "C" size_t quantize_q8_0_amd_k8(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" size_t quantize_q8_0_arm80(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
extern "C" void iq2xs_init_impl_amd_avx512(enum ggml_type type);
extern "C" void iq2xs_init_impl_amd_avx2(enum ggml_type type);
extern "C" void iq2xs_init_impl_amd_avx(enum ggml_type type);
+extern "C" void iq2xs_init_impl_amd_ssse3(enum ggml_type type);
+extern "C" void iq2xs_init_impl_amd_k8(enum ggml_type type);
extern "C" void iq2xs_init_impl_arm80(enum ggml_type type);
extern "C" void iq2xs_free_impl_amd_avx512(enum ggml_type type);
extern "C" void iq2xs_free_impl_amd_avx2(enum ggml_type type);
extern "C" void iq2xs_free_impl_amd_avx(enum ggml_type type);
+extern "C" void iq2xs_free_impl_amd_ssse3(enum ggml_type type);
+extern "C" void iq2xs_free_impl_amd_k8(enum ggml_type type);
extern "C" void iq2xs_free_impl_arm80(enum ggml_type type);
extern "C" void iq3xs_init_impl_amd_avx512(int grid_size);
extern "C" void iq3xs_init_impl_amd_avx2(int grid_size);
extern "C" void iq3xs_init_impl_amd_avx(int grid_size);
+extern "C" void iq3xs_init_impl_amd_ssse3(int grid_size);
+extern "C" void iq3xs_init_impl_amd_k8(int grid_size);
extern "C" void iq3xs_init_impl_arm80(int grid_size);
extern "C" void iq3xs_free_impl_amd_avx512(int grid_size);
extern "C" void iq3xs_free_impl_amd_avx2(int grid_size);
extern "C" void iq3xs_free_impl_amd_avx(int grid_size);
+extern "C" void iq3xs_free_impl_amd_ssse3(int grid_size);
+extern "C" void iq3xs_free_impl_amd_k8(int grid_size);
extern "C" void iq3xs_free_impl_arm80(int grid_size);
extern "C" bool ggml_validate_row_data_amd_avx512(enum ggml_type type, const void * data, size_t nbytes);
extern "C" bool ggml_validate_row_data_amd_avx2(enum ggml_type type, const void * data, size_t nbytes);
extern "C" bool ggml_validate_row_data_amd_avx(enum ggml_type type, const void * data, size_t nbytes);
+extern "C" bool ggml_validate_row_data_amd_ssse3(enum ggml_type type, const void * data, size_t nbytes);
+extern "C" bool ggml_validate_row_data_amd_k8(enum ggml_type type, const void * data, size_t nbytes);
extern "C" bool ggml_validate_row_data_arm80(enum ggml_type type, const void * data, size_t nbytes);
static const struct QuantFuncs {
@@ -589,7 +783,7 @@ static const struct QuantFuncs {
QuantFuncs() {
#ifdef __x86_64__
- if (X86_HAVE(FMA) && X86_HAVE(F16C) && X86_HAVE(AVX2) && X86_HAVE(AVX512F)) {
+ if (X86_HAVE(FMA) && X86_HAVE(F16C) && X86_HAVE(AVX) && X86_HAVE(AVX2) && X86_HAVE(AVX512F)) {
ptr_quantize_row_q4_0_reference = quantize_row_q4_0_reference_amd_avx512;
ptr_quantize_row_q4_1_reference = quantize_row_q4_1_reference_amd_avx512;
ptr_quantize_row_q5_0_reference = quantize_row_q5_0_reference_amd_avx512;
@@ -689,7 +883,9 @@ static const struct QuantFuncs {
ptr_ggml_validate_row_data = ggml_validate_row_data_amd_avx512;
return;
}
- if (X86_HAVE(FMA) && X86_HAVE(F16C) && X86_HAVE(AVX2)) {
+#endif
+#ifdef __x86_64__
+ if (X86_HAVE(FMA) && X86_HAVE(F16C) && X86_HAVE(AVX) && X86_HAVE(AVX2)) {
ptr_quantize_row_q4_0_reference = quantize_row_q4_0_reference_amd_avx2;
ptr_quantize_row_q4_1_reference = quantize_row_q4_1_reference_amd_avx2;
ptr_quantize_row_q5_0_reference = quantize_row_q5_0_reference_amd_avx2;
@@ -789,7 +985,9 @@ static const struct QuantFuncs {
ptr_ggml_validate_row_data = ggml_validate_row_data_amd_avx2;
return;
}
- if (1) {
+#endif
+#ifdef __x86_64__
+ if (X86_HAVE(AVX)) {
ptr_quantize_row_q4_0_reference = quantize_row_q4_0_reference_amd_avx;
ptr_quantize_row_q4_1_reference = quantize_row_q4_1_reference_amd_avx;
ptr_quantize_row_q5_0_reference = quantize_row_q5_0_reference_amd_avx;
@@ -889,104 +1087,312 @@ static const struct QuantFuncs {
ptr_ggml_validate_row_data = ggml_validate_row_data_amd_avx;
return;
}
-#else
- ptr_quantize_row_q4_0_reference = quantize_row_q4_0_reference_arm80;
- ptr_quantize_row_q4_1_reference = quantize_row_q4_1_reference_arm80;
- ptr_quantize_row_q5_0_reference = quantize_row_q5_0_reference_arm80;
- ptr_quantize_row_q5_1_reference = quantize_row_q5_1_reference_arm80;
- ptr_quantize_row_q8_0_reference = quantize_row_q8_0_reference_arm80;
- ptr_quantize_row_q8_1_reference = quantize_row_q8_1_reference_arm80;
- ptr_quantize_row_q2_K_reference = quantize_row_q2_K_reference_arm80;
- ptr_quantize_row_q3_K_reference = quantize_row_q3_K_reference_arm80;
- ptr_quantize_row_q4_K_reference = quantize_row_q4_K_reference_arm80;
- ptr_quantize_row_q5_K_reference = quantize_row_q5_K_reference_arm80;
- ptr_quantize_row_q6_K_reference = quantize_row_q6_K_reference_arm80;
- ptr_quantize_row_q8_K_reference = quantize_row_q8_K_reference_arm80;
- ptr_quantize_row_iq3_xxs_reference = quantize_row_iq3_xxs_reference_arm80;
- ptr_quantize_row_iq4_nl_reference = quantize_row_iq4_nl_reference_arm80;
- ptr_quantize_row_iq4_xs_reference = quantize_row_iq4_xs_reference_arm80;
- ptr_quantize_row_iq3_s_reference = quantize_row_iq3_s_reference_arm80;
- ptr_quantize_row_iq2_s_reference = quantize_row_iq2_s_reference_arm80;
- ptr_quantize_row_q4_0 = quantize_row_q4_0_arm80;
- ptr_quantize_row_q4_1 = quantize_row_q4_1_arm80;
- ptr_quantize_row_q5_0 = quantize_row_q5_0_arm80;
- ptr_quantize_row_q5_1 = quantize_row_q5_1_arm80;
- ptr_quantize_row_q8_0 = quantize_row_q8_0_arm80;
- ptr_quantize_row_q8_1 = quantize_row_q8_1_arm80;
- ptr_quantize_row_q2_K = quantize_row_q2_K_arm80;
- ptr_quantize_row_q3_K = quantize_row_q3_K_arm80;
- ptr_quantize_row_q4_K = quantize_row_q4_K_arm80;
- ptr_quantize_row_q5_K = quantize_row_q5_K_arm80;
- ptr_quantize_row_q6_K = quantize_row_q6_K_arm80;
- ptr_quantize_row_q8_K = quantize_row_q8_K_arm80;
- ptr_quantize_row_iq3_xxs = quantize_row_iq3_xxs_arm80;
- ptr_quantize_row_iq4_nl = quantize_row_iq4_nl_arm80;
- ptr_quantize_row_iq4_xs = quantize_row_iq4_xs_arm80;
- ptr_quantize_row_iq3_s = quantize_row_iq3_s_arm80;
- ptr_quantize_row_iq2_s = quantize_row_iq2_s_arm80;
- ptr_dequantize_row_q4_0 = dequantize_row_q4_0_arm80;
- ptr_dequantize_row_q4_1 = dequantize_row_q4_1_arm80;
- ptr_dequantize_row_q5_0 = dequantize_row_q5_0_arm80;
- ptr_dequantize_row_q5_1 = dequantize_row_q5_1_arm80;
- ptr_dequantize_row_q8_0 = dequantize_row_q8_0_arm80;
- ptr_dequantize_row_q2_K = dequantize_row_q2_K_arm80;
- ptr_dequantize_row_q3_K = dequantize_row_q3_K_arm80;
- ptr_dequantize_row_q4_K = dequantize_row_q4_K_arm80;
- ptr_dequantize_row_q5_K = dequantize_row_q5_K_arm80;
- ptr_dequantize_row_q6_K = dequantize_row_q6_K_arm80;
- ptr_dequantize_row_q8_K = dequantize_row_q8_K_arm80;
- ptr_dequantize_row_iq2_xxs = dequantize_row_iq2_xxs_arm80;
- ptr_dequantize_row_iq2_xs = dequantize_row_iq2_xs_arm80;
- ptr_dequantize_row_iq2_s = dequantize_row_iq2_s_arm80;
- ptr_dequantize_row_iq3_xxs = dequantize_row_iq3_xxs_arm80;
- ptr_dequantize_row_iq1_s = dequantize_row_iq1_s_arm80;
- ptr_dequantize_row_iq1_m = dequantize_row_iq1_m_arm80;
- ptr_dequantize_row_iq4_nl = dequantize_row_iq4_nl_arm80;
- ptr_dequantize_row_iq4_xs = dequantize_row_iq4_xs_arm80;
- ptr_dequantize_row_iq3_s = dequantize_row_iq3_s_arm80;
- ptr_ggml_vec_dot_q4_0_q8_0 = ggml_vec_dot_q4_0_q8_0_arm80;
- ptr_ggml_vec_dot_q4_1_q8_1 = ggml_vec_dot_q4_1_q8_1_arm80;
- ptr_ggml_vec_dot_q5_0_q8_0 = ggml_vec_dot_q5_0_q8_0_arm80;
- ptr_ggml_vec_dot_q5_1_q8_1 = ggml_vec_dot_q5_1_q8_1_arm80;
- ptr_ggml_vec_dot_q8_0_q8_0 = ggml_vec_dot_q8_0_q8_0_arm80;
- ptr_ggml_vec_dot_q2_K_q8_K = ggml_vec_dot_q2_K_q8_K_arm80;
- ptr_ggml_vec_dot_q3_K_q8_K = ggml_vec_dot_q3_K_q8_K_arm80;
- ptr_ggml_vec_dot_q4_K_q8_K = ggml_vec_dot_q4_K_q8_K_arm80;
- ptr_ggml_vec_dot_q5_K_q8_K = ggml_vec_dot_q5_K_q8_K_arm80;
- ptr_ggml_vec_dot_q6_K_q8_K = ggml_vec_dot_q6_K_q8_K_arm80;
- ptr_ggml_vec_dot_iq2_xxs_q8_K = ggml_vec_dot_iq2_xxs_q8_K_arm80;
- ptr_ggml_vec_dot_iq2_xs_q8_K = ggml_vec_dot_iq2_xs_q8_K_arm80;
- ptr_ggml_vec_dot_iq2_s_q8_K = ggml_vec_dot_iq2_s_q8_K_arm80;
- ptr_ggml_vec_dot_iq3_xxs_q8_K = ggml_vec_dot_iq3_xxs_q8_K_arm80;
- ptr_ggml_vec_dot_iq1_s_q8_K = ggml_vec_dot_iq1_s_q8_K_arm80;
- ptr_ggml_vec_dot_iq1_m_q8_K = ggml_vec_dot_iq1_m_q8_K_arm80;
- ptr_ggml_vec_dot_iq4_nl_q8_0 = ggml_vec_dot_iq4_nl_q8_0_arm80;
- ptr_ggml_vec_dot_iq4_xs_q8_K = ggml_vec_dot_iq4_xs_q8_K_arm80;
- ptr_ggml_vec_dot_iq3_s_q8_K = ggml_vec_dot_iq3_s_q8_K_arm80;
- ptr_quantize_iq2_xxs = quantize_iq2_xxs_arm80;
- ptr_quantize_iq2_xs = quantize_iq2_xs_arm80;
- ptr_quantize_iq2_s = quantize_iq2_s_arm80;
- ptr_quantize_iq3_xxs = quantize_iq3_xxs_arm80;
- ptr_quantize_iq1_s = quantize_iq1_s_arm80;
- ptr_quantize_iq1_m = quantize_iq1_m_arm80;
- ptr_quantize_iq4_nl = quantize_iq4_nl_arm80;
- ptr_quantize_iq4_xs = quantize_iq4_xs_arm80;
- ptr_quantize_iq3_s = quantize_iq3_s_arm80;
- ptr_quantize_q2_K = quantize_q2_K_arm80;
- ptr_quantize_q3_K = quantize_q3_K_arm80;
- ptr_quantize_q4_K = quantize_q4_K_arm80;
- ptr_quantize_q5_K = quantize_q5_K_arm80;
- ptr_quantize_q6_K = quantize_q6_K_arm80;
- ptr_quantize_q4_0 = quantize_q4_0_arm80;
- ptr_quantize_q4_1 = quantize_q4_1_arm80;
- ptr_quantize_q5_0 = quantize_q5_0_arm80;
- ptr_quantize_q5_1 = quantize_q5_1_arm80;
- ptr_quantize_q8_0 = quantize_q8_0_arm80;
- ptr_iq2xs_init_impl = iq2xs_init_impl_arm80;
- ptr_iq2xs_free_impl = iq2xs_free_impl_arm80;
- ptr_iq3xs_init_impl = iq3xs_init_impl_arm80;
- ptr_iq3xs_free_impl = iq3xs_free_impl_arm80;
- ptr_ggml_validate_row_data = ggml_validate_row_data_arm80;
+#endif
+#ifdef __x86_64__
+ if (X86_HAVE(SSSE3)) {
+ ptr_quantize_row_q4_0_reference = quantize_row_q4_0_reference_amd_ssse3;
+ ptr_quantize_row_q4_1_reference = quantize_row_q4_1_reference_amd_ssse3;
+ ptr_quantize_row_q5_0_reference = quantize_row_q5_0_reference_amd_ssse3;
+ ptr_quantize_row_q5_1_reference = quantize_row_q5_1_reference_amd_ssse3;
+ ptr_quantize_row_q8_0_reference = quantize_row_q8_0_reference_amd_ssse3;
+ ptr_quantize_row_q8_1_reference = quantize_row_q8_1_reference_amd_ssse3;
+ ptr_quantize_row_q2_K_reference = quantize_row_q2_K_reference_amd_ssse3;
+ ptr_quantize_row_q3_K_reference = quantize_row_q3_K_reference_amd_ssse3;
+ ptr_quantize_row_q4_K_reference = quantize_row_q4_K_reference_amd_ssse3;
+ ptr_quantize_row_q5_K_reference = quantize_row_q5_K_reference_amd_ssse3;
+ ptr_quantize_row_q6_K_reference = quantize_row_q6_K_reference_amd_ssse3;
+ ptr_quantize_row_q8_K_reference = quantize_row_q8_K_reference_amd_ssse3;
+ ptr_quantize_row_iq3_xxs_reference = quantize_row_iq3_xxs_reference_amd_ssse3;
+ ptr_quantize_row_iq4_nl_reference = quantize_row_iq4_nl_reference_amd_ssse3;
+ ptr_quantize_row_iq4_xs_reference = quantize_row_iq4_xs_reference_amd_ssse3;
+ ptr_quantize_row_iq3_s_reference = quantize_row_iq3_s_reference_amd_ssse3;
+ ptr_quantize_row_iq2_s_reference = quantize_row_iq2_s_reference_amd_ssse3;
+ ptr_quantize_row_q4_0 = quantize_row_q4_0_amd_ssse3;
+ ptr_quantize_row_q4_1 = quantize_row_q4_1_amd_ssse3;
+ ptr_quantize_row_q5_0 = quantize_row_q5_0_amd_ssse3;
+ ptr_quantize_row_q5_1 = quantize_row_q5_1_amd_ssse3;
+ ptr_quantize_row_q8_0 = quantize_row_q8_0_amd_ssse3;
+ ptr_quantize_row_q8_1 = quantize_row_q8_1_amd_ssse3;
+ ptr_quantize_row_q2_K = quantize_row_q2_K_amd_ssse3;
+ ptr_quantize_row_q3_K = quantize_row_q3_K_amd_ssse3;
+ ptr_quantize_row_q4_K = quantize_row_q4_K_amd_ssse3;
+ ptr_quantize_row_q5_K = quantize_row_q5_K_amd_ssse3;
+ ptr_quantize_row_q6_K = quantize_row_q6_K_amd_ssse3;
+ ptr_quantize_row_q8_K = quantize_row_q8_K_amd_ssse3;
+ ptr_quantize_row_iq3_xxs = quantize_row_iq3_xxs_amd_ssse3;
+ ptr_quantize_row_iq4_nl = quantize_row_iq4_nl_amd_ssse3;
+ ptr_quantize_row_iq4_xs = quantize_row_iq4_xs_amd_ssse3;
+ ptr_quantize_row_iq3_s = quantize_row_iq3_s_amd_ssse3;
+ ptr_quantize_row_iq2_s = quantize_row_iq2_s_amd_ssse3;
+ ptr_dequantize_row_q4_0 = dequantize_row_q4_0_amd_ssse3;
+ ptr_dequantize_row_q4_1 = dequantize_row_q4_1_amd_ssse3;
+ ptr_dequantize_row_q5_0 = dequantize_row_q5_0_amd_ssse3;
+ ptr_dequantize_row_q5_1 = dequantize_row_q5_1_amd_ssse3;
+ ptr_dequantize_row_q8_0 = dequantize_row_q8_0_amd_ssse3;
+ ptr_dequantize_row_q2_K = dequantize_row_q2_K_amd_ssse3;
+ ptr_dequantize_row_q3_K = dequantize_row_q3_K_amd_ssse3;
+ ptr_dequantize_row_q4_K = dequantize_row_q4_K_amd_ssse3;
+ ptr_dequantize_row_q5_K = dequantize_row_q5_K_amd_ssse3;
+ ptr_dequantize_row_q6_K = dequantize_row_q6_K_amd_ssse3;
+ ptr_dequantize_row_q8_K = dequantize_row_q8_K_amd_ssse3;
+ ptr_dequantize_row_iq2_xxs = dequantize_row_iq2_xxs_amd_ssse3;
+ ptr_dequantize_row_iq2_xs = dequantize_row_iq2_xs_amd_ssse3;
+ ptr_dequantize_row_iq2_s = dequantize_row_iq2_s_amd_ssse3;
+ ptr_dequantize_row_iq3_xxs = dequantize_row_iq3_xxs_amd_ssse3;
+ ptr_dequantize_row_iq1_s = dequantize_row_iq1_s_amd_ssse3;
+ ptr_dequantize_row_iq1_m = dequantize_row_iq1_m_amd_ssse3;
+ ptr_dequantize_row_iq4_nl = dequantize_row_iq4_nl_amd_ssse3;
+ ptr_dequantize_row_iq4_xs = dequantize_row_iq4_xs_amd_ssse3;
+ ptr_dequantize_row_iq3_s = dequantize_row_iq3_s_amd_ssse3;
+ ptr_ggml_vec_dot_q4_0_q8_0 = ggml_vec_dot_q4_0_q8_0_amd_ssse3;
+ ptr_ggml_vec_dot_q4_1_q8_1 = ggml_vec_dot_q4_1_q8_1_amd_ssse3;
+ ptr_ggml_vec_dot_q5_0_q8_0 = ggml_vec_dot_q5_0_q8_0_amd_ssse3;
+ ptr_ggml_vec_dot_q5_1_q8_1 = ggml_vec_dot_q5_1_q8_1_amd_ssse3;
+ ptr_ggml_vec_dot_q8_0_q8_0 = ggml_vec_dot_q8_0_q8_0_amd_ssse3;
+ ptr_ggml_vec_dot_q2_K_q8_K = ggml_vec_dot_q2_K_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_q3_K_q8_K = ggml_vec_dot_q3_K_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_q4_K_q8_K = ggml_vec_dot_q4_K_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_q5_K_q8_K = ggml_vec_dot_q5_K_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_q6_K_q8_K = ggml_vec_dot_q6_K_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_iq2_xxs_q8_K = ggml_vec_dot_iq2_xxs_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_iq2_xs_q8_K = ggml_vec_dot_iq2_xs_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_iq2_s_q8_K = ggml_vec_dot_iq2_s_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_iq3_xxs_q8_K = ggml_vec_dot_iq3_xxs_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_iq1_s_q8_K = ggml_vec_dot_iq1_s_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_iq1_m_q8_K = ggml_vec_dot_iq1_m_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_iq4_nl_q8_0 = ggml_vec_dot_iq4_nl_q8_0_amd_ssse3;
+ ptr_ggml_vec_dot_iq4_xs_q8_K = ggml_vec_dot_iq4_xs_q8_K_amd_ssse3;
+ ptr_ggml_vec_dot_iq3_s_q8_K = ggml_vec_dot_iq3_s_q8_K_amd_ssse3;
+ ptr_quantize_iq2_xxs = quantize_iq2_xxs_amd_ssse3;
+ ptr_quantize_iq2_xs = quantize_iq2_xs_amd_ssse3;
+ ptr_quantize_iq2_s = quantize_iq2_s_amd_ssse3;
+ ptr_quantize_iq3_xxs = quantize_iq3_xxs_amd_ssse3;
+ ptr_quantize_iq1_s = quantize_iq1_s_amd_ssse3;
+ ptr_quantize_iq1_m = quantize_iq1_m_amd_ssse3;
+ ptr_quantize_iq4_nl = quantize_iq4_nl_amd_ssse3;
+ ptr_quantize_iq4_xs = quantize_iq4_xs_amd_ssse3;
+ ptr_quantize_iq3_s = quantize_iq3_s_amd_ssse3;
+ ptr_quantize_q2_K = quantize_q2_K_amd_ssse3;
+ ptr_quantize_q3_K = quantize_q3_K_amd_ssse3;
+ ptr_quantize_q4_K = quantize_q4_K_amd_ssse3;
+ ptr_quantize_q5_K = quantize_q5_K_amd_ssse3;
+ ptr_quantize_q6_K = quantize_q6_K_amd_ssse3;
+ ptr_quantize_q4_0 = quantize_q4_0_amd_ssse3;
+ ptr_quantize_q4_1 = quantize_q4_1_amd_ssse3;
+ ptr_quantize_q5_0 = quantize_q5_0_amd_ssse3;
+ ptr_quantize_q5_1 = quantize_q5_1_amd_ssse3;
+ ptr_quantize_q8_0 = quantize_q8_0_amd_ssse3;
+ ptr_iq2xs_init_impl = iq2xs_init_impl_amd_ssse3;
+ ptr_iq2xs_free_impl = iq2xs_free_impl_amd_ssse3;
+ ptr_iq3xs_init_impl = iq3xs_init_impl_amd_ssse3;
+ ptr_iq3xs_free_impl = iq3xs_free_impl_amd_ssse3;
+ ptr_ggml_validate_row_data = ggml_validate_row_data_amd_ssse3;
+ return;
+ }
+#endif
+#ifdef __x86_64__
+ if (1) {
+ ptr_quantize_row_q4_0_reference = quantize_row_q4_0_reference_amd_k8;
+ ptr_quantize_row_q4_1_reference = quantize_row_q4_1_reference_amd_k8;
+ ptr_quantize_row_q5_0_reference = quantize_row_q5_0_reference_amd_k8;
+ ptr_quantize_row_q5_1_reference = quantize_row_q5_1_reference_amd_k8;
+ ptr_quantize_row_q8_0_reference = quantize_row_q8_0_reference_amd_k8;
+ ptr_quantize_row_q8_1_reference = quantize_row_q8_1_reference_amd_k8;
+ ptr_quantize_row_q2_K_reference = quantize_row_q2_K_reference_amd_k8;
+ ptr_quantize_row_q3_K_reference = quantize_row_q3_K_reference_amd_k8;
+ ptr_quantize_row_q4_K_reference = quantize_row_q4_K_reference_amd_k8;
+ ptr_quantize_row_q5_K_reference = quantize_row_q5_K_reference_amd_k8;
+ ptr_quantize_row_q6_K_reference = quantize_row_q6_K_reference_amd_k8;
+ ptr_quantize_row_q8_K_reference = quantize_row_q8_K_reference_amd_k8;
+ ptr_quantize_row_iq3_xxs_reference = quantize_row_iq3_xxs_reference_amd_k8;
+ ptr_quantize_row_iq4_nl_reference = quantize_row_iq4_nl_reference_amd_k8;
+ ptr_quantize_row_iq4_xs_reference = quantize_row_iq4_xs_reference_amd_k8;
+ ptr_quantize_row_iq3_s_reference = quantize_row_iq3_s_reference_amd_k8;
+ ptr_quantize_row_iq2_s_reference = quantize_row_iq2_s_reference_amd_k8;
+ ptr_quantize_row_q4_0 = quantize_row_q4_0_amd_k8;
+ ptr_quantize_row_q4_1 = quantize_row_q4_1_amd_k8;
+ ptr_quantize_row_q5_0 = quantize_row_q5_0_amd_k8;
+ ptr_quantize_row_q5_1 = quantize_row_q5_1_amd_k8;
+ ptr_quantize_row_q8_0 = quantize_row_q8_0_amd_k8;
+ ptr_quantize_row_q8_1 = quantize_row_q8_1_amd_k8;
+ ptr_quantize_row_q2_K = quantize_row_q2_K_amd_k8;
+ ptr_quantize_row_q3_K = quantize_row_q3_K_amd_k8;
+ ptr_quantize_row_q4_K = quantize_row_q4_K_amd_k8;
+ ptr_quantize_row_q5_K = quantize_row_q5_K_amd_k8;
+ ptr_quantize_row_q6_K = quantize_row_q6_K_amd_k8;
+ ptr_quantize_row_q8_K = quantize_row_q8_K_amd_k8;
+ ptr_quantize_row_iq3_xxs = quantize_row_iq3_xxs_amd_k8;
+ ptr_quantize_row_iq4_nl = quantize_row_iq4_nl_amd_k8;
+ ptr_quantize_row_iq4_xs = quantize_row_iq4_xs_amd_k8;
+ ptr_quantize_row_iq3_s = quantize_row_iq3_s_amd_k8;
+ ptr_quantize_row_iq2_s = quantize_row_iq2_s_amd_k8;
+ ptr_dequantize_row_q4_0 = dequantize_row_q4_0_amd_k8;
+ ptr_dequantize_row_q4_1 = dequantize_row_q4_1_amd_k8;
+ ptr_dequantize_row_q5_0 = dequantize_row_q5_0_amd_k8;
+ ptr_dequantize_row_q5_1 = dequantize_row_q5_1_amd_k8;
+ ptr_dequantize_row_q8_0 = dequantize_row_q8_0_amd_k8;
+ ptr_dequantize_row_q2_K = dequantize_row_q2_K_amd_k8;
+ ptr_dequantize_row_q3_K = dequantize_row_q3_K_amd_k8;
+ ptr_dequantize_row_q4_K = dequantize_row_q4_K_amd_k8;
+ ptr_dequantize_row_q5_K = dequantize_row_q5_K_amd_k8;
+ ptr_dequantize_row_q6_K = dequantize_row_q6_K_amd_k8;
+ ptr_dequantize_row_q8_K = dequantize_row_q8_K_amd_k8;
+ ptr_dequantize_row_iq2_xxs = dequantize_row_iq2_xxs_amd_k8;
+ ptr_dequantize_row_iq2_xs = dequantize_row_iq2_xs_amd_k8;
+ ptr_dequantize_row_iq2_s = dequantize_row_iq2_s_amd_k8;
+ ptr_dequantize_row_iq3_xxs = dequantize_row_iq3_xxs_amd_k8;
+ ptr_dequantize_row_iq1_s = dequantize_row_iq1_s_amd_k8;
+ ptr_dequantize_row_iq1_m = dequantize_row_iq1_m_amd_k8;
+ ptr_dequantize_row_iq4_nl = dequantize_row_iq4_nl_amd_k8;
+ ptr_dequantize_row_iq4_xs = dequantize_row_iq4_xs_amd_k8;
+ ptr_dequantize_row_iq3_s = dequantize_row_iq3_s_amd_k8;
+ ptr_ggml_vec_dot_q4_0_q8_0 = ggml_vec_dot_q4_0_q8_0_amd_k8;
+ ptr_ggml_vec_dot_q4_1_q8_1 = ggml_vec_dot_q4_1_q8_1_amd_k8;
+ ptr_ggml_vec_dot_q5_0_q8_0 = ggml_vec_dot_q5_0_q8_0_amd_k8;
+ ptr_ggml_vec_dot_q5_1_q8_1 = ggml_vec_dot_q5_1_q8_1_amd_k8;
+ ptr_ggml_vec_dot_q8_0_q8_0 = ggml_vec_dot_q8_0_q8_0_amd_k8;
+ ptr_ggml_vec_dot_q2_K_q8_K = ggml_vec_dot_q2_K_q8_K_amd_k8;
+ ptr_ggml_vec_dot_q3_K_q8_K = ggml_vec_dot_q3_K_q8_K_amd_k8;
+ ptr_ggml_vec_dot_q4_K_q8_K = ggml_vec_dot_q4_K_q8_K_amd_k8;
+ ptr_ggml_vec_dot_q5_K_q8_K = ggml_vec_dot_q5_K_q8_K_amd_k8;
+ ptr_ggml_vec_dot_q6_K_q8_K = ggml_vec_dot_q6_K_q8_K_amd_k8;
+ ptr_ggml_vec_dot_iq2_xxs_q8_K = ggml_vec_dot_iq2_xxs_q8_K_amd_k8;
+ ptr_ggml_vec_dot_iq2_xs_q8_K = ggml_vec_dot_iq2_xs_q8_K_amd_k8;
+ ptr_ggml_vec_dot_iq2_s_q8_K = ggml_vec_dot_iq2_s_q8_K_amd_k8;
+ ptr_ggml_vec_dot_iq3_xxs_q8_K = ggml_vec_dot_iq3_xxs_q8_K_amd_k8;
+ ptr_ggml_vec_dot_iq1_s_q8_K = ggml_vec_dot_iq1_s_q8_K_amd_k8;
+ ptr_ggml_vec_dot_iq1_m_q8_K = ggml_vec_dot_iq1_m_q8_K_amd_k8;
+ ptr_ggml_vec_dot_iq4_nl_q8_0 = ggml_vec_dot_iq4_nl_q8_0_amd_k8;
+ ptr_ggml_vec_dot_iq4_xs_q8_K = ggml_vec_dot_iq4_xs_q8_K_amd_k8;
+ ptr_ggml_vec_dot_iq3_s_q8_K = ggml_vec_dot_iq3_s_q8_K_amd_k8;
+ ptr_quantize_iq2_xxs = quantize_iq2_xxs_amd_k8;
+ ptr_quantize_iq2_xs = quantize_iq2_xs_amd_k8;
+ ptr_quantize_iq2_s = quantize_iq2_s_amd_k8;
+ ptr_quantize_iq3_xxs = quantize_iq3_xxs_amd_k8;
+ ptr_quantize_iq1_s = quantize_iq1_s_amd_k8;
+ ptr_quantize_iq1_m = quantize_iq1_m_amd_k8;
+ ptr_quantize_iq4_nl = quantize_iq4_nl_amd_k8;
+ ptr_quantize_iq4_xs = quantize_iq4_xs_amd_k8;
+ ptr_quantize_iq3_s = quantize_iq3_s_amd_k8;
+ ptr_quantize_q2_K = quantize_q2_K_amd_k8;
+ ptr_quantize_q3_K = quantize_q3_K_amd_k8;
+ ptr_quantize_q4_K = quantize_q4_K_amd_k8;
+ ptr_quantize_q5_K = quantize_q5_K_amd_k8;
+ ptr_quantize_q6_K = quantize_q6_K_amd_k8;
+ ptr_quantize_q4_0 = quantize_q4_0_amd_k8;
+ ptr_quantize_q4_1 = quantize_q4_1_amd_k8;
+ ptr_quantize_q5_0 = quantize_q5_0_amd_k8;
+ ptr_quantize_q5_1 = quantize_q5_1_amd_k8;
+ ptr_quantize_q8_0 = quantize_q8_0_amd_k8;
+ ptr_iq2xs_init_impl = iq2xs_init_impl_amd_k8;
+ ptr_iq2xs_free_impl = iq2xs_free_impl_amd_k8;
+ ptr_iq3xs_init_impl = iq3xs_init_impl_amd_k8;
+ ptr_iq3xs_free_impl = iq3xs_free_impl_amd_k8;
+ ptr_ggml_validate_row_data = ggml_validate_row_data_amd_k8;
+ return;
+ }
+#endif
+#ifdef __aarch64__
+ if (1) {
+ ptr_quantize_row_q4_0_reference = quantize_row_q4_0_reference_arm80;
+ ptr_quantize_row_q4_1_reference = quantize_row_q4_1_reference_arm80;
+ ptr_quantize_row_q5_0_reference = quantize_row_q5_0_reference_arm80;
+ ptr_quantize_row_q5_1_reference = quantize_row_q5_1_reference_arm80;
+ ptr_quantize_row_q8_0_reference = quantize_row_q8_0_reference_arm80;
+ ptr_quantize_row_q8_1_reference = quantize_row_q8_1_reference_arm80;
+ ptr_quantize_row_q2_K_reference = quantize_row_q2_K_reference_arm80;
+ ptr_quantize_row_q3_K_reference = quantize_row_q3_K_reference_arm80;
+ ptr_quantize_row_q4_K_reference = quantize_row_q4_K_reference_arm80;
+ ptr_quantize_row_q5_K_reference = quantize_row_q5_K_reference_arm80;
+ ptr_quantize_row_q6_K_reference = quantize_row_q6_K_reference_arm80;
+ ptr_quantize_row_q8_K_reference = quantize_row_q8_K_reference_arm80;
+ ptr_quantize_row_iq3_xxs_reference = quantize_row_iq3_xxs_reference_arm80;
+ ptr_quantize_row_iq4_nl_reference = quantize_row_iq4_nl_reference_arm80;
+ ptr_quantize_row_iq4_xs_reference = quantize_row_iq4_xs_reference_arm80;
+ ptr_quantize_row_iq3_s_reference = quantize_row_iq3_s_reference_arm80;
+ ptr_quantize_row_iq2_s_reference = quantize_row_iq2_s_reference_arm80;
+ ptr_quantize_row_q4_0 = quantize_row_q4_0_arm80;
+ ptr_quantize_row_q4_1 = quantize_row_q4_1_arm80;
+ ptr_quantize_row_q5_0 = quantize_row_q5_0_arm80;
+ ptr_quantize_row_q5_1 = quantize_row_q5_1_arm80;
+ ptr_quantize_row_q8_0 = quantize_row_q8_0_arm80;
+ ptr_quantize_row_q8_1 = quantize_row_q8_1_arm80;
+ ptr_quantize_row_q2_K = quantize_row_q2_K_arm80;
+ ptr_quantize_row_q3_K = quantize_row_q3_K_arm80;
+ ptr_quantize_row_q4_K = quantize_row_q4_K_arm80;
+ ptr_quantize_row_q5_K = quantize_row_q5_K_arm80;
+ ptr_quantize_row_q6_K = quantize_row_q6_K_arm80;
+ ptr_quantize_row_q8_K = quantize_row_q8_K_arm80;
+ ptr_quantize_row_iq3_xxs = quantize_row_iq3_xxs_arm80;
+ ptr_quantize_row_iq4_nl = quantize_row_iq4_nl_arm80;
+ ptr_quantize_row_iq4_xs = quantize_row_iq4_xs_arm80;
+ ptr_quantize_row_iq3_s = quantize_row_iq3_s_arm80;
+ ptr_quantize_row_iq2_s = quantize_row_iq2_s_arm80;
+ ptr_dequantize_row_q4_0 = dequantize_row_q4_0_arm80;
+ ptr_dequantize_row_q4_1 = dequantize_row_q4_1_arm80;
+ ptr_dequantize_row_q5_0 = dequantize_row_q5_0_arm80;
+ ptr_dequantize_row_q5_1 = dequantize_row_q5_1_arm80;
+ ptr_dequantize_row_q8_0 = dequantize_row_q8_0_arm80;
+ ptr_dequantize_row_q2_K = dequantize_row_q2_K_arm80;
+ ptr_dequantize_row_q3_K = dequantize_row_q3_K_arm80;
+ ptr_dequantize_row_q4_K = dequantize_row_q4_K_arm80;
+ ptr_dequantize_row_q5_K = dequantize_row_q5_K_arm80;
+ ptr_dequantize_row_q6_K = dequantize_row_q6_K_arm80;
+ ptr_dequantize_row_q8_K = dequantize_row_q8_K_arm80;
+ ptr_dequantize_row_iq2_xxs = dequantize_row_iq2_xxs_arm80;
+ ptr_dequantize_row_iq2_xs = dequantize_row_iq2_xs_arm80;
+ ptr_dequantize_row_iq2_s = dequantize_row_iq2_s_arm80;
+ ptr_dequantize_row_iq3_xxs = dequantize_row_iq3_xxs_arm80;
+ ptr_dequantize_row_iq1_s = dequantize_row_iq1_s_arm80;
+ ptr_dequantize_row_iq1_m = dequantize_row_iq1_m_arm80;
+ ptr_dequantize_row_iq4_nl = dequantize_row_iq4_nl_arm80;
+ ptr_dequantize_row_iq4_xs = dequantize_row_iq4_xs_arm80;
+ ptr_dequantize_row_iq3_s = dequantize_row_iq3_s_arm80;
+ ptr_ggml_vec_dot_q4_0_q8_0 = ggml_vec_dot_q4_0_q8_0_arm80;
+ ptr_ggml_vec_dot_q4_1_q8_1 = ggml_vec_dot_q4_1_q8_1_arm80;
+ ptr_ggml_vec_dot_q5_0_q8_0 = ggml_vec_dot_q5_0_q8_0_arm80;
+ ptr_ggml_vec_dot_q5_1_q8_1 = ggml_vec_dot_q5_1_q8_1_arm80;
+ ptr_ggml_vec_dot_q8_0_q8_0 = ggml_vec_dot_q8_0_q8_0_arm80;
+ ptr_ggml_vec_dot_q2_K_q8_K = ggml_vec_dot_q2_K_q8_K_arm80;
+ ptr_ggml_vec_dot_q3_K_q8_K = ggml_vec_dot_q3_K_q8_K_arm80;
+ ptr_ggml_vec_dot_q4_K_q8_K = ggml_vec_dot_q4_K_q8_K_arm80;
+ ptr_ggml_vec_dot_q5_K_q8_K = ggml_vec_dot_q5_K_q8_K_arm80;
+ ptr_ggml_vec_dot_q6_K_q8_K = ggml_vec_dot_q6_K_q8_K_arm80;
+ ptr_ggml_vec_dot_iq2_xxs_q8_K = ggml_vec_dot_iq2_xxs_q8_K_arm80;
+ ptr_ggml_vec_dot_iq2_xs_q8_K = ggml_vec_dot_iq2_xs_q8_K_arm80;
+ ptr_ggml_vec_dot_iq2_s_q8_K = ggml_vec_dot_iq2_s_q8_K_arm80;
+ ptr_ggml_vec_dot_iq3_xxs_q8_K = ggml_vec_dot_iq3_xxs_q8_K_arm80;
+ ptr_ggml_vec_dot_iq1_s_q8_K = ggml_vec_dot_iq1_s_q8_K_arm80;
+ ptr_ggml_vec_dot_iq1_m_q8_K = ggml_vec_dot_iq1_m_q8_K_arm80;
+ ptr_ggml_vec_dot_iq4_nl_q8_0 = ggml_vec_dot_iq4_nl_q8_0_arm80;
+ ptr_ggml_vec_dot_iq4_xs_q8_K = ggml_vec_dot_iq4_xs_q8_K_arm80;
+ ptr_ggml_vec_dot_iq3_s_q8_K = ggml_vec_dot_iq3_s_q8_K_arm80;
+ ptr_quantize_iq2_xxs = quantize_iq2_xxs_arm80;
+ ptr_quantize_iq2_xs = quantize_iq2_xs_arm80;
+ ptr_quantize_iq2_s = quantize_iq2_s_arm80;
+ ptr_quantize_iq3_xxs = quantize_iq3_xxs_arm80;
+ ptr_quantize_iq1_s = quantize_iq1_s_arm80;
+ ptr_quantize_iq1_m = quantize_iq1_m_arm80;
+ ptr_quantize_iq4_nl = quantize_iq4_nl_arm80;
+ ptr_quantize_iq4_xs = quantize_iq4_xs_arm80;
+ ptr_quantize_iq3_s = quantize_iq3_s_arm80;
+ ptr_quantize_q2_K = quantize_q2_K_arm80;
+ ptr_quantize_q3_K = quantize_q3_K_arm80;
+ ptr_quantize_q4_K = quantize_q4_K_arm80;
+ ptr_quantize_q5_K = quantize_q5_K_arm80;
+ ptr_quantize_q6_K = quantize_q6_K_arm80;
+ ptr_quantize_q4_0 = quantize_q4_0_arm80;
+ ptr_quantize_q4_1 = quantize_q4_1_arm80;
+ ptr_quantize_q5_0 = quantize_q5_0_arm80;
+ ptr_quantize_q5_1 = quantize_q5_1_arm80;
+ ptr_quantize_q8_0 = quantize_q8_0_arm80;
+ ptr_iq2xs_init_impl = iq2xs_init_impl_arm80;
+ ptr_iq2xs_free_impl = iq2xs_free_impl_arm80;
+ ptr_iq3xs_init_impl = iq3xs_init_impl_arm80;
+ ptr_iq3xs_free_impl = iq3xs_free_impl_arm80;
+ ptr_ggml_validate_row_data = ggml_validate_row_data_arm80;
+ return;
+ }
#endif
}
} funcs;
diff --git a/llama.cpp/ggml-quants.py b/llama.cpp/ggml-quants.py
index 9a9d0fd6..48b4e972 100644
--- a/llama.cpp/ggml-quants.py
+++ b/llama.cpp/ggml-quants.py
@@ -12,9 +12,11 @@ FUNCS.append(('ggml_validate_row_data', 'bool ggml_validate_row_data(enum ggml_t
# END SPECIAL FUNCTIONS
ARCHS = (
- ('amd_avx512', '__x86_64__', ('FMA', 'F16C', 'AVX2', 'AVX512F')),
- ('amd_avx2', '__x86_64__', ('FMA', 'F16C', 'AVX2')),
- ('amd_avx', '__x86_64__', ()),
+ ('amd_avx512', '__x86_64__', ('FMA', 'F16C', 'AVX', 'AVX2', 'AVX512F')),
+ ('amd_avx2', '__x86_64__', ('FMA', 'F16C', 'AVX', 'AVX2')),
+ ('amd_avx', '__x86_64__', ('AVX',)),
+ ('amd_ssse3', '__x86_64__', ('SSSE3',)),
+ ('amd_k8', '__x86_64__', ()),
('arm80', '__aarch64__', ()),
)
@@ -57,6 +59,6 @@ with open('llama.cpp/ggml-quants.cpp', 'w') as f:
proto = proto.replace(';', '')
args = [s.split(' ')[-1] for s in re.search(r'(?<=\().*(?=\))', proto).group(0).split(',')]
f.write(proto + ' {\n')
- f.write(' return funcs.ptr_%s(%s);\n' % (func, args))
+ f.write(' return funcs.ptr_%s(%s);\n' % (func, ", ".join(args)))
f.write('}\n')
f.write('\n')
diff --git a/llama.cpp/ggml-vector-amd-k8.c b/llama.cpp/ggml-vector-amd-k8.c
new file mode 100644
index 00000000..bf730915
--- /dev/null
+++ b/llama.cpp/ggml-vector-amd-k8.c
@@ -0,0 +1,59 @@
+#ifdef __x86_64__
+#define ggml_fp16_to_fp32_row ggml_fp16_to_fp32_row_amd_k8
+#define ggml_fp32_to_fp16_row ggml_fp32_to_fp16_row_amd_k8
+#define ggml_bf16_to_fp32_row ggml_bf16_to_fp32_row_amd_k8
+#define ggml_fp32_to_bf16_row ggml_fp32_to_bf16_row_amd_k8
+#define ggml_vec_dot_f32 ggml_vec_dot_f32_amd_k8
+#define ggml_vec_dot_f16 ggml_vec_dot_f16_amd_k8
+#define ggml_vec_dot_bf16 ggml_vec_dot_bf16_amd_k8
+#define ggml_vec_dot_f16_unroll ggml_vec_dot_f16_unroll_amd_k8
+#define ggml_vec_mad_f32_unroll ggml_vec_mad_f32_unroll_amd_k8
+#define ggml_vec_set_i8 ggml_vec_set_i8_amd_k8
+#define ggml_vec_set_i16 ggml_vec_set_i16_amd_k8
+#define ggml_vec_set_i32 ggml_vec_set_i32_amd_k8
+#define ggml_vec_set_f16 ggml_vec_set_f16_amd_k8
+#define ggml_vec_set_bf16 ggml_vec_set_bf16_amd_k8
+#define ggml_vec_add_f32 ggml_vec_add_f32_amd_k8
+#define ggml_vec_add1_f32 ggml_vec_add1_f32_amd_k8
+#define ggml_vec_acc_f32 ggml_vec_acc_f32_amd_k8
+#define ggml_vec_acc1_f32 ggml_vec_acc1_f32_amd_k8
+#define ggml_vec_sub_f32 ggml_vec_sub_f32_amd_k8
+#define ggml_vec_set_f32 ggml_vec_set_f32_amd_k8
+#define ggml_vec_cpy_f32 ggml_vec_cpy_f32_amd_k8
+#define ggml_vec_neg_f32 ggml_vec_neg_f32_amd_k8
+#define ggml_vec_mul_f32 ggml_vec_mul_f32_amd_k8
+#define ggml_vec_div_f32 ggml_vec_div_f32_amd_k8
+#define ggml_vec_scale_f32 ggml_vec_scale_f32_amd_k8
+#define ggml_vec_scale_f16 ggml_vec_scale_f16_amd_k8
+#define ggml_vec_mad_f32 ggml_vec_mad_f32_amd_k8
+#define ggml_vec_mad_f16 ggml_vec_mad_f16_amd_k8
+#define ggml_vec_norm_f32 ggml_vec_norm_f32_amd_k8
+#define ggml_vec_sqr_f32 ggml_vec_sqr_f32_amd_k8
+#define ggml_vec_sqrt_f32 ggml_vec_sqrt_f32_amd_k8
+#define ggml_vec_log_f32 ggml_vec_log_f32_amd_k8
+#define ggml_vec_abs_f32 ggml_vec_abs_f32_amd_k8
+#define ggml_vec_sgn_f32 ggml_vec_sgn_f32_amd_k8
+#define ggml_vec_step_f32 ggml_vec_step_f32_amd_k8
+#define ggml_vec_tanh_f32 ggml_vec_tanh_f32_amd_k8
+#define ggml_vec_elu_f32 ggml_vec_elu_f32_amd_k8
+#define ggml_vec_relu_f32 ggml_vec_relu_f32_amd_k8
+#define ggml_vec_leaky_relu_f32 ggml_vec_leaky_relu_f32_amd_k8
+#define ggml_vec_hardswish_f32 ggml_vec_hardswish_f32_amd_k8
+#define ggml_vec_hardsigmoid_f32 ggml_vec_hardsigmoid_f32_amd_k8
+#define ggml_vec_gelu_f32 ggml_vec_gelu_f32_amd_k8
+#define ggml_vec_gelu_quick_f32 ggml_vec_gelu_quick_f32_amd_k8
+#define ggml_vec_silu_f32 ggml_vec_silu_f32_amd_k8
+#define ggml_silu_backward_f32 ggml_silu_backward_f32_amd_k8
+#define ggml_vec_silu_backward_f32 ggml_vec_silu_backward_f32_amd_k8
+#define ggml_vec_sum_f32 ggml_vec_sum_f32_amd_k8
+#define ggml_vec_sum_f32_ggf ggml_vec_sum_f32_ggf_amd_k8
+#define ggml_vec_sum_f16_ggf ggml_vec_sum_f16_ggf_amd_k8
+#define ggml_vec_sum_bf16_ggf ggml_vec_sum_bf16_ggf_amd_k8
+#define ggml_vec_max_f32 ggml_vec_max_f32_amd_k8
+#define ggml_vec_argmax_f32 ggml_vec_argmax_f32_amd_k8
+#define ggml_vec_soft_max_f32 ggml_vec_soft_max_f32_amd_k8
+#define ggml_vec_norm_inv_f32 ggml_vec_norm_inv_f32_amd_k8
+#define ggml_vec_sigmoid_f32 ggml_vec_sigmoid_f32_amd_k8
+#define GGML_VECTOR
+#include "ggml-vector.inc"
+#endif // __x86_64__
diff --git a/llama.cpp/ggml-vector-amd-ssse3.c b/llama.cpp/ggml-vector-amd-ssse3.c
new file mode 100644
index 00000000..c86127be
--- /dev/null
+++ b/llama.cpp/ggml-vector-amd-ssse3.c
@@ -0,0 +1,59 @@
+#ifdef __x86_64__
+#define ggml_fp16_to_fp32_row ggml_fp16_to_fp32_row_amd_ssse3
+#define ggml_fp32_to_fp16_row ggml_fp32_to_fp16_row_amd_ssse3
+#define ggml_bf16_to_fp32_row ggml_bf16_to_fp32_row_amd_ssse3
+#define ggml_fp32_to_bf16_row ggml_fp32_to_bf16_row_amd_ssse3
+#define ggml_vec_dot_f32 ggml_vec_dot_f32_amd_ssse3
+#define ggml_vec_dot_f16 ggml_vec_dot_f16_amd_ssse3
+#define ggml_vec_dot_bf16 ggml_vec_dot_bf16_amd_ssse3
+#define ggml_vec_dot_f16_unroll ggml_vec_dot_f16_unroll_amd_ssse3
+#define ggml_vec_mad_f32_unroll ggml_vec_mad_f32_unroll_amd_ssse3
+#define ggml_vec_set_i8 ggml_vec_set_i8_amd_ssse3
+#define ggml_vec_set_i16 ggml_vec_set_i16_amd_ssse3
+#define ggml_vec_set_i32 ggml_vec_set_i32_amd_ssse3
+#define ggml_vec_set_f16 ggml_vec_set_f16_amd_ssse3
+#define ggml_vec_set_bf16 ggml_vec_set_bf16_amd_ssse3
+#define ggml_vec_add_f32 ggml_vec_add_f32_amd_ssse3
+#define ggml_vec_add1_f32 ggml_vec_add1_f32_amd_ssse3
+#define ggml_vec_acc_f32 ggml_vec_acc_f32_amd_ssse3
+#define ggml_vec_acc1_f32 ggml_vec_acc1_f32_amd_ssse3
+#define ggml_vec_sub_f32 ggml_vec_sub_f32_amd_ssse3
+#define ggml_vec_set_f32 ggml_vec_set_f32_amd_ssse3
+#define ggml_vec_cpy_f32 ggml_vec_cpy_f32_amd_ssse3
+#define ggml_vec_neg_f32 ggml_vec_neg_f32_amd_ssse3
+#define ggml_vec_mul_f32 ggml_vec_mul_f32_amd_ssse3
+#define ggml_vec_div_f32 ggml_vec_div_f32_amd_ssse3
+#define ggml_vec_scale_f32 ggml_vec_scale_f32_amd_ssse3
+#define ggml_vec_scale_f16 ggml_vec_scale_f16_amd_ssse3
+#define ggml_vec_mad_f32 ggml_vec_mad_f32_amd_ssse3
+#define ggml_vec_mad_f16 ggml_vec_mad_f16_amd_ssse3
+#define ggml_vec_norm_f32 ggml_vec_norm_f32_amd_ssse3
+#define ggml_vec_sqr_f32 ggml_vec_sqr_f32_amd_ssse3
+#define ggml_vec_sqrt_f32 ggml_vec_sqrt_f32_amd_ssse3
+#define ggml_vec_log_f32 ggml_vec_log_f32_amd_ssse3
+#define ggml_vec_abs_f32 ggml_vec_abs_f32_amd_ssse3
+#define ggml_vec_sgn_f32 ggml_vec_sgn_f32_amd_ssse3
+#define ggml_vec_step_f32 ggml_vec_step_f32_amd_ssse3
+#define ggml_vec_tanh_f32 ggml_vec_tanh_f32_amd_ssse3
+#define ggml_vec_elu_f32 ggml_vec_elu_f32_amd_ssse3
+#define ggml_vec_relu_f32 ggml_vec_relu_f32_amd_ssse3
+#define ggml_vec_leaky_relu_f32 ggml_vec_leaky_relu_f32_amd_ssse3
+#define ggml_vec_hardswish_f32 ggml_vec_hardswish_f32_amd_ssse3
+#define ggml_vec_hardsigmoid_f32 ggml_vec_hardsigmoid_f32_amd_ssse3
+#define ggml_vec_gelu_f32 ggml_vec_gelu_f32_amd_ssse3
+#define ggml_vec_gelu_quick_f32 ggml_vec_gelu_quick_f32_amd_ssse3
+#define ggml_vec_silu_f32 ggml_vec_silu_f32_amd_ssse3
+#define ggml_silu_backward_f32 ggml_silu_backward_f32_amd_ssse3
+#define ggml_vec_silu_backward_f32 ggml_vec_silu_backward_f32_amd_ssse3
+#define ggml_vec_sum_f32 ggml_vec_sum_f32_amd_ssse3
+#define ggml_vec_sum_f32_ggf ggml_vec_sum_f32_ggf_amd_ssse3
+#define ggml_vec_sum_f16_ggf ggml_vec_sum_f16_ggf_amd_ssse3
+#define ggml_vec_sum_bf16_ggf ggml_vec_sum_bf16_ggf_amd_ssse3
+#define ggml_vec_max_f32 ggml_vec_max_f32_amd_ssse3
+#define ggml_vec_argmax_f32 ggml_vec_argmax_f32_amd_ssse3
+#define ggml_vec_soft_max_f32 ggml_vec_soft_max_f32_amd_ssse3
+#define ggml_vec_norm_inv_f32 ggml_vec_norm_inv_f32_amd_ssse3
+#define ggml_vec_sigmoid_f32 ggml_vec_sigmoid_f32_amd_ssse3
+#define GGML_VECTOR
+#include "ggml-vector.inc"
+#endif // __x86_64__
diff --git a/llama.cpp/ggml-vector.cpp b/llama.cpp/ggml-vector.cpp
index 00dc9d58..f5e6332d 100644
--- a/llama.cpp/ggml-vector.cpp
+++ b/llama.cpp/ggml-vector.cpp
@@ -9,6 +9,8 @@ extern "C" void ggml_fp16_to_fp32_row_amd_avx2(const ggml_fp16_t * x, float * y,
extern "C" void ggml_fp16_to_fp32_row_amd_f16c(const ggml_fp16_t * x, float * y, int64_t n);
extern "C" void ggml_fp16_to_fp32_row_amd_fma(const ggml_fp16_t * x, float * y, int64_t n);
extern "C" void ggml_fp16_to_fp32_row_amd_avx(const ggml_fp16_t * x, float * y, int64_t n);
+extern "C" void ggml_fp16_to_fp32_row_amd_ssse3(const ggml_fp16_t * x, float * y, int64_t n);
+extern "C" void ggml_fp16_to_fp32_row_amd_k8(const ggml_fp16_t * x, float * y, int64_t n);
extern "C" void ggml_fp16_to_fp32_row_arm82(const ggml_fp16_t * x, float * y, int64_t n);
extern "C" void ggml_fp16_to_fp32_row_arm80(const ggml_fp16_t * x, float * y, int64_t n);
@@ -18,6 +20,8 @@ extern "C" void ggml_fp32_to_fp16_row_amd_avx2(const float * x, ggml_fp16_t * y,
extern "C" void ggml_fp32_to_fp16_row_amd_f16c(const float * x, ggml_fp16_t * y, int64_t n);
extern "C" void ggml_fp32_to_fp16_row_amd_fma(const float * x, ggml_fp16_t * y, int64_t n);
extern "C" void ggml_fp32_to_fp16_row_amd_avx(const float * x, ggml_fp16_t * y, int64_t n);
+extern "C" void ggml_fp32_to_fp16_row_amd_ssse3(const float * x, ggml_fp16_t * y, int64_t n);
+extern "C" void ggml_fp32_to_fp16_row_amd_k8(const float * x, ggml_fp16_t * y, int64_t n);
extern "C" void ggml_fp32_to_fp16_row_arm82(const float * x, ggml_fp16_t * y, int64_t n);
extern "C" void ggml_fp32_to_fp16_row_arm80(const float * x, ggml_fp16_t * y, int64_t n);
@@ -27,6 +31,8 @@ extern "C" void ggml_bf16_to_fp32_row_amd_avx2(const ggml_bf16_t * x, float * y,
extern "C" void ggml_bf16_to_fp32_row_amd_f16c(const ggml_bf16_t * x, float * y, int64_t n);
extern "C" void ggml_bf16_to_fp32_row_amd_fma(const ggml_bf16_t * x, float * y, int64_t n);
extern "C" void ggml_bf16_to_fp32_row_amd_avx(const ggml_bf16_t * x, float * y, int64_t n);
+extern "C" void ggml_bf16_to_fp32_row_amd_ssse3(const ggml_bf16_t * x, float * y, int64_t n);
+extern "C" void ggml_bf16_to_fp32_row_amd_k8(const ggml_bf16_t * x, float * y, int64_t n);
extern "C" void ggml_bf16_to_fp32_row_arm82(const ggml_bf16_t * x, float * y, int64_t n);
extern "C" void ggml_bf16_to_fp32_row_arm80(const ggml_bf16_t * x, float * y, int64_t n);
@@ -36,6 +42,8 @@ extern "C" void ggml_fp32_to_bf16_row_amd_avx2(const float * x, ggml_bf16_t * y,
extern "C" void ggml_fp32_to_bf16_row_amd_f16c(const float * x, ggml_bf16_t * y, int64_t n);
extern "C" void ggml_fp32_to_bf16_row_amd_fma(const float * x, ggml_bf16_t * y, int64_t n);
extern "C" void ggml_fp32_to_bf16_row_amd_avx(const float * x, ggml_bf16_t * y, int64_t n);
+extern "C" void ggml_fp32_to_bf16_row_amd_ssse3(const float * x, ggml_bf16_t * y, int64_t n);
+extern "C" void ggml_fp32_to_bf16_row_amd_k8(const float * x, ggml_bf16_t * y, int64_t n);
extern "C" void ggml_fp32_to_bf16_row_arm82(const float * x, ggml_bf16_t * y, int64_t n);
extern "C" void ggml_fp32_to_bf16_row_arm80(const float * x, ggml_bf16_t * y, int64_t n);
@@ -45,6 +53,8 @@ extern "C" void ggml_vec_dot_f32_amd_avx2(int n, float * restrict s, size_t bs,
extern "C" void ggml_vec_dot_f32_amd_f16c(int n, float * restrict s, size_t bs, const float * restrict x, size_t bx, const float * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_f32_amd_fma(int n, float * restrict s, size_t bs, const float * restrict x, size_t bx, const float * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_f32_amd_avx(int n, float * restrict s, size_t bs, const float * restrict x, size_t bx, const float * restrict y, size_t by, int nrc);
+extern "C" void ggml_vec_dot_f32_amd_ssse3(int n, float * restrict s, size_t bs, const float * restrict x, size_t bx, const float * restrict y, size_t by, int nrc);
+extern "C" void ggml_vec_dot_f32_amd_k8(int n, float * restrict s, size_t bs, const float * restrict x, size_t bx, const float * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_f32_arm82(int n, float * restrict s, size_t bs, const float * restrict x, size_t bx, const float * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_f32_arm80(int n, float * restrict s, size_t bs, const float * restrict x, size_t bx, const float * restrict y, size_t by, int nrc);
@@ -54,6 +64,8 @@ extern "C" void ggml_vec_dot_f16_amd_avx2(int n, float * restrict s, size_t bs,
extern "C" void ggml_vec_dot_f16_amd_f16c(int n, float * restrict s, size_t bs, ggml_fp16_t * restrict x, size_t bx, ggml_fp16_t * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_f16_amd_fma(int n, float * restrict s, size_t bs, ggml_fp16_t * restrict x, size_t bx, ggml_fp16_t * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_f16_amd_avx(int n, float * restrict s, size_t bs, ggml_fp16_t * restrict x, size_t bx, ggml_fp16_t * restrict y, size_t by, int nrc);
+extern "C" void ggml_vec_dot_f16_amd_ssse3(int n, float * restrict s, size_t bs, ggml_fp16_t * restrict x, size_t bx, ggml_fp16_t * restrict y, size_t by, int nrc);
+extern "C" void ggml_vec_dot_f16_amd_k8(int n, float * restrict s, size_t bs, ggml_fp16_t * restrict x, size_t bx, ggml_fp16_t * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_f16_arm82(int n, float * restrict s, size_t bs, ggml_fp16_t * restrict x, size_t bx, ggml_fp16_t * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_f16_arm80(int n, float * restrict s, size_t bs, ggml_fp16_t * restrict x, size_t bx, ggml_fp16_t * restrict y, size_t by, int nrc);
@@ -63,6 +75,8 @@ extern "C" void ggml_vec_dot_bf16_amd_avx2(int n, float * restrict s, size_t bs,
extern "C" void ggml_vec_dot_bf16_amd_f16c(int n, float * restrict s, size_t bs, ggml_bf16_t * restrict x, size_t bx, ggml_bf16_t * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_bf16_amd_fma(int n, float * restrict s, size_t bs, ggml_bf16_t * restrict x, size_t bx, ggml_bf16_t * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_bf16_amd_avx(int n, float * restrict s, size_t bs, ggml_bf16_t * restrict x, size_t bx, ggml_bf16_t * restrict y, size_t by, int nrc);
+extern "C" void ggml_vec_dot_bf16_amd_ssse3(int n, float * restrict s, size_t bs, ggml_bf16_t * restrict x, size_t bx, ggml_bf16_t * restrict y, size_t by, int nrc);
+extern "C" void ggml_vec_dot_bf16_amd_k8(int n, float * restrict s, size_t bs, ggml_bf16_t * restrict x, size_t bx, ggml_bf16_t * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_bf16_arm82(int n, float * restrict s, size_t bs, ggml_bf16_t * restrict x, size_t bx, ggml_bf16_t * restrict y, size_t by, int nrc);
extern "C" void ggml_vec_dot_bf16_arm80(int n, float * restrict s, size_t bs, ggml_bf16_t * restrict x, size_t bx, ggml_bf16_t * restrict y, size_t by, int nrc);
@@ -72,6 +86,8 @@ extern "C" void ggml_vec_dot_f16_unroll_amd_avx2(const int n, const int xs, floa
extern "C" void ggml_vec_dot_f16_unroll_amd_f16c(const int n, const int xs, float * restrict s, void * restrict xv, ggml_fp16_t * restrict y);
extern "C" void ggml_vec_dot_f16_unroll_amd_fma(const int n, const int xs, float * restrict s, void * restrict xv, ggml_fp16_t * restrict y);
extern "C" void ggml_vec_dot_f16_unroll_amd_avx(const int n, const int xs, float * restrict s, void * restrict xv, ggml_fp16_t * restrict y);
+extern "C" void ggml_vec_dot_f16_unroll_amd_ssse3(const int n, const int xs, float * restrict s, void * restrict xv, ggml_fp16_t * restrict y);
+extern "C" void ggml_vec_dot_f16_unroll_amd_k8(const int n, const int xs, float * restrict s, void * restrict xv, ggml_fp16_t * restrict y);
extern "C" void ggml_vec_dot_f16_unroll_arm82(const int n, const int xs, float * restrict s, void * restrict xv, ggml_fp16_t * restrict y);
extern "C" void ggml_vec_dot_f16_unroll_arm80(const int n, const int xs, float * restrict s, void * restrict xv, ggml_fp16_t * restrict y);
@@ -81,6 +97,8 @@ extern "C" void ggml_vec_mad_f32_unroll_amd_avx2(const int n, const int xs, cons
extern "C" void ggml_vec_mad_f32_unroll_amd_f16c(const int n, const int xs, const int vs, float * restrict y, const float * restrict xv, const float * restrict vv);
extern "C" void ggml_vec_mad_f32_unroll_amd_fma(const int n, const int xs, const int vs, float * restrict y, const float * restrict xv, const float * restrict vv);
extern "C" void ggml_vec_mad_f32_unroll_amd_avx(const int n, const int xs, const int vs, float * restrict y, const float * restrict xv, const float * restrict vv);
+extern "C" void ggml_vec_mad_f32_unroll_amd_ssse3(const int n, const int xs, const int vs, float * restrict y, const float * restrict xv, const float * restrict vv);
+extern "C" void ggml_vec_mad_f32_unroll_amd_k8(const int n, const int xs, const int vs, float * restrict y, const float * restrict xv, const float * restrict vv);
extern "C" void ggml_vec_mad_f32_unroll_arm82(const int n, const int xs, const int vs, float * restrict y, const float * restrict xv, const float * restrict vv);
extern "C" void ggml_vec_mad_f32_unroll_arm80(const int n, const int xs, const int vs, float * restrict y, const float * restrict xv, const float * restrict vv);
@@ -90,6 +108,8 @@ extern "C" void ggml_vec_set_i8_amd_avx2(const int n, int8_t * x, const int8_t v
extern "C" void ggml_vec_set_i8_amd_f16c(const int n, int8_t * x, const int8_t v);
extern "C" void ggml_vec_set_i8_amd_fma(const int n, int8_t * x, const int8_t v);
extern "C" void ggml_vec_set_i8_amd_avx(const int n, int8_t * x, const int8_t v);
+extern "C" void ggml_vec_set_i8_amd_ssse3(const int n, int8_t * x, const int8_t v);
+extern "C" void ggml_vec_set_i8_amd_k8(const int n, int8_t * x, const int8_t v);
extern "C" void ggml_vec_set_i8_arm82(const int n, int8_t * x, const int8_t v);
extern "C" void ggml_vec_set_i8_arm80(const int n, int8_t * x, const int8_t v);
@@ -99,6 +119,8 @@ extern "C" void ggml_vec_set_i16_amd_avx2(const int n, int16_t * x, const int16_
extern "C" void ggml_vec_set_i16_amd_f16c(const int n, int16_t * x, const int16_t v);
extern "C" void ggml_vec_set_i16_amd_fma(const int n, int16_t * x, const int16_t v);
extern "C" void ggml_vec_set_i16_amd_avx(const int n, int16_t * x, const int16_t v);
+extern "C" void ggml_vec_set_i16_amd_ssse3(const int n, int16_t * x, const int16_t v);
+extern "C" void ggml_vec_set_i16_amd_k8(const int n, int16_t * x, const int16_t v);
extern "C" void ggml_vec_set_i16_arm82(const int n, int16_t * x, const int16_t v);
extern "C" void ggml_vec_set_i16_arm80(const int n, int16_t * x, const int16_t v);
@@ -108,6 +130,8 @@ extern "C" void ggml_vec_set_i32_amd_avx2(const int n, int32_t * x, const int32_
extern "C" void ggml_vec_set_i32_amd_f16c(const int n, int32_t * x, const int32_t v);
extern "C" void ggml_vec_set_i32_amd_fma(const int n, int32_t * x, const int32_t v);
extern "C" void ggml_vec_set_i32_amd_avx(const int n, int32_t * x, const int32_t v);
+extern "C" void ggml_vec_set_i32_amd_ssse3(const int n, int32_t * x, const int32_t v);
+extern "C" void ggml_vec_set_i32_amd_k8(const int n, int32_t * x, const int32_t v);
extern "C" void ggml_vec_set_i32_arm82(const int n, int32_t * x, const int32_t v);
extern "C" void ggml_vec_set_i32_arm80(const int n, int32_t * x, const int32_t v);
@@ -117,6 +141,8 @@ extern "C" void ggml_vec_set_f16_amd_avx2(const int n, ggml_fp16_t * x, const in
extern "C" void ggml_vec_set_f16_amd_f16c(const int n, ggml_fp16_t * x, const int32_t v);
extern "C" void ggml_vec_set_f16_amd_fma(const int n, ggml_fp16_t * x, const int32_t v);
extern "C" void ggml_vec_set_f16_amd_avx(const int n, ggml_fp16_t * x, const int32_t v);
+extern "C" void ggml_vec_set_f16_amd_ssse3(const int n, ggml_fp16_t * x, const int32_t v);
+extern "C" void ggml_vec_set_f16_amd_k8(const int n, ggml_fp16_t * x, const int32_t v);
extern "C" void ggml_vec_set_f16_arm82(const int n, ggml_fp16_t * x, const int32_t v);
extern "C" void ggml_vec_set_f16_arm80(const int n, ggml_fp16_t * x, const int32_t v);
@@ -126,6 +152,8 @@ extern "C" void ggml_vec_set_bf16_amd_avx2(const int n, ggml_bf16_t * x, const g
extern "C" void ggml_vec_set_bf16_amd_f16c(const int n, ggml_bf16_t * x, const ggml_bf16_t v);
extern "C" void ggml_vec_set_bf16_amd_fma(const int n, ggml_bf16_t * x, const ggml_bf16_t v);
extern "C" void ggml_vec_set_bf16_amd_avx(const int n, ggml_bf16_t * x, const ggml_bf16_t v);
+extern "C" void ggml_vec_set_bf16_amd_ssse3(const int n, ggml_bf16_t * x, const ggml_bf16_t v);
+extern "C" void ggml_vec_set_bf16_amd_k8(const int n, ggml_bf16_t * x, const ggml_bf16_t v);
extern "C" void ggml_vec_set_bf16_arm82(const int n, ggml_bf16_t * x, const ggml_bf16_t v);
extern "C" void ggml_vec_set_bf16_arm80(const int n, ggml_bf16_t * x, const ggml_bf16_t v);
@@ -135,6 +163,8 @@ extern "C" void ggml_vec_add_f32_amd_avx2 (const int n, float * z, const float *
extern "C" void ggml_vec_add_f32_amd_f16c (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_add_f32_amd_fma (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_add_f32_amd_avx (const int n, float * z, const float * x, const float * y);
+extern "C" void ggml_vec_add_f32_amd_ssse3 (const int n, float * z, const float * x, const float * y);
+extern "C" void ggml_vec_add_f32_amd_k8 (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_add_f32_arm82 (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_add_f32_arm80 (const int n, float * z, const float * x, const float * y);
@@ -144,6 +174,8 @@ extern "C" void ggml_vec_add1_f32_amd_avx2(const int n, float * z, const float *
extern "C" void ggml_vec_add1_f32_amd_f16c(const int n, float * z, const float * x, const float v);
extern "C" void ggml_vec_add1_f32_amd_fma(const int n, float * z, const float * x, const float v);
extern "C" void ggml_vec_add1_f32_amd_avx(const int n, float * z, const float * x, const float v);
+extern "C" void ggml_vec_add1_f32_amd_ssse3(const int n, float * z, const float * x, const float v);
+extern "C" void ggml_vec_add1_f32_amd_k8(const int n, float * z, const float * x, const float v);
extern "C" void ggml_vec_add1_f32_arm82(const int n, float * z, const float * x, const float v);
extern "C" void ggml_vec_add1_f32_arm80(const int n, float * z, const float * x, const float v);
@@ -153,6 +185,8 @@ extern "C" void ggml_vec_acc_f32_amd_avx2 (const int n, float * y, const float *
extern "C" void ggml_vec_acc_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_acc_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_acc_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_acc_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_acc_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_acc_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_acc_f32_arm80 (const int n, float * y, const float * x);
@@ -162,6 +196,8 @@ extern "C" void ggml_vec_acc1_f32_amd_avx2(const int n, float * y, const float
extern "C" void ggml_vec_acc1_f32_amd_f16c(const int n, float * y, const float v);
extern "C" void ggml_vec_acc1_f32_amd_fma(const int n, float * y, const float v);
extern "C" void ggml_vec_acc1_f32_amd_avx(const int n, float * y, const float v);
+extern "C" void ggml_vec_acc1_f32_amd_ssse3(const int n, float * y, const float v);
+extern "C" void ggml_vec_acc1_f32_amd_k8(const int n, float * y, const float v);
extern "C" void ggml_vec_acc1_f32_arm82(const int n, float * y, const float v);
extern "C" void ggml_vec_acc1_f32_arm80(const int n, float * y, const float v);
@@ -171,6 +207,8 @@ extern "C" void ggml_vec_sub_f32_amd_avx2 (const int n, float * z, const float *
extern "C" void ggml_vec_sub_f32_amd_f16c (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_sub_f32_amd_fma (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_sub_f32_amd_avx (const int n, float * z, const float * x, const float * y);
+extern "C" void ggml_vec_sub_f32_amd_ssse3 (const int n, float * z, const float * x, const float * y);
+extern "C" void ggml_vec_sub_f32_amd_k8 (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_sub_f32_arm82 (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_sub_f32_arm80 (const int n, float * z, const float * x, const float * y);
@@ -180,6 +218,8 @@ extern "C" void ggml_vec_set_f32_amd_avx2 (const int n, float * x, const float
extern "C" void ggml_vec_set_f32_amd_f16c (const int n, float * x, const float v);
extern "C" void ggml_vec_set_f32_amd_fma (const int n, float * x, const float v);
extern "C" void ggml_vec_set_f32_amd_avx (const int n, float * x, const float v);
+extern "C" void ggml_vec_set_f32_amd_ssse3 (const int n, float * x, const float v);
+extern "C" void ggml_vec_set_f32_amd_k8 (const int n, float * x, const float v);
extern "C" void ggml_vec_set_f32_arm82 (const int n, float * x, const float v);
extern "C" void ggml_vec_set_f32_arm80 (const int n, float * x, const float v);
@@ -189,6 +229,8 @@ extern "C" void ggml_vec_cpy_f32_amd_avx2 (const int n, float * y, const float *
extern "C" void ggml_vec_cpy_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_cpy_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_cpy_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_cpy_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_cpy_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_cpy_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_cpy_f32_arm80 (const int n, float * y, const float * x);
@@ -198,6 +240,8 @@ extern "C" void ggml_vec_neg_f32_amd_avx2 (const int n, float * y, const float *
extern "C" void ggml_vec_neg_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_neg_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_neg_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_neg_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_neg_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_neg_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_neg_f32_arm80 (const int n, float * y, const float * x);
@@ -207,6 +251,8 @@ extern "C" void ggml_vec_mul_f32_amd_avx2 (const int n, float * z, const float *
extern "C" void ggml_vec_mul_f32_amd_f16c (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_mul_f32_amd_fma (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_mul_f32_amd_avx (const int n, float * z, const float * x, const float * y);
+extern "C" void ggml_vec_mul_f32_amd_ssse3 (const int n, float * z, const float * x, const float * y);
+extern "C" void ggml_vec_mul_f32_amd_k8 (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_mul_f32_arm82 (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_mul_f32_arm80 (const int n, float * z, const float * x, const float * y);
@@ -216,6 +262,8 @@ extern "C" void ggml_vec_div_f32_amd_avx2 (const int n, float * z, const float *
extern "C" void ggml_vec_div_f32_amd_f16c (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_div_f32_amd_fma (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_div_f32_amd_avx (const int n, float * z, const float * x, const float * y);
+extern "C" void ggml_vec_div_f32_amd_ssse3 (const int n, float * z, const float * x, const float * y);
+extern "C" void ggml_vec_div_f32_amd_k8 (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_div_f32_arm82 (const int n, float * z, const float * x, const float * y);
extern "C" void ggml_vec_div_f32_arm80 (const int n, float * z, const float * x, const float * y);
@@ -225,6 +273,8 @@ extern "C" void ggml_vec_scale_f32_amd_avx2(const int n, float * y, const float
extern "C" void ggml_vec_scale_f32_amd_f16c(const int n, float * y, const float v);
extern "C" void ggml_vec_scale_f32_amd_fma(const int n, float * y, const float v);
extern "C" void ggml_vec_scale_f32_amd_avx(const int n, float * y, const float v);
+extern "C" void ggml_vec_scale_f32_amd_ssse3(const int n, float * y, const float v);
+extern "C" void ggml_vec_scale_f32_amd_k8(const int n, float * y, const float v);
extern "C" void ggml_vec_scale_f32_arm82(const int n, float * y, const float v);
extern "C" void ggml_vec_scale_f32_arm80(const int n, float * y, const float v);
@@ -234,6 +284,8 @@ extern "C" void ggml_vec_scale_f16_amd_avx2(const int n, ggml_fp16_t * y, const
extern "C" void ggml_vec_scale_f16_amd_f16c(const int n, ggml_fp16_t * y, const float v);
extern "C" void ggml_vec_scale_f16_amd_fma(const int n, ggml_fp16_t * y, const float v);
extern "C" void ggml_vec_scale_f16_amd_avx(const int n, ggml_fp16_t * y, const float v);
+extern "C" void ggml_vec_scale_f16_amd_ssse3(const int n, ggml_fp16_t * y, const float v);
+extern "C" void ggml_vec_scale_f16_amd_k8(const int n, ggml_fp16_t * y, const float v);
extern "C" void ggml_vec_scale_f16_arm82(const int n, ggml_fp16_t * y, const float v);
extern "C" void ggml_vec_scale_f16_arm80(const int n, ggml_fp16_t * y, const float v);
@@ -243,6 +295,8 @@ extern "C" void ggml_vec_mad_f32_amd_avx2(const int n, float * restrict y, const
extern "C" void ggml_vec_mad_f32_amd_f16c(const int n, float * restrict y, const float * restrict x, const float v);
extern "C" void ggml_vec_mad_f32_amd_fma(const int n, float * restrict y, const float * restrict x, const float v);
extern "C" void ggml_vec_mad_f32_amd_avx(const int n, float * restrict y, const float * restrict x, const float v);
+extern "C" void ggml_vec_mad_f32_amd_ssse3(const int n, float * restrict y, const float * restrict x, const float v);
+extern "C" void ggml_vec_mad_f32_amd_k8(const int n, float * restrict y, const float * restrict x, const float v);
extern "C" void ggml_vec_mad_f32_arm82(const int n, float * restrict y, const float * restrict x, const float v);
extern "C" void ggml_vec_mad_f32_arm80(const int n, float * restrict y, const float * restrict x, const float v);
@@ -252,6 +306,8 @@ extern "C" void ggml_vec_mad_f16_amd_avx2(const int n, ggml_fp16_t * restrict y,
extern "C" void ggml_vec_mad_f16_amd_f16c(const int n, ggml_fp16_t * restrict y, const ggml_fp16_t * restrict x, const float v);
extern "C" void ggml_vec_mad_f16_amd_fma(const int n, ggml_fp16_t * restrict y, const ggml_fp16_t * restrict x, const float v);
extern "C" void ggml_vec_mad_f16_amd_avx(const int n, ggml_fp16_t * restrict y, const ggml_fp16_t * restrict x, const float v);
+extern "C" void ggml_vec_mad_f16_amd_ssse3(const int n, ggml_fp16_t * restrict y, const ggml_fp16_t * restrict x, const float v);
+extern "C" void ggml_vec_mad_f16_amd_k8(const int n, ggml_fp16_t * restrict y, const ggml_fp16_t * restrict x, const float v);
extern "C" void ggml_vec_mad_f16_arm82(const int n, ggml_fp16_t * restrict y, const ggml_fp16_t * restrict x, const float v);
extern "C" void ggml_vec_mad_f16_arm80(const int n, ggml_fp16_t * restrict y, const ggml_fp16_t * restrict x, const float v);
@@ -261,6 +317,8 @@ extern "C" void ggml_vec_norm_f32_amd_avx2 (const int n, float * s, const float
extern "C" void ggml_vec_norm_f32_amd_f16c (const int n, float * s, const float * x);
extern "C" void ggml_vec_norm_f32_amd_fma (const int n, float * s, const float * x);
extern "C" void ggml_vec_norm_f32_amd_avx (const int n, float * s, const float * x);
+extern "C" void ggml_vec_norm_f32_amd_ssse3 (const int n, float * s, const float * x);
+extern "C" void ggml_vec_norm_f32_amd_k8 (const int n, float * s, const float * x);
extern "C" void ggml_vec_norm_f32_arm82 (const int n, float * s, const float * x);
extern "C" void ggml_vec_norm_f32_arm80 (const int n, float * s, const float * x);
@@ -270,6 +328,8 @@ extern "C" void ggml_vec_sqr_f32_amd_avx2 (const int n, float * y, const float
extern "C" void ggml_vec_sqr_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_sqr_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_sqr_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_sqr_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_sqr_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_sqr_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_sqr_f32_arm80 (const int n, float * y, const float * x);
@@ -279,6 +339,8 @@ extern "C" void ggml_vec_sqrt_f32_amd_avx2 (const int n, float * y, const float
extern "C" void ggml_vec_sqrt_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_sqrt_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_sqrt_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_sqrt_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_sqrt_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_sqrt_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_sqrt_f32_arm80 (const int n, float * y, const float * x);
@@ -288,6 +350,8 @@ extern "C" void ggml_vec_log_f32_amd_avx2 (const int n, float * y, const float
extern "C" void ggml_vec_log_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_log_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_log_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_log_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_log_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_log_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_log_f32_arm80 (const int n, float * y, const float * x);
@@ -297,6 +361,8 @@ extern "C" void ggml_vec_abs_f32_amd_avx2 (const int n, float * y, const float
extern "C" void ggml_vec_abs_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_abs_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_abs_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_abs_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_abs_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_abs_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_abs_f32_arm80 (const int n, float * y, const float * x);
@@ -306,6 +372,8 @@ extern "C" void ggml_vec_sgn_f32_amd_avx2 (const int n, float * y, const float
extern "C" void ggml_vec_sgn_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_sgn_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_sgn_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_sgn_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_sgn_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_sgn_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_sgn_f32_arm80 (const int n, float * y, const float * x);
@@ -315,6 +383,8 @@ extern "C" void ggml_vec_step_f32_amd_avx2 (const int n, float * y, const float
extern "C" void ggml_vec_step_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_step_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_step_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_step_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_step_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_step_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_step_f32_arm80 (const int n, float * y, const float * x);
@@ -324,6 +394,8 @@ extern "C" void ggml_vec_tanh_f32_amd_avx2 (const int n, float * y, const float
extern "C" void ggml_vec_tanh_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_tanh_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_tanh_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_tanh_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_tanh_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_tanh_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_tanh_f32_arm80 (const int n, float * y, const float * x);
@@ -333,6 +405,8 @@ extern "C" void ggml_vec_elu_f32_amd_avx2 (const int n, float * y, const float
extern "C" void ggml_vec_elu_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_elu_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_elu_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_elu_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_elu_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_elu_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_elu_f32_arm80 (const int n, float * y, const float * x);
@@ -342,6 +416,8 @@ extern "C" void ggml_vec_relu_f32_amd_avx2 (const int n, float * y, const float
extern "C" void ggml_vec_relu_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_relu_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_relu_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_relu_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_relu_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_relu_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_relu_f32_arm80 (const int n, float * y, const float * x);
@@ -351,6 +427,8 @@ extern "C" void ggml_vec_leaky_relu_f32_amd_avx2 (const int n, float * y, const
extern "C" void ggml_vec_leaky_relu_f32_amd_f16c (const int n, float * y, const float * x, const float ns);
extern "C" void ggml_vec_leaky_relu_f32_amd_fma (const int n, float * y, const float * x, const float ns);
extern "C" void ggml_vec_leaky_relu_f32_amd_avx (const int n, float * y, const float * x, const float ns);
+extern "C" void ggml_vec_leaky_relu_f32_amd_ssse3 (const int n, float * y, const float * x, const float ns);
+extern "C" void ggml_vec_leaky_relu_f32_amd_k8 (const int n, float * y, const float * x, const float ns);
extern "C" void ggml_vec_leaky_relu_f32_arm82 (const int n, float * y, const float * x, const float ns);
extern "C" void ggml_vec_leaky_relu_f32_arm80 (const int n, float * y, const float * x, const float ns);
@@ -360,6 +438,8 @@ extern "C" void ggml_vec_hardswish_f32_amd_avx2 (const int n, float * y, const f
extern "C" void ggml_vec_hardswish_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_hardswish_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_hardswish_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_hardswish_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_hardswish_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_hardswish_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_hardswish_f32_arm80 (const int n, float * y, const float * x);
@@ -369,6 +449,8 @@ extern "C" void ggml_vec_hardsigmoid_f32_amd_avx2 (const int n, float * y, const
extern "C" void ggml_vec_hardsigmoid_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_hardsigmoid_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_hardsigmoid_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_hardsigmoid_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_hardsigmoid_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_hardsigmoid_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_hardsigmoid_f32_arm80 (const int n, float * y, const float * x);
@@ -378,6 +460,8 @@ extern "C" void ggml_vec_gelu_f32_amd_avx2(const int n, float * y, const float *
extern "C" void ggml_vec_gelu_f32_amd_f16c(const int n, float * y, const float * x);
extern "C" void ggml_vec_gelu_f32_amd_fma(const int n, float * y, const float * x);
extern "C" void ggml_vec_gelu_f32_amd_avx(const int n, float * y, const float * x);
+extern "C" void ggml_vec_gelu_f32_amd_ssse3(const int n, float * y, const float * x);
+extern "C" void ggml_vec_gelu_f32_amd_k8(const int n, float * y, const float * x);
extern "C" void ggml_vec_gelu_f32_arm82(const int n, float * y, const float * x);
extern "C" void ggml_vec_gelu_f32_arm80(const int n, float * y, const float * x);
@@ -387,6 +471,8 @@ extern "C" void ggml_vec_gelu_quick_f32_amd_avx2(const int n, float * y, const f
extern "C" void ggml_vec_gelu_quick_f32_amd_f16c(const int n, float * y, const float * x);
extern "C" void ggml_vec_gelu_quick_f32_amd_fma(const int n, float * y, const float * x);
extern "C" void ggml_vec_gelu_quick_f32_amd_avx(const int n, float * y, const float * x);
+extern "C" void ggml_vec_gelu_quick_f32_amd_ssse3(const int n, float * y, const float * x);
+extern "C" void ggml_vec_gelu_quick_f32_amd_k8(const int n, float * y, const float * x);
extern "C" void ggml_vec_gelu_quick_f32_arm82(const int n, float * y, const float * x);
extern "C" void ggml_vec_gelu_quick_f32_arm80(const int n, float * y, const float * x);
@@ -396,6 +482,8 @@ extern "C" void ggml_vec_silu_f32_amd_avx2(const int n, float * y, const float *
extern "C" void ggml_vec_silu_f32_amd_f16c(const int n, float * y, const float * x);
extern "C" void ggml_vec_silu_f32_amd_fma(const int n, float * y, const float * x);
extern "C" void ggml_vec_silu_f32_amd_avx(const int n, float * y, const float * x);
+extern "C" void ggml_vec_silu_f32_amd_ssse3(const int n, float * y, const float * x);
+extern "C" void ggml_vec_silu_f32_amd_k8(const int n, float * y, const float * x);
extern "C" void ggml_vec_silu_f32_arm82(const int n, float * y, const float * x);
extern "C" void ggml_vec_silu_f32_arm80(const int n, float * y, const float * x);
@@ -405,6 +493,8 @@ extern "C" float ggml_silu_backward_f32_amd_avx2(float x, float dy);
extern "C" float ggml_silu_backward_f32_amd_f16c(float x, float dy);
extern "C" float ggml_silu_backward_f32_amd_fma(float x, float dy);
extern "C" float ggml_silu_backward_f32_amd_avx(float x, float dy);
+extern "C" float ggml_silu_backward_f32_amd_ssse3(float x, float dy);
+extern "C" float ggml_silu_backward_f32_amd_k8(float x, float dy);
extern "C" float ggml_silu_backward_f32_arm82(float x, float dy);
extern "C" float ggml_silu_backward_f32_arm80(float x, float dy);
@@ -414,6 +504,8 @@ extern "C" void ggml_vec_silu_backward_f32_amd_avx2(const int n, float * dx, con
extern "C" void ggml_vec_silu_backward_f32_amd_f16c(const int n, float * dx, const float * x, const float * dy);
extern "C" void ggml_vec_silu_backward_f32_amd_fma(const int n, float * dx, const float * x, const float * dy);
extern "C" void ggml_vec_silu_backward_f32_amd_avx(const int n, float * dx, const float * x, const float * dy);
+extern "C" void ggml_vec_silu_backward_f32_amd_ssse3(const int n, float * dx, const float * x, const float * dy);
+extern "C" void ggml_vec_silu_backward_f32_amd_k8(const int n, float * dx, const float * x, const float * dy);
extern "C" void ggml_vec_silu_backward_f32_arm82(const int n, float * dx, const float * x, const float * dy);
extern "C" void ggml_vec_silu_backward_f32_arm80(const int n, float * dx, const float * x, const float * dy);
@@ -423,6 +515,8 @@ extern "C" void ggml_vec_sum_f32_amd_avx2(const int n, float * s, const float *
extern "C" void ggml_vec_sum_f32_amd_f16c(const int n, float * s, const float * x);
extern "C" void ggml_vec_sum_f32_amd_fma(const int n, float * s, const float * x);
extern "C" void ggml_vec_sum_f32_amd_avx(const int n, float * s, const float * x);
+extern "C" void ggml_vec_sum_f32_amd_ssse3(const int n, float * s, const float * x);
+extern "C" void ggml_vec_sum_f32_amd_k8(const int n, float * s, const float * x);
extern "C" void ggml_vec_sum_f32_arm82(const int n, float * s, const float * x);
extern "C" void ggml_vec_sum_f32_arm80(const int n, float * s, const float * x);
@@ -432,6 +526,8 @@ extern "C" void ggml_vec_sum_f32_ggf_amd_avx2(const int n, ggml_float * s, const
extern "C" void ggml_vec_sum_f32_ggf_amd_f16c(const int n, ggml_float * s, const float * x);
extern "C" void ggml_vec_sum_f32_ggf_amd_fma(const int n, ggml_float * s, const float * x);
extern "C" void ggml_vec_sum_f32_ggf_amd_avx(const int n, ggml_float * s, const float * x);
+extern "C" void ggml_vec_sum_f32_ggf_amd_ssse3(const int n, ggml_float * s, const float * x);
+extern "C" void ggml_vec_sum_f32_ggf_amd_k8(const int n, ggml_float * s, const float * x);
extern "C" void ggml_vec_sum_f32_ggf_arm82(const int n, ggml_float * s, const float * x);
extern "C" void ggml_vec_sum_f32_ggf_arm80(const int n, ggml_float * s, const float * x);
@@ -441,6 +537,8 @@ extern "C" void ggml_vec_sum_f16_ggf_amd_avx2(const int n, float * s, const ggml
extern "C" void ggml_vec_sum_f16_ggf_amd_f16c(const int n, float * s, const ggml_fp16_t * x);
extern "C" void ggml_vec_sum_f16_ggf_amd_fma(const int n, float * s, const ggml_fp16_t * x);
extern "C" void ggml_vec_sum_f16_ggf_amd_avx(const int n, float * s, const ggml_fp16_t * x);
+extern "C" void ggml_vec_sum_f16_ggf_amd_ssse3(const int n, float * s, const ggml_fp16_t * x);
+extern "C" void ggml_vec_sum_f16_ggf_amd_k8(const int n, float * s, const ggml_fp16_t * x);
extern "C" void ggml_vec_sum_f16_ggf_arm82(const int n, float * s, const ggml_fp16_t * x);
extern "C" void ggml_vec_sum_f16_ggf_arm80(const int n, float * s, const ggml_fp16_t * x);
@@ -450,6 +548,8 @@ extern "C" void ggml_vec_sum_bf16_ggf_amd_avx2(const int n, float * s, const ggm
extern "C" void ggml_vec_sum_bf16_ggf_amd_f16c(const int n, float * s, const ggml_bf16_t * x);
extern "C" void ggml_vec_sum_bf16_ggf_amd_fma(const int n, float * s, const ggml_bf16_t * x);
extern "C" void ggml_vec_sum_bf16_ggf_amd_avx(const int n, float * s, const ggml_bf16_t * x);
+extern "C" void ggml_vec_sum_bf16_ggf_amd_ssse3(const int n, float * s, const ggml_bf16_t * x);
+extern "C" void ggml_vec_sum_bf16_ggf_amd_k8(const int n, float * s, const ggml_bf16_t * x);
extern "C" void ggml_vec_sum_bf16_ggf_arm82(const int n, float * s, const ggml_bf16_t * x);
extern "C" void ggml_vec_sum_bf16_ggf_arm80(const int n, float * s, const ggml_bf16_t * x);
@@ -459,6 +559,8 @@ extern "C" void ggml_vec_max_f32_amd_avx2(const int n, float * s, const float *
extern "C" void ggml_vec_max_f32_amd_f16c(const int n, float * s, const float * x);
extern "C" void ggml_vec_max_f32_amd_fma(const int n, float * s, const float * x);
extern "C" void ggml_vec_max_f32_amd_avx(const int n, float * s, const float * x);
+extern "C" void ggml_vec_max_f32_amd_ssse3(const int n, float * s, const float * x);
+extern "C" void ggml_vec_max_f32_amd_k8(const int n, float * s, const float * x);
extern "C" void ggml_vec_max_f32_arm82(const int n, float * s, const float * x);
extern "C" void ggml_vec_max_f32_arm80(const int n, float * s, const float * x);
@@ -468,6 +570,8 @@ extern "C" void ggml_vec_argmax_f32_amd_avx2(const int n, int * s, const float *
extern "C" void ggml_vec_argmax_f32_amd_f16c(const int n, int * s, const float * x);
extern "C" void ggml_vec_argmax_f32_amd_fma(const int n, int * s, const float * x);
extern "C" void ggml_vec_argmax_f32_amd_avx(const int n, int * s, const float * x);
+extern "C" void ggml_vec_argmax_f32_amd_ssse3(const int n, int * s, const float * x);
+extern "C" void ggml_vec_argmax_f32_amd_k8(const int n, int * s, const float * x);
extern "C" void ggml_vec_argmax_f32_arm82(const int n, int * s, const float * x);
extern "C" void ggml_vec_argmax_f32_arm80(const int n, int * s, const float * x);
@@ -477,6 +581,8 @@ extern "C" ggml_float ggml_vec_soft_max_f32_amd_avx2(const int n, float * y, con
extern "C" ggml_float ggml_vec_soft_max_f32_amd_f16c(const int n, float * y, const float * x, float max);
extern "C" ggml_float ggml_vec_soft_max_f32_amd_fma(const int n, float * y, const float * x, float max);
extern "C" ggml_float ggml_vec_soft_max_f32_amd_avx(const int n, float * y, const float * x, float max);
+extern "C" ggml_float ggml_vec_soft_max_f32_amd_ssse3(const int n, float * y, const float * x, float max);
+extern "C" ggml_float ggml_vec_soft_max_f32_amd_k8(const int n, float * y, const float * x, float max);
extern "C" ggml_float ggml_vec_soft_max_f32_arm82(const int n, float * y, const float * x, float max);
extern "C" ggml_float ggml_vec_soft_max_f32_arm80(const int n, float * y, const float * x, float max);
@@ -486,6 +592,8 @@ extern "C" void ggml_vec_norm_inv_f32_amd_avx2(const int n, float * s, const flo
extern "C" void ggml_vec_norm_inv_f32_amd_f16c(const int n, float * s, const float * x);
extern "C" void ggml_vec_norm_inv_f32_amd_fma(const int n, float * s, const float * x);
extern "C" void ggml_vec_norm_inv_f32_amd_avx(const int n, float * s, const float * x);
+extern "C" void ggml_vec_norm_inv_f32_amd_ssse3(const int n, float * s, const float * x);
+extern "C" void ggml_vec_norm_inv_f32_amd_k8(const int n, float * s, const float * x);
extern "C" void ggml_vec_norm_inv_f32_arm82(const int n, float * s, const float * x);
extern "C" void ggml_vec_norm_inv_f32_arm80(const int n, float * s, const float * x);
@@ -495,6 +603,8 @@ extern "C" void ggml_vec_sigmoid_f32_amd_avx2 (const int n, float * y, const flo
extern "C" void ggml_vec_sigmoid_f32_amd_f16c (const int n, float * y, const float * x);
extern "C" void ggml_vec_sigmoid_f32_amd_fma (const int n, float * y, const float * x);
extern "C" void ggml_vec_sigmoid_f32_amd_avx (const int n, float * y, const float * x);
+extern "C" void ggml_vec_sigmoid_f32_amd_ssse3 (const int n, float * y, const float * x);
+extern "C" void ggml_vec_sigmoid_f32_amd_k8 (const int n, float * y, const float * x);
extern "C" void ggml_vec_sigmoid_f32_arm82 (const int n, float * y, const float * x);
extern "C" void ggml_vec_sigmoid_f32_arm80 (const int n, float * y, const float * x);
@@ -737,7 +847,7 @@ static const struct VectorFuncs {
}
#endif
#ifdef __x86_64__
- if (X86_HAVE(F16C)) {
+ if (X86_HAVE(AVX) && X86_HAVE(F16C)) {
ptr_ggml_fp16_to_fp32_row = ggml_fp16_to_fp32_row_amd_f16c;
ptr_ggml_fp32_to_fp16_row = ggml_fp32_to_fp16_row_amd_f16c;
ptr_ggml_bf16_to_fp32_row = ggml_bf16_to_fp32_row_amd_f16c;
@@ -797,7 +907,7 @@ static const struct VectorFuncs {
}
#endif
#ifdef __x86_64__
- if (X86_HAVE(FMA)) {
+ if (X86_HAVE(AVX) && X86_HAVE(FMA)) {
ptr_ggml_fp16_to_fp32_row = ggml_fp16_to_fp32_row_amd_fma;
ptr_ggml_fp32_to_fp16_row = ggml_fp32_to_fp16_row_amd_fma;
ptr_ggml_bf16_to_fp32_row = ggml_bf16_to_fp32_row_amd_fma;
@@ -857,7 +967,7 @@ static const struct VectorFuncs {
}
#endif
#ifdef __x86_64__
- if (1) {
+ if (X86_HAVE(AVX)) {
ptr_ggml_fp16_to_fp32_row = ggml_fp16_to_fp32_row_amd_avx;
ptr_ggml_fp32_to_fp16_row = ggml_fp32_to_fp16_row_amd_avx;
ptr_ggml_bf16_to_fp32_row = ggml_bf16_to_fp32_row_amd_avx;
@@ -916,6 +1026,126 @@ static const struct VectorFuncs {
return;
}
#endif
+#ifdef __x86_64__
+ if (X86_HAVE(SSSE3)) {
+ ptr_ggml_fp16_to_fp32_row = ggml_fp16_to_fp32_row_amd_ssse3;
+ ptr_ggml_fp32_to_fp16_row = ggml_fp32_to_fp16_row_amd_ssse3;
+ ptr_ggml_bf16_to_fp32_row = ggml_bf16_to_fp32_row_amd_ssse3;
+ ptr_ggml_fp32_to_bf16_row = ggml_fp32_to_bf16_row_amd_ssse3;
+ ptr_ggml_vec_dot_f32 = ggml_vec_dot_f32_amd_ssse3;
+ ptr_ggml_vec_dot_f16 = ggml_vec_dot_f16_amd_ssse3;
+ ptr_ggml_vec_dot_bf16 = ggml_vec_dot_bf16_amd_ssse3;
+ ptr_ggml_vec_dot_f16_unroll = ggml_vec_dot_f16_unroll_amd_ssse3;
+ ptr_ggml_vec_mad_f32_unroll = ggml_vec_mad_f32_unroll_amd_ssse3;
+ ptr_ggml_vec_set_i8 = ggml_vec_set_i8_amd_ssse3;
+ ptr_ggml_vec_set_i16 = ggml_vec_set_i16_amd_ssse3;
+ ptr_ggml_vec_set_i32 = ggml_vec_set_i32_amd_ssse3;
+ ptr_ggml_vec_set_f16 = ggml_vec_set_f16_amd_ssse3;
+ ptr_ggml_vec_set_bf16 = ggml_vec_set_bf16_amd_ssse3;
+ ptr_ggml_vec_add_f32 = ggml_vec_add_f32_amd_ssse3;
+ ptr_ggml_vec_add1_f32 = ggml_vec_add1_f32_amd_ssse3;
+ ptr_ggml_vec_acc_f32 = ggml_vec_acc_f32_amd_ssse3;
+ ptr_ggml_vec_acc1_f32 = ggml_vec_acc1_f32_amd_ssse3;
+ ptr_ggml_vec_sub_f32 = ggml_vec_sub_f32_amd_ssse3;
+ ptr_ggml_vec_set_f32 = ggml_vec_set_f32_amd_ssse3;
+ ptr_ggml_vec_cpy_f32 = ggml_vec_cpy_f32_amd_ssse3;
+ ptr_ggml_vec_neg_f32 = ggml_vec_neg_f32_amd_ssse3;
+ ptr_ggml_vec_mul_f32 = ggml_vec_mul_f32_amd_ssse3;
+ ptr_ggml_vec_div_f32 = ggml_vec_div_f32_amd_ssse3;
+ ptr_ggml_vec_scale_f32 = ggml_vec_scale_f32_amd_ssse3;
+ ptr_ggml_vec_scale_f16 = ggml_vec_scale_f16_amd_ssse3;
+ ptr_ggml_vec_mad_f32 = ggml_vec_mad_f32_amd_ssse3;
+ ptr_ggml_vec_mad_f16 = ggml_vec_mad_f16_amd_ssse3;
+ ptr_ggml_vec_norm_f32 = ggml_vec_norm_f32_amd_ssse3;
+ ptr_ggml_vec_sqr_f32 = ggml_vec_sqr_f32_amd_ssse3;
+ ptr_ggml_vec_sqrt_f32 = ggml_vec_sqrt_f32_amd_ssse3;
+ ptr_ggml_vec_log_f32 = ggml_vec_log_f32_amd_ssse3;
+ ptr_ggml_vec_abs_f32 = ggml_vec_abs_f32_amd_ssse3;
+ ptr_ggml_vec_sgn_f32 = ggml_vec_sgn_f32_amd_ssse3;
+ ptr_ggml_vec_step_f32 = ggml_vec_step_f32_amd_ssse3;
+ ptr_ggml_vec_tanh_f32 = ggml_vec_tanh_f32_amd_ssse3;
+ ptr_ggml_vec_elu_f32 = ggml_vec_elu_f32_amd_ssse3;
+ ptr_ggml_vec_relu_f32 = ggml_vec_relu_f32_amd_ssse3;
+ ptr_ggml_vec_leaky_relu_f32 = ggml_vec_leaky_relu_f32_amd_ssse3;
+ ptr_ggml_vec_hardswish_f32 = ggml_vec_hardswish_f32_amd_ssse3;
+ ptr_ggml_vec_hardsigmoid_f32 = ggml_vec_hardsigmoid_f32_amd_ssse3;
+ ptr_ggml_vec_gelu_f32 = ggml_vec_gelu_f32_amd_ssse3;
+ ptr_ggml_vec_gelu_quick_f32 = ggml_vec_gelu_quick_f32_amd_ssse3;
+ ptr_ggml_vec_silu_f32 = ggml_vec_silu_f32_amd_ssse3;
+ ptr_ggml_silu_backward_f32 = ggml_silu_backward_f32_amd_ssse3;
+ ptr_ggml_vec_silu_backward_f32 = ggml_vec_silu_backward_f32_amd_ssse3;
+ ptr_ggml_vec_sum_f32 = ggml_vec_sum_f32_amd_ssse3;
+ ptr_ggml_vec_sum_f32_ggf = ggml_vec_sum_f32_ggf_amd_ssse3;
+ ptr_ggml_vec_sum_f16_ggf = ggml_vec_sum_f16_ggf_amd_ssse3;
+ ptr_ggml_vec_sum_bf16_ggf = ggml_vec_sum_bf16_ggf_amd_ssse3;
+ ptr_ggml_vec_max_f32 = ggml_vec_max_f32_amd_ssse3;
+ ptr_ggml_vec_argmax_f32 = ggml_vec_argmax_f32_amd_ssse3;
+ ptr_ggml_vec_soft_max_f32 = ggml_vec_soft_max_f32_amd_ssse3;
+ ptr_ggml_vec_norm_inv_f32 = ggml_vec_norm_inv_f32_amd_ssse3;
+ ptr_ggml_vec_sigmoid_f32 = ggml_vec_sigmoid_f32_amd_ssse3;
+ return;
+ }
+#endif
+#ifdef __x86_64__
+ if (1) {
+ ptr_ggml_fp16_to_fp32_row = ggml_fp16_to_fp32_row_amd_k8;
+ ptr_ggml_fp32_to_fp16_row = ggml_fp32_to_fp16_row_amd_k8;
+ ptr_ggml_bf16_to_fp32_row = ggml_bf16_to_fp32_row_amd_k8;
+ ptr_ggml_fp32_to_bf16_row = ggml_fp32_to_bf16_row_amd_k8;
+ ptr_ggml_vec_dot_f32 = ggml_vec_dot_f32_amd_k8;
+ ptr_ggml_vec_dot_f16 = ggml_vec_dot_f16_amd_k8;
+ ptr_ggml_vec_dot_bf16 = ggml_vec_dot_bf16_amd_k8;
+ ptr_ggml_vec_dot_f16_unroll = ggml_vec_dot_f16_unroll_amd_k8;
+ ptr_ggml_vec_mad_f32_unroll = ggml_vec_mad_f32_unroll_amd_k8;
+ ptr_ggml_vec_set_i8 = ggml_vec_set_i8_amd_k8;
+ ptr_ggml_vec_set_i16 = ggml_vec_set_i16_amd_k8;
+ ptr_ggml_vec_set_i32 = ggml_vec_set_i32_amd_k8;
+ ptr_ggml_vec_set_f16 = ggml_vec_set_f16_amd_k8;
+ ptr_ggml_vec_set_bf16 = ggml_vec_set_bf16_amd_k8;
+ ptr_ggml_vec_add_f32 = ggml_vec_add_f32_amd_k8;
+ ptr_ggml_vec_add1_f32 = ggml_vec_add1_f32_amd_k8;
+ ptr_ggml_vec_acc_f32 = ggml_vec_acc_f32_amd_k8;
+ ptr_ggml_vec_acc1_f32 = ggml_vec_acc1_f32_amd_k8;
+ ptr_ggml_vec_sub_f32 = ggml_vec_sub_f32_amd_k8;
+ ptr_ggml_vec_set_f32 = ggml_vec_set_f32_amd_k8;
+ ptr_ggml_vec_cpy_f32 = ggml_vec_cpy_f32_amd_k8;
+ ptr_ggml_vec_neg_f32 = ggml_vec_neg_f32_amd_k8;
+ ptr_ggml_vec_mul_f32 = ggml_vec_mul_f32_amd_k8;
+ ptr_ggml_vec_div_f32 = ggml_vec_div_f32_amd_k8;
+ ptr_ggml_vec_scale_f32 = ggml_vec_scale_f32_amd_k8;
+ ptr_ggml_vec_scale_f16 = ggml_vec_scale_f16_amd_k8;
+ ptr_ggml_vec_mad_f32 = ggml_vec_mad_f32_amd_k8;
+ ptr_ggml_vec_mad_f16 = ggml_vec_mad_f16_amd_k8;
+ ptr_ggml_vec_norm_f32 = ggml_vec_norm_f32_amd_k8;
+ ptr_ggml_vec_sqr_f32 = ggml_vec_sqr_f32_amd_k8;
+ ptr_ggml_vec_sqrt_f32 = ggml_vec_sqrt_f32_amd_k8;
+ ptr_ggml_vec_log_f32 = ggml_vec_log_f32_amd_k8;
+ ptr_ggml_vec_abs_f32 = ggml_vec_abs_f32_amd_k8;
+ ptr_ggml_vec_sgn_f32 = ggml_vec_sgn_f32_amd_k8;
+ ptr_ggml_vec_step_f32 = ggml_vec_step_f32_amd_k8;
+ ptr_ggml_vec_tanh_f32 = ggml_vec_tanh_f32_amd_k8;
+ ptr_ggml_vec_elu_f32 = ggml_vec_elu_f32_amd_k8;
+ ptr_ggml_vec_relu_f32 = ggml_vec_relu_f32_amd_k8;
+ ptr_ggml_vec_leaky_relu_f32 = ggml_vec_leaky_relu_f32_amd_k8;
+ ptr_ggml_vec_hardswish_f32 = ggml_vec_hardswish_f32_amd_k8;
+ ptr_ggml_vec_hardsigmoid_f32 = ggml_vec_hardsigmoid_f32_amd_k8;
+ ptr_ggml_vec_gelu_f32 = ggml_vec_gelu_f32_amd_k8;
+ ptr_ggml_vec_gelu_quick_f32 = ggml_vec_gelu_quick_f32_amd_k8;
+ ptr_ggml_vec_silu_f32 = ggml_vec_silu_f32_amd_k8;
+ ptr_ggml_silu_backward_f32 = ggml_silu_backward_f32_amd_k8;
+ ptr_ggml_vec_silu_backward_f32 = ggml_vec_silu_backward_f32_amd_k8;
+ ptr_ggml_vec_sum_f32 = ggml_vec_sum_f32_amd_k8;
+ ptr_ggml_vec_sum_f32_ggf = ggml_vec_sum_f32_ggf_amd_k8;
+ ptr_ggml_vec_sum_f16_ggf = ggml_vec_sum_f16_ggf_amd_k8;
+ ptr_ggml_vec_sum_bf16_ggf = ggml_vec_sum_bf16_ggf_amd_k8;
+ ptr_ggml_vec_max_f32 = ggml_vec_max_f32_amd_k8;
+ ptr_ggml_vec_argmax_f32 = ggml_vec_argmax_f32_amd_k8;
+ ptr_ggml_vec_soft_max_f32 = ggml_vec_soft_max_f32_amd_k8;
+ ptr_ggml_vec_norm_inv_f32 = ggml_vec_norm_inv_f32_amd_k8;
+ ptr_ggml_vec_sigmoid_f32 = ggml_vec_sigmoid_f32_amd_k8;
+ return;
+ }
+#endif
#ifdef __aarch64__
if ((getauxval(AT_HWCAP) & HWCAP_FPHP) && (getauxval(AT_HWCAP) & HWCAP_ASIMDHP)) {
ptr_ggml_fp16_to_fp32_row = ggml_fp16_to_fp32_row_arm82;
diff --git a/llama.cpp/ggml-vector.inc b/llama.cpp/ggml-vector.inc
index 3bf68b48..ef87bd4e 100644
--- a/llama.cpp/ggml-vector.inc
+++ b/llama.cpp/ggml-vector.inc
@@ -589,7 +589,7 @@ static inline void __sse_f16x4_store(ggml_fp16_t *x, __m128 y) {
#define GGML_F32Cx4 __m128
#define GGML_F32Cx4_ZERO _mm_setzero_ps()
#define GGML_F32Cx4_SET1(x) _mm_set1_ps(x)
-#define GGML_F32Cx4_LOAD(x) __sse_f16x4_load(x)
+#define GGML_F32Cx4_LOAD(x) __sse_f16x4_load((void *)(x))
#define GGML_F32Cx4_STORE(x, y) __sse_f16x4_store(x, y)
#define GGML_F32Cx4_FMA GGML_F32x4_FMA
#define GGML_F32Cx4_ADD _mm_add_ps
diff --git a/llama.cpp/ggml-vector.py b/llama.cpp/ggml-vector.py
index 31f20426..dc77e815 100644
--- a/llama.cpp/ggml-vector.py
+++ b/llama.cpp/ggml-vector.py
@@ -15,9 +15,11 @@ ARCHS = (
('amd_avx512bf16', '__x86_64__', ('X86_HAVE(FMA)', 'X86_HAVE(F16C)', 'X86_HAVE(AVX2)', 'X86_HAVE(AVX512F)', 'X86_HAVE(AVX512VL)', 'X86_HAVE(AVX512_BF16)')),
('amd_avx512', '__x86_64__', ('X86_HAVE(FMA)', 'X86_HAVE(F16C)', 'X86_HAVE(AVX2)', 'X86_HAVE(AVX512F)')),
('amd_avx2', '__x86_64__', ('X86_HAVE(FMA)', 'X86_HAVE(F16C)', 'X86_HAVE(AVX2)')),
- ('amd_f16c', '__x86_64__', ('X86_HAVE(F16C)',)),
- ('amd_fma', '__x86_64__', ('X86_HAVE(FMA)',)),
- ('amd_avx', '__x86_64__', ()),
+ ('amd_f16c', '__x86_64__', ('X86_HAVE(AVX)', 'X86_HAVE(F16C)')),
+ ('amd_fma', '__x86_64__', ('X86_HAVE(AVX)', 'X86_HAVE(FMA)')),
+ ('amd_avx', '__x86_64__', ('X86_HAVE(AVX)',)),
+ ('amd_ssse3', '__x86_64__', ('X86_HAVE(SSSE3)',)),
+ ('amd_k8', '__x86_64__', ()),
('arm82', '__aarch64__', ('(getauxval(AT_HWCAP) & HWCAP_FPHP)', '(getauxval(AT_HWCAP) & HWCAP_ASIMDHP)')),
('arm80', '__aarch64__', ()),
)
diff --git a/llamafile/BUILD.mk b/llamafile/BUILD.mk
index 5a946d45..0be2be02 100644
--- a/llamafile/BUILD.mk
+++ b/llamafile/BUILD.mk
@@ -94,21 +94,21 @@ o/$(MODE)/llamafile: \
# - HWCAP_ASIMDDP +dotprod (e.g. m1, rpi5) __ARM_FEATURE_DOTPROD
#
-o/$(MODE)/llamafile/iqk_mul_mat_amd_avx2.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mavx2 -Xx86_64-mfma -Xx86_64-mf16c
-o/$(MODE)/llamafile/iqk_mul_mat_amd_zen4.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mavx2 -Xx86_64-mfma -Xx86_64-mf16c -Xx86_64-mavx512f -Xx86_64-mavx512vl -Xx86_64-mavx512vnni -Xx86_64-mavx512bw -Xx86_64-mavx512dq
+o/$(MODE)/llamafile/iqk_mul_mat_amd_avx2.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mavx -Xx86_64-mavx2 -Xx86_64-mfma -Xx86_64-mf16c
+o/$(MODE)/llamafile/iqk_mul_mat_amd_zen4.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mavx -Xx86_64-mavx2 -Xx86_64-mfma -Xx86_64-mf16c -Xx86_64-mavx512f -Xx86_64-mavx512vl -Xx86_64-mavx512vnni -Xx86_64-mavx512bw -Xx86_64-mavx512dq
o/$(MODE)/llamafile/iqk_mul_mat_arm82.o: private TARGET_ARCH += -Xaarch64-march=armv8.2-a+dotprod+fp16
-o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_avx.o: private TARGET_ARCH += -Xx86_64-mtune=sandybridge -Xx86_64-mf16c
-o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_avx.o: private TARGET_ARCH += -Xx86_64-mtune=sandybridge -Xx86_64-mf16c
-o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_fma.o: private TARGET_ARCH += -Xx86_64-mtune=bdver2 -Xx86_64-mf16c -Xx86_64-mfma
-o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_fma.o: private TARGET_ARCH += -Xx86_64-mtune=bdver2 -Xx86_64-mf16c -Xx86_64-mfma
-o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_avx2.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mfma
-o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_avx2.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mfma
-o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_avxvnni.o: private TARGET_ARCH += -Xx86_64-mtune=alderlake -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavxvnni
-o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_avxvnni.o: private TARGET_ARCH += -Xx86_64-mtune=alderlake -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavxvnni
-o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_avx512f.o: private TARGET_ARCH += -Xx86_64-mtune=cannonlake -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f
-o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_avx512f.o: private TARGET_ARCH += -Xx86_64-mtune=cannonlake -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f
-o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_zen4.o: private TARGET_ARCH += -Xx86_64-mtune=znver4 -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f -Xx86_64-mavx512vl -Xx86_64-mavx512vnni -Xx86_64-mavx512bf16
-o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_zen4.o: private TARGET_ARCH += -Xx86_64-mtune=znver4 -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f -Xx86_64-mavx512vl -Xx86_64-mavx512vnni -Xx86_64-mavx512bf16
+o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_avx.o: private TARGET_ARCH += -Xx86_64-mtune=sandybridge -Xx86_64-mavx -Xx86_64-mf16c
+o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_avx.o: private TARGET_ARCH += -Xx86_64-mtune=sandybridge -Xx86_64-mavx -Xx86_64-mf16c
+o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_fma.o: private TARGET_ARCH += -Xx86_64-mtune=bdver2 -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma
+o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_fma.o: private TARGET_ARCH += -Xx86_64-mtune=bdver2 -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma
+o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_avx2.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mfma
+o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_avx2.o: private TARGET_ARCH += -Xx86_64-mtune=skylake -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mfma
+o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_avxvnni.o: private TARGET_ARCH += -Xx86_64-mtune=alderlake -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavxvnni
+o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_avxvnni.o: private TARGET_ARCH += -Xx86_64-mtune=alderlake -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavxvnni
+o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_avx512f.o: private TARGET_ARCH += -Xx86_64-mtune=cannonlake -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f
+o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_avx512f.o: private TARGET_ARCH += -Xx86_64-mtune=cannonlake -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f
+o/$(MODE)/llamafile/tinyblas_cpu_sgemm_amd_zen4.o: private TARGET_ARCH += -Xx86_64-mtune=znver4 -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f -Xx86_64-mavx512vl -Xx86_64-mavx512vnni -Xx86_64-mavx512bf16
+o/$(MODE)/llamafile/tinyblas_cpu_mixmul_amd_zen4.o: private TARGET_ARCH += -Xx86_64-mtune=znver4 -Xx86_64-mavx -Xx86_64-mf16c -Xx86_64-mfma -Xx86_64-mavx2 -Xx86_64-mavx512f -Xx86_64-mavx512vl -Xx86_64-mavx512vnni -Xx86_64-mavx512bf16
o/$(MODE)/llamafile/tinyblas_cpu_sgemm_arm82.o: private TARGET_ARCH += -Xaarch64-march=armv8.2-a+dotprod+fp16
o/$(MODE)/llamafile/tinyblas_cpu_mixmul_arm82.o: private TARGET_ARCH += -Xaarch64-march=armv8.2-a+dotprod+fp16