-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (45 loc) · 1.17 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.18)
project(pulp-nnx
VERSION 0.3.0
DESCRIPTION "Kernel library for PULP-based NN accelerators."
LANGUAGES C)
add_library(pulp-nnx STATIC)
target_sources(pulp-nnx PRIVATE util/pulp_nnx_util.c util/hwpe.c)
target_include_directories(pulp-nnx PUBLIC inc util)
option(USE_NE16 "Use the NE16 accelerator.")
option(USE_NEUREKA "Use the N-EUREKA accelerator.")
if (NOT ${USE_NE16} AND NOT ${USE_NEUREKA})
message(FATAL_ERROR "[PULP-NNX] No accelerator in use. Please set an appropriate USE_<acc> option.")
endif()
if (${USE_NE16})
message(STATUS "[PULP-NNX] Using the NE16 accelerator.")
target_sources(pulp-nnx
PRIVATE
ne16/bsp/ne16_pulp_bsp.c
ne16/hal/ne16.c
ne16/hal/ne16_task.c
src/pulp_nnx_ne16.c
)
target_include_directories(pulp-nnx
PUBLIC
ne16/bsp
ne16/hal
ne16/gvsoc
)
endif()
if (${USE_NEUREKA})
message(STATUS "[PULP-NNX] Using the N-EUREKA accelerator.")
target_sources(pulp-nnx
PRIVATE
neureka/bsp/neureka_siracusa_bsp.c
neureka/hal/neureka.c
neureka/hal/neureka_task.c
src/pulp_nnx_neureka.c
)
target_include_directories(pulp-nnx
PUBLIC
neureka/bsp
neureka/hal
neureka/gvsoc
)
endif()