diff options
author | Georgi Gerganov <ggerganov@gmail.com> | 2023-03-13 01:28:08 +0200 |
---|---|---|
committer | Georgi Gerganov <ggerganov@gmail.com> | 2023-03-13 01:28:08 +0200 |
commit | c80e2a8f2adeda202cbffe76ef800f134e51f03f (patch) | |
tree | ea5b831847a09c7542fc01554213f4dd5e4f109a | |
parent | 54a0e66ea0ed3248e6c95a070a2da0bf5c6d4817 (diff) |
Revert "10% performance boost on ARM"
This reverts commit 113a9e83ebc0f788f861394437087bf3ca0e019b.
There are some reports for illegal instruction.
Moved this stuff to vdotq_s32 branch until resolve
-rw-r--r-- | ggml.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -1360,22 +1360,6 @@ inline static void ggml_vec_dot_q4_0(const int n, float * restrict s, const void const int8x16_t v1_1hs = vsubq_s8(v1_1h, s8b); // dot product into int16x8_t -#if defined(__ARM_FEATURE_DOTPROD) - int32x4_t p_0 = vdotq_s32(vdupq_n_s32(0), v0_0ls, v1_0ls); - int32x4_t p_1 = vdotq_s32(vdupq_n_s32(0), v0_1ls, v1_1ls); - - p_0 = vdotq_s32(p_0, v0_0hs, v1_0hs); - p_1 = vdotq_s32(p_1, v0_1hs, v1_1hs); - - // scalar -#if defined(__ARM_FEATURE_QRDMX) - sum0 += d0_0*d1_0*vaddvq_s32(p_0); - sum1 += d0_1*d1_1*vaddvq_s32(p_1); -#else - sum0 += d0_0*d1_0*(vgetq_lane_s32(p_0, 0) + vgetq_lane_s32(p_0, 1) + vgetq_lane_s32(p_0, 2) + vgetq_lane_s32(p_0, 3)); - sum1 += d0_1*d1_1*(vgetq_lane_s32(p_1, 0) + vgetq_lane_s32(p_1, 1) + vgetq_lane_s32(p_1, 2) + vgetq_lane_s32(p_1, 3)); -#endif -#else const int16x8_t pl0l = vmull_s8(vget_low_s8 (v0_0ls), vget_low_s8 (v1_0ls)); const int16x8_t pl0h = vmull_s8(vget_high_s8(v0_0ls), vget_high_s8(v1_0ls)); @@ -1405,7 +1389,6 @@ inline static void ggml_vec_dot_q4_0(const int n, float * restrict s, const void sum0 += d0_0*d1_0*(vgetq_lane_s16(p_0, 0) + vgetq_lane_s16(p_0, 1) + vgetq_lane_s16(p_0, 2) + vgetq_lane_s16(p_0, 3) + vgetq_lane_s16(p_0, 4) + vgetq_lane_s16(p_0, 5) + vgetq_lane_s16(p_0, 6) + vgetq_lane_s16(p_0, 7)); sum1 += d0_1*d1_1*(vgetq_lane_s16(p_1, 0) + vgetq_lane_s16(p_1, 1) + vgetq_lane_s16(p_1, 2) + vgetq_lane_s16(p_1, 3) + vgetq_lane_s16(p_1, 4) + vgetq_lane_s16(p_1, 5) + vgetq_lane_s16(p_1, 6) + vgetq_lane_s16(p_1, 7)); #endif -#endif } sumf = sum0 + sum1; |