Skip to content

Commit 74fac92

Browse files
committed
[GAP9] fix profileTiling: add CycleCounter.h to include lists and cmake
profileTiling generates code calling getCycles() in Network.c but the header declaring it was not included. Add CycleCounter.h to both GAP9 and NE16 platform include lists, and expose the GAP9 inc/ directory to the network target so the header is found at compile time.
1 parent e6355a9 commit 74fac92

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

Deeploy/Targets/GAP9/Platform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ class GAP9StructBuffer(StructBuffer):
285285

286286
_includeList = [
287287
"pmsis.h", "DeeployGAP9Math.h", "pulp_nn_kernels.h", "DeeployMchan.h", "CNN_BasicKernels_fp32.h",
288-
"CNN_BasicKernels_NE16.h", "CNN_Copy.h", "ne16_utils.h"
288+
"CNN_BasicKernels_NE16.h", "CNN_Copy.h", "ne16_utils.h", "CycleCounter.h"
289289
]
290290

291291

Deeploy/Targets/NE16/Platform.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def __init__(self,
3535
cluster = GAP9ClusterEngine(
3636
"GAP9Cluster",
3737
includeList = [
38-
"pmsis.h", "DeeployGAP9Math.h", "pulp_nn_kernels.h", "DeeployMchan.h", "CNN_BasicKernels_fp32.h"
38+
"pmsis.h", "DeeployGAP9Math.h", "pulp_nn_kernels.h", "DeeployMchan.h", "CNN_BasicKernels_fp32.h",
39+
"CycleCounter.h"
3940
],
4041
)
4142
engines = [NE16Engine("NE16"), cluster]
@@ -61,7 +62,8 @@ def __init__(self,
6162
cluster = GAP9ClusterEngine(
6263
"GAP9Cluster",
6364
includeList = [
64-
"pmsis.h", "DeeployGAP9Math.h", "pulp_nn_kernels.h", "DeeployMchan.h", "CNN_BasicKernels_fp32.h"
65+
"pmsis.h", "DeeployGAP9Math.h", "pulp_nn_kernels.h", "DeeployMchan.h", "CNN_BasicKernels_fp32.h",
66+
"CycleCounter.h"
6567
],
6668
)
6769
engines = [NE16Engine("NE16"), cluster]

DeeployTest/Platforms/GAP9/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ add_deeploy_executable(${ProjectId} EXCLUDE_FROM_ALL ${SOURCES})
1717
# add_executable(${ProjectId} ${SOURCES})
1818
target_include_directories(${ProjectId} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/inc)
1919

20+
# Network.c needs CycleCounter.h when --profileTiling is enabled
21+
target_include_directories(network PRIVATE ${CMAKE_CURRENT_LIST_DIR}/inc)
22+
2023
target_link_libraries(${ProjectId} PRIVATE network deeploylib)
2124
target_compile_options(${ProjectId} INTERFACE network)
2225
add_gvsoc_emulation(${ProjectId} "gap9.evk")

0 commit comments

Comments
 (0)