Skip to content

Commit 1547ea2

Browse files
committed
ggml-cpu: add nnpa macro check in ggml-impl
Signed-off-by: Aaron Teo <[email protected]>
1 parent f1b1d98 commit 1547ea2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ggml/src/ggml-impl.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,12 @@ GGML_API void ggml_aligned_free(void * ptr, size_t size);
463463
}
464464

465465
static inline float ggml_compute_fp16_to_fp32(ggml_fp16_t h) {
466+
#ifdef __NNPA__
467+
printf("%s: __NNPA__ is defined.\n");
468+
#else
469+
printf("%s: __NNPA__ is not defined.\n");
470+
#endif
471+
466472
const uint32_t w = (uint32_t) h << 16;
467473
const uint32_t sign = w & UINT32_C(0x80000000);
468474
const uint32_t two_w = w + w;

0 commit comments

Comments
 (0)