summaryrefslogtreecommitdiff
path: root/ggml/src/ggml-common.h
diff options
context:
space:
mode:
authorKawrakow <iwankawrakow@gmail.com>2024-12-20 09:12:48 +0100
committerGitHub <noreply@github.com>2024-12-20 09:12:48 +0100
commitf4170f78bdfe69050c60bf3b51370d6c97593489 (patch)
tree99f68c0b9eeeeba657d80b6c5247d7efee8c840f /ggml/src/ggml-common.h
parentdfa12b7f91b9d71bc11f5042151bde949da04d61 (diff)
IQ3_XXS_R4 (#153)
* iq3_xxs_r4: 1st shot on Zen4 PP-512: 107 t/s -> 137 t/s TG-128(1 thread): 2.64 t/s -> 3.44 t/s * iq4_xxs_r4: WIP * iq4_xxs_r4: 1st shot at AVX2 Note: there is a bug in the AVX2 implementation for nrc_y = 1 for IQ quants with blocks of 32. I have fixed it for now by using the nrc_y > 1 implementation (which works) also for nrc_y = 1. * iq3_xxs_r4: NEON --------- Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Diffstat (limited to 'ggml/src/ggml-common.h')
-rw-r--r--ggml/src/ggml-common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ggml/src/ggml-common.h b/ggml/src/ggml-common.h
index 6e87dbaa..b9da9771 100644
--- a/ggml/src/ggml-common.h
+++ b/ggml/src/ggml-common.h
@@ -423,6 +423,13 @@ typedef struct {
} block_iq3_xxs;
static_assert(sizeof(block_iq3_xxs) == sizeof(ggml_half) + 3*(QK_K/8), "wrong iq3_xxs block size/padding");
+typedef struct {
+ ggml_half d[4];
+ uint8_t sas[QK_K/2];
+ uint8_t qs[QK_K];
+} block_iq3_xxs_r4;
+static_assert(sizeof(block_iq3_xxs_r4) == 4*sizeof(block_iq3_xxs), "wrong iq3_xxs_r4 block size/padding");
+
// 3.4375 bpw
#define IQ3S_N_SCALE QK_K/64
typedef struct {