diff --git a/ggml/src/ggml-cpu/ggml-cpu.c b/ggml/src/ggml-cpu/ggml-cpu.c index d12aa6cce0..1d9cb7574e 100644 --- a/ggml/src/ggml-cpu/ggml-cpu.c +++ b/ggml/src/ggml-cpu/ggml-cpu.c @@ -3142,18 +3142,6 @@ void ggml_cpu_fp32_to_fp16(const float * x, ggml_fp16_t * y, int64_t n) { _mm_storel_epi64((__m128i *)(y + i), y_vec); } #endif - -#if defined(__NNPA__) - for (; i + 7 < n; i += 8) { - float32x4_t v_xh = vec_xl(0, (const float *)(x + i + 0)); - float32x4_t v_xl = vec_xl(0, (const float *)(x + i + 4)); - uint16x8_t v_xd = vec_round_from_fp32(v_xh, v_xl, 0); - uint16x8_t v_xdi = vec_convert_to_fp16(v_xd, 0); - vec_xst(v_xdi, 0, (ggml_fp16_t *)(y + i)); - printf("breakpoint"); - } -#endif - for (; i < n; ++i) { y[i] = GGML_FP32_TO_FP16(x[i]); } diff --git a/ggml/src/ggml-cpu/simd-mappings.h b/ggml/src/ggml-cpu/simd-mappings.h index 80e31b8d4c..b6f8c26a02 100644 --- a/ggml/src/ggml-cpu/simd-mappings.h +++ b/ggml/src/ggml-cpu/simd-mappings.h @@ -1,7 +1,6 @@ #pragma once #include "ggml-cpu-impl.h" -#include // // simd mappings @@ -983,14 +982,6 @@ static inline float32x4_t __lzs_f16cx4_load(const ggml_fp16_t * x) { // TODO: check why this function is not being hit at all static inline void __lzs_f16cx4_store(ggml_fp16_t * x, float32x4_t v_y) { -#ifdef __NNPA__ - float32x4_t zero = vec_splats(0.0f); - uint16x8_t v_x = vec_round_from_fp32(v_y, zero, 0); - x[0] = vec_extract(v_x, 0); - x[1] = vec_extract(v_x, 1); - x[2] = vec_extract(v_x, 2); - x[3] = vec_extract(v_x, 3); -#else float arr[4]; // note: keep type-cast here to prevent compiler bugs @@ -1000,7 +991,6 @@ static inline void __lzs_f16cx4_store(ggml_fp16_t * x, float32x4_t v_y) { for (int i = 0; i < 4; i++) { x[i] = GGML_FP32_TO_FP16(arr[i]); } -#endif } #define GGML_F16_VEC GGML_F32x4