arm_nn_build_target_check.h
Fails the build when code planned for one ns-cmsis-nn build is compiled or linked for another (RFC #829).
Define the plan’s build, then include this header:
#define ARM_NN_EXPECT_ISA ARM_NN_ISA_MVE (an ARM_NN_ISA_* value)#define ARM_NN_EXPECT_AUTOVECTORIZE 0 (1 when planned with ARM_MATH_AUTOVECTORIZE)#define ARM_NN_EXPECT_SINGLE_ROUNDING 0 (1 when planned with CMSIS_NN_USE_SINGLE_ROUNDING)#define ARM_NN_EXPECT_TOOLCHAIN ARM_NN_TOOLCHAIN_ID_GCC#include "arm_nn_build_target_check.h"A compiler that builds anything else stops with an #error naming the difference. ARM_NN_LIBRARY_STAMP() reads the stamp a library of the planned build defines, so linking a library built for another target fails with an undefined reference to the planned stamp (such as arm_nn_build_mve_av0_sr0_gcc); call it once from code that is linked, such as the model’s init. ns_cmsis_nn_contracts.render_guard() writes this block for a plan.