Skip to content

Commit cecf3af

Browse files
committed
apply more fixes based on code review
1 parent d1a9a5c commit cecf3af

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ggml/src/ggml-cpu/kleidiai/kernels.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#include "kai_common.h"
2424

25+
#include "simd-mappings.h"
26+
2527
#include "kernels.h"
2628

2729
#define NELEMS(x) sizeof(x) / sizeof(*x)
@@ -50,7 +52,7 @@ static void dequantize_row_qsi4c32pscalef16(
5052

5153
for (size_t b = 0; b < num_blocks; ++b) {
5254
uint16_t scale_f16 = *((const uint16_t *)(block_ptr + row_in_group * num_bytes_multiplier));
53-
float scale = ggml_fp16_to_fp32(scale_f16);
55+
float scale = GGML_CPU_FP16_TO_FP32(scale_f16);
5456

5557
const uint8_t *segment_ptr = block_ptr + nr_pack * num_bytes_multiplier;
5658
size_t num_segments = bl / kr;
@@ -94,7 +96,7 @@ static void dequantize_row_qsi4c32ps1s0scalef16(
9496

9597
for (size_t block_idx = 0; block_idx < num_blocks; ++block_idx) {
9698
uint16_t scale_f16 = scales[row_in_group + block_idx * nr];
97-
float scale = ggml_fp16_to_fp32(scale_f16);
99+
float scale = GGML_CPU_FP16_TO_FP32(scale_f16);
98100

99101
for (size_t bl4_idx = 0; bl4_idx < bl4; ++bl4_idx) {
100102
uint16_t q = qdata[(block_idx * bl4 + bl4_idx) * nr + row_in_group];

0 commit comments

Comments
 (0)