summaryrefslogtreecommitdiff
path: root/ggml/src/ggml-cuda/common.cuh
diff options
context:
space:
mode:
authorKawrakow <iwankawrakow@gmail.com>2025-06-05 08:31:20 +0300
committerGitHub <noreply@github.com>2025-06-05 08:31:20 +0300
commit8ffad187abbb93b74db8ef813b6fdceec80e02b0 (patch)
tree2c078dfcbe2dd36b46675651ae5d91abd41641f4 /ggml/src/ggml-cuda/common.cuh
parent0b10f7418f7315ef90e35da49e0c053b395fd528 (diff)
MMQ implementation for IQ4_KS_R4 and IQ5_KS_R4 (#493)
* MMQ for iq4_ks_r4 * MMQ for iq5_ks_r4 * Add forgotten file * Another forgotten file --------- Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Diffstat (limited to 'ggml/src/ggml-cuda/common.cuh')
-rw-r--r--ggml/src/ggml-cuda/common.cuh14
1 files changed, 14 insertions, 0 deletions
diff --git a/ggml/src/ggml-cuda/common.cuh b/ggml/src/ggml-cuda/common.cuh
index bc7fadb0..8f3d2a26 100644
--- a/ggml/src/ggml-cuda/common.cuh
+++ b/ggml/src/ggml-cuda/common.cuh
@@ -600,6 +600,13 @@ struct ggml_cuda_type_traits<GGML_TYPE_IQ4_KS> {
};
template<>
+struct ggml_cuda_type_traits<GGML_TYPE_IQ4_KS_R4> {
+ static constexpr int qk = QK_K;
+ static constexpr int qr = QR4_XS;
+ static constexpr int qi = QI4_XS;
+};
+
+template<>
struct ggml_cuda_type_traits<GGML_TYPE_IQ4_KSS> {
static constexpr int qk = QK_K;
static constexpr int qr = QR4_XS;
@@ -621,6 +628,13 @@ struct ggml_cuda_type_traits<GGML_TYPE_IQ5_KS> {
};
template<>
+struct ggml_cuda_type_traits<GGML_TYPE_IQ5_KS_R4> {
+ static constexpr int qk = QK_K;
+ static constexpr int qr = QR5_XS;
+ static constexpr int qi = QI5_XS;
+};
+
+template<>
struct ggml_cuda_type_traits<GGML_TYPE_IQ6_K> {
static constexpr int qk = QK_K;
static constexpr int qr = QR6_XS;