ggml-cpu: diagnose why __NNPA__ macro is not being defined

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
This commit is contained in:
Aaron Teo
2025-06-21 18:33:08 +08:00
parent 0e571dd3d8
commit 4ad6efa37b
2 changed files with 5 additions and 0 deletions

View File

@ -55,6 +55,10 @@ if (GGML_ALL_WARNINGS)
endif()
endif()
if (GGML_NNPA)
add_compile_definitions(__NNPA__)
endif()
if (GGML_LTO)
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT output)

View File

@ -467,6 +467,7 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
if (GGML_VXE)
message(STATUS "VX/VXE/VXE2 enabled")
list(APPEND ARCH_FLAGS -mvx -mzvector)
list(APPEND ARCH_DEFINITIONS GGML_NNPA __NNPA__)
endif()
if (GGML_NNPA)