Skip to content

Commit a498838

Browse files
committed
fix compilation warning
1 parent 0bf49eb commit a498838

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llama-quant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ static void llama_model_quantize_impl(const std::string & fname_inp, const std::
586586
gguf_set_val_f32(ctx_out.get(), o.key, o.val_f64);
587587
} else if (o.tag == LLAMA_KV_OVERRIDE_TYPE_INT) {
588588
// Setting type to UINT32. See https://github.com/ggml-org/llama.cpp/pull/14182 for context
589-
gguf_set_val_u32(ctx_out.get(), o.key, (uint32_t)abs(o.val_i64));
589+
gguf_set_val_u32(ctx_out.get(), o.key, (uint32_t)std::abs(static_cast<int>(o.val_i64)));
590590
} else if (o.tag == LLAMA_KV_OVERRIDE_TYPE_BOOL) {
591591
gguf_set_val_bool(ctx_out.get(), o.key, o.val_bool);
592592
} else if (o.tag == LLAMA_KV_OVERRIDE_TYPE_STR) {

0 commit comments

Comments
 (0)