From bf21d0cbc471d0b076c74d7c904fd9abd3784a72 Mon Sep 17 00:00:00 2001 From: Luka Macan Date: Sun, 14 Jan 2024 19:52:28 +0100 Subject: [PATCH] wip: add neureka support to test app --- test/app/Makefile | 7 ++++++- test/app/src/nnx_layer.c | 11 ++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/test/app/Makefile b/test/app/Makefile index 14f30fd..493c092 100644 --- a/test/app/Makefile +++ b/test/app/Makefile @@ -40,6 +40,8 @@ INC_DIRS += $(ACC_DIR)/hal $(ACC_DIR)/gvsoc $(ACC_DIR)/bsp INC_DIRS += gen/inc INC_FLAGS += $(addprefix -I,$(INC_DIRS)) +APP_CFLAGS += $(INC_FLAGS) + # Source files @@ -58,7 +60,10 @@ APP_SRCS += $(wildcard gen/src/*.c) # Flags -APP_CFLAGS += $(INC_FLAGS) -O2 -w -Wall -Werror -flto +ACCELERATOR_UPPERCASE := $(shell echo $(ACCELERATOR) | tr [:lower:] [:upper:]) +APP_CFLAGS += -DNNX_ACCELERATOR=$(ACCELERATOR) -DNNX_$(ACCELERATOR_UPPERCASE) + +APP_CFLAGS += -O2 -w -Wall -Werror -flto APP_LDFLAGS += -flto include $(RULES_DIR)/pmsis_rules.mk diff --git a/test/app/src/nnx_layer.c b/test/app/src/nnx_layer.c index ffd93a1..45ce8ad 100644 --- a/test/app/src/nnx_layer.c +++ b/test/app/src/nnx_layer.c @@ -19,12 +19,21 @@ */ #include "nnx_layer.h" +#include + +#ifdef NNX_NE16 #include "ne16.h" #include "ne16_gvsoc.h" #include "ne16_pulp_bsp.h" #include "ne16_task.h" #include "pulp_nnx_ne16.h" -#include +#elif defined NNX_NEUREKA +#include "neureka.h" +#include "neureka_gvsoc.h" +#include "neureka_pulp_bsp.h" +#include "neureka_task.h" +#include "pulp_nnx_neureka.h" +#endif // Generated headers #include "bias.h"