diff options
author | Iwan Kawrakow <iwan.kawrakow@gmail.com> | 2024-06-10 18:30:33 +0300 |
---|---|---|
committer | Iwan Kawrakow <iwan.kawrakow@gmail.com> | 2024-06-22 12:02:50 +0300 |
commit | 9593e163db41f60b8d6598a443fec1740e97eb67 (patch) | |
tree | dd55925e2b5fc0960d77c5f8cc2c4d402118d9d0 /ggml-quants.c | |
parent | 81cf6990f512e82c2c89ba7f89a15c3d98172f84 (diff) |
iqk_mul_mat: add ability to disable it
Diffstat (limited to 'ggml-quants.c')
-rw-r--r-- | ggml-quants.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/ggml-quants.c b/ggml-quants.c index 061edddc..684fdf7d 100644 --- a/ggml-quants.c +++ b/ggml-quants.c @@ -872,7 +872,11 @@ void quantize_row_q8_0(const float * restrict x, void * restrict vy, int64_t k) #if defined(__ARM_NEON) block_q8_0_x4 * y4 = (block_q8_0_x4 *)vy; - int nb4 = 4*(nb/4); +#if GGML_USE_IQK_MULMAT + const int nb4 = 4*(nb/4); +#else + const int nb4 = -1; +#endif for (int i = 0; i < nb; i++) { int i4 = i/4, ir = i%4; float32x4_t srcv [8]; @@ -1220,9 +1224,13 @@ void quantize_row_q8_1(const float * restrict x, void * restrict vy, int64_t k) block_q8_1 * restrict y = vy; +#if GGML_USE_IQK_MULMAT + const int nb4 = 4*(nb/4); +#else + const int nb4 = -1; +#endif #if defined(__ARM_NEON) block_q8_1_x4 * restrict y4 = vy; - int nb4 = 4*(nb/4); for (int i = 0; i < nb; i++) { int i4 = i/4, ir = i%4; float32x4_t srcv [8]; @@ -1319,7 +1327,6 @@ void quantize_row_q8_1(const float * restrict x, void * restrict vy, int64_t k) } #elif defined(__AVX2__) || defined(__AVX__) block_q8_1_x4 * restrict y4 = vy; - int nb4 = 4*(nb/4); #ifdef __AVX2__ const bool pack = true; #else |