From 1547ea230c6485c5c7f2ca9dd212b6189c579abd Mon Sep 17 00:00:00 2001 From: Aaron Teo Date: Sat, 21 Jun 2025 18:09:37 +0800 Subject: [PATCH] ggml-cpu: add nnpa macro check in ggml-impl Signed-off-by: Aaron Teo --- ggml/src/ggml-impl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ggml/src/ggml-impl.h b/ggml/src/ggml-impl.h index 4df0eeac7..19dcd0829 100644 --- a/ggml/src/ggml-impl.h +++ b/ggml/src/ggml-impl.h @@ -463,6 +463,12 @@ GGML_API void ggml_aligned_free(void * ptr, size_t size); } static inline float ggml_compute_fp16_to_fp32(ggml_fp16_t h) { + #ifdef __NNPA__ + printf("%s: __NNPA__ is defined.\n"); + #else + printf("%s: __NNPA__ is not defined.\n"); + #endif + const uint32_t w = (uint32_t) h << 16; const uint32_t sign = w & UINT32_C(0x80000000); const uint32_t two_w = w + w;