summaryrefslogtreecommitdiff
path: root/k_quants.c
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-10-04 15:29:58 +0300
committerGitHub <noreply@github.com>2023-10-04 15:29:58 +0300
commitf93af02488179b9c52d0d391b08ae4c4d891b8d3 (patch)
treef5dec5ce7e832e4c5a6d40bb76ef9865e27488ac /k_quants.c
parentf72f8f22c9cb60465b2e79df2767e4ba9604e576 (diff)
sync : ggml (conv 1d + 2d updates, UB fixes) (#3468)
* sync : ggml (conv 1d + 2d updates) ggml-ci * ggml : fix UB in q5_0 and q5_1 quantize code ggml.c:1033:39: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ggml.c:1081:39: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ggml-ci * tests : fix UB in test-quantize-perf
Diffstat (limited to 'k_quants.c')
-rw-r--r--k_quants.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/k_quants.c b/k_quants.c
index a1e687dd..558f5fda 100644
--- a/k_quants.c
+++ b/k_quants.c
@@ -69,7 +69,6 @@ inline static int32_t vaddvq_s32(int32x4_t v) {
// 2-6 bit quantization in super-blocks
//
-
//
// ===================== Helper functions
//
@@ -348,7 +347,6 @@ void quantize_row_q2_K_reference(const float * restrict x, block_q2_K * restrict
const float q4scale = 15.f;
for (int i = 0; i < nb; i++) {
-
float max_scale = 0; // as we are deducting the min, scales are always positive
float max_min = 0;
for (int j = 0; j < QK_K/16; ++j) {