Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolaLancellotti committed Dec 23, 2022
1 parent 2801bb5 commit bdc555b
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions apps/microtvm/cmsisnn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PKG_CFLAGS = ${PKG_COMPILE_OPTS} \
-I${CORSTONE_300_PATH} \
-I${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Include/ \
-I${CMSIS_PATH}/CMSIS/Core/Include \
-I${CMSIS_PATH}/NN/Include \
-I${CMSIS_PATH}/CMSIS-NN/Include \
-I${CMSIS_PATH}/CMSIS/DSP/Include \
-I$(abspath $(BUILD_DIR))/codegen/host/include
CMSIS_NN_CMAKE_FLAGS = -DCMAKE_TOOLCHAIN_FILE=$(abspath $(BUILD_DIR))/../arm-none-eabi-gcc.cmake \
Expand All @@ -56,7 +56,7 @@ DEMO_MAIN = src/demo_bare_metal.c
CODEGEN_SRCS = $(wildcard $(abspath $(BUILD_DIR))/codegen/host/src/*.c)
CODEGEN_OBJS = $(subst .c,.o,$(CODEGEN_SRCS))
CMSIS_STARTUP_SRCS = $(wildcard ${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Source/*.c)
CMSIS_NN_SRCS = $(shell find ${CMSIS_PATH}/NN/Source/*/*.c)
CMSIS_NN_SRCS = $(shell find ${CMSIS_PATH}/CMSIS-NN/Source/*/*.c)
UART_SRCS = $(wildcard ${CORSTONE_300_PATH}/*.c)

demo: $(BUILD_DIR)/demo
Expand Down
4 changes: 2 additions & 2 deletions apps/microtvm/ethosu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ PKG_CFLAGS = ${PKG_COMPILE_OPTS} \
-I${ETHOSU_PATH}/core_driver/include \
-I${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Include/ \
-I${CMSIS_PATH}/CMSIS/Core/Include \
-I${CMSIS_PATH}/NN/Include \
-I${CMSIS_PATH}/CMSIS-NN/Include \
-I${CMSIS_PATH}/CMSIS/DSP/Include \
-I$(abspath $(BUILD_DIR))/codegen/host/include \
-DETHOSU_TEST_RUNNER_TOL=${ETHOSU_TEST_RUNNER_TOL}
Expand Down Expand Up @@ -78,7 +78,7 @@ endif
CODEGEN_SRCS = $(wildcard $(abspath $(BUILD_DIR))/codegen/host/src/*.c)
CODEGEN_OBJS = $(subst .c,.o,$(CODEGEN_SRCS))
CMSIS_STARTUP_SRCS = $(wildcard ${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Source/*.c)
CMSIS_NN_SOFTMAX_SRCS = $(shell find ${CMSIS_PATH}/NN/Source/SoftmaxFunctions/*.c)
CMSIS_NN_SOFTMAX_SRCS = $(shell find ${CMSIS_PATH}/CMSIS-NN/Source/SoftmaxFunctions/*.c)
UART_SRCS = $(wildcard ${CORSTONE_300_PATH}/*.c)

demo: $(BUILD_DIR)/demo
Expand Down
20 changes: 10 additions & 10 deletions apps/microtvm/zephyr/template_project/CMakeLists.txt.template
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ project(microtvm_autogenerated_project)

if(DEFINED CMSIS_PATH)
file(GLOB_RECURSE cmsis_lib_srcs
${CMSIS_PATH}/NN/Source/ActivationFunctions/*.c
${CMSIS_PATH}/NN/Source/BasicMathFunctions/*.c
${CMSIS_PATH}/NN/Source/ConcatenationFunctions/*.c
${CMSIS_PATH}/NN/Source/ConvolutionFunctions/*.c
${CMSIS_PATH}/NN/Source/FullyConnectedFunctions/*.c
${CMSIS_PATH}/NN/Source/NNSupportFunctions/*.c
${CMSIS_PATH}/NN/Source/PoolingFunctions/*.c
${CMSIS_PATH}/NN/Source/ReshapeFunctions/*.c
${CMSIS_PATH}/NN/Source/SoftmaxFunctions/*.c
${CMSIS_PATH}/CMSIS-NN/Source/ActivationFunctions/*.c
${CMSIS_PATH}/CMSIS-NN/Source/BasicMathFunctions/*.c
${CMSIS_PATH}/CMSIS-NN/Source/ConcatenationFunctions/*.c
${CMSIS_PATH}/CMSIS-NN/Source/ConvolutionFunctions/*.c
${CMSIS_PATH}/CMSIS-NN/Source/FullyConnectedFunctions/*.c
${CMSIS_PATH}/CMSIS-NN/Source/NNSupportFunctions/*.c
${CMSIS_PATH}/CMSIS-NN/Source/PoolingFunctions/*.c
${CMSIS_PATH}/CMSIS-NN/Source/ReshapeFunctions/*.c
${CMSIS_PATH}/CMSIS-NN/Source/SoftmaxFunctions/*.c
)

set(cmsis_includes
${CMSIS_PATH}/CMSIS/Core/Include
${CMSIS_PATH}/NN/Include
${CMSIS_PATH}/CMSIS-NN/Include
${CMSIS_PATH}/CMSIS/DSP/Include
${CMSIS_PATH}/CMSIS/DSP/Include/dsp
)
Expand Down
36 changes: 18 additions & 18 deletions apps/microtvm/zephyr_cmsisnn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ set(DATA_FILES
${CMAKE_CURRENT_BINARY_DIR}/labels.c
)
set(CMSIS_SOURCES
${CMSIS_PATH}/NN/Source/SoftmaxFunctions/arm_softmax_s8.c
${CMSIS_PATH}/NN/Source/ConvolutionFunctions/arm_depthwise_conv_wrapper_s8.c
${CMSIS_PATH}/NN/Source/ConvolutionFunctions/arm_depthwise_conv_s8.c
${CMSIS_PATH}/NN/Source/ConvolutionFunctions/arm_depthwise_conv_s8_opt.c
${CMSIS_PATH}/NN/Source/NNSupportFunctions/arm_nn_depthwise_conv_nt_t_s8.c
${CMSIS_PATH}/NN/Source/NNSupportFunctions/arm_nn_depthwise_conv_nt_t_padded_s8.c
${CMSIS_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_wrapper_s8.c
${CMSIS_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_1_x_n_s8.c
${CMSIS_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_1x1_s8_fast.c
${CMSIS_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_s8.c
${CMSIS_PATH}/NN/Source/ConvolutionFunctions/arm_convolve_1x1_s8.c
${CMSIS_PATH}/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_s8.c
${CMSIS_PATH}/NN/Source/FullyConnectedFunctions/arm_fully_connected_s8.c
${CMSIS_PATH}/NN/Source/NNSupportFunctions/arm_nn_mat_mul_core_4x_s8.c
${CMSIS_PATH}/NN/Source/NNSupportFunctions/arm_nn_vec_mat_mult_t_s8.c
${CMSIS_PATH}/NN/Source/NNSupportFunctions/arm_nn_mat_mult_nt_t_s8.c
${CMSIS_PATH}/NN/Source/NNSupportFunctions/arm_nn_mat_mul_core_1x_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/SoftmaxFunctions/arm_softmax_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/ConvolutionFunctions/arm_depthwise_conv_wrapper_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/ConvolutionFunctions/arm_depthwise_conv_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/ConvolutionFunctions/arm_depthwise_conv_s8_opt.c
${CMSIS_PATH}/CMSIS-NN/Source/NNSupportFunctions/arm_nn_depthwise_conv_nt_t_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/NNSupportFunctions/arm_nn_depthwise_conv_nt_t_padded_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/ConvolutionFunctions/arm_convolve_wrapper_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/ConvolutionFunctions/arm_convolve_1_x_n_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/ConvolutionFunctions/arm_convolve_1x1_s8_fast.c
${CMSIS_PATH}/CMSIS-NN/Source/ConvolutionFunctions/arm_convolve_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/ConvolutionFunctions/arm_convolve_1x1_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/ConvolutionFunctions/arm_nn_mat_mult_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/FullyConnectedFunctions/arm_fully_connected_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/NNSupportFunctions/arm_nn_mat_mul_core_4x_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/NNSupportFunctions/arm_nn_vec_mat_mult_t_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/NNSupportFunctions/arm_nn_mat_mult_nt_t_s8.c
${CMSIS_PATH}/CMSIS-NN/Source/NNSupportFunctions/arm_nn_mat_mul_core_1x_s8.c
)

add_custom_command(
Expand All @@ -95,5 +95,5 @@ target_sources(app PRIVATE
target_include_directories(app
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/runtime/include ${CMAKE_CURRENT_BINARY_DIR}/codegen/host/include
PUBLIC ${CMSIS_PATH}/NN/Include/ ${CMSIS_PATH}/CMSIS/DSP/Include
PUBLIC ${CMSIS_PATH}/CMSIS-NN/Include/ ${CMSIS_PATH}/CMSIS/DSP/Include
)
2 changes: 1 addition & 1 deletion docker/install/ubuntu_install_cmsis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ touch "${INSTALLATION_PATH}"/"${CMSIS_SHA}".sha

CMSIS_NN_TAG="v4.0.0"
CMSIS_NN_URL="https://github.com/ARM-software/CMSIS-NN.git"
git clone ${CMSIS_NN_URL} --branch ${CMSIS_NN_TAG} --single-branch ${INSTALLATION_PATH}/NN
git clone ${CMSIS_NN_URL} --branch ${CMSIS_NN_TAG} --single-branch ${INSTALLATION_PATH}/CMSIS-NN
echo "SUCCESS"
2 changes: 1 addition & 1 deletion docker/install/ubuntu_install_ethosu_driver_stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ cmake -DCMAKE_TOOLCHAIN_FILE=${ethosu_dir}/core_platform/cmake/toolchain/arm-non
make

# Build NN Library
mkdir ${CMSIS_PATH}/NN/build/ && cd ${CMSIS_PATH}/NN/build/
mkdir ${CMSIS_PATH}/CMSIS-NN/build/ && cd ${CMSIS_PATH}/CMSIS-NN/build/
cmake .. -DCMAKE_TOOLCHAIN_FILE=${ethosu_dir}/core_platform/cmake/toolchain/arm-none-eabi-gcc.cmake -DTARGET_CPU=cortex-m55 -DBUILD_CMSIS_NN_FUNCTIONS=YES -DCMSIS_PATH=${CMSIS_PATH}
make
2 changes: 1 addition & 1 deletion tests/micro/zephyr/test_zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ def test_schedule_build_with_cmsis_dependency(workspace_dir, board, microtvm_deb
assert "CMSIS/DSP/Include" in cmake_content
assert "CMSIS/DSP/Include/dsp" in cmake_content
assert "CMSIS/DSP/Include" in cmake_content
assert "CMSIS/NN/Include" in cmake_content
assert "CMSIS/CMSIS-NN/Include" in cmake_content


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion tests/micro/zephyr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def loadCMSIS(temp_dir):
include_trees = {}

for file in res["tree"]:
if file["path"] in {"CMSIS/DSP/Include", "CMSIS/DSP/Include/dsp", "CMSIS/NN/Include"}:
if file["path"] in {"CMSIS/DSP/Include", "CMSIS/DSP/Include/dsp", "CMSIS/CMSIS-NN/Include"}:
include_trees.update({file["path"]: file["sha"]})

for path, sha in include_trees.items():
Expand Down
4 changes: 2 additions & 2 deletions tests/python/relay/aot/corstone300.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ PKG_CFLAGS = ${PKG_COMPILE_OPTS} \
-I${DRIVER_PATH}/include \
-I${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Include/ \
-I${CMSIS_PATH}/CMSIS/Core/Include \
-I${CMSIS_PATH}/NN/Include \
-I${CMSIS_PATH}/CMSIS-NN/Include \
-I${CMSIS_PATH}/CMSIS/DSP/Include \
-isystem$(STANDALONE_CRT_DIR)/include
DRIVER_CMAKE_FLAGS = -DCMAKE_TOOLCHAIN_FILE=$(ETHOSU_TEST_ROOT)/arm-none-eabi-gcc.cmake \
Expand All @@ -78,7 +78,7 @@ CC_CODEGEN_SRCS = $(shell find $(abspath $(CODEGEN_ROOT)/host/src/*.cc))
C_CODEGEN_OBJS = $(subst .c,.o,$(C_CODEGEN_SRCS))
CC_CODEGEN_OBJS = $(subst .cc,.o,$(CC_CODEGEN_SRCS))
CMSIS_STARTUP_SRCS = $(shell find ${CMSIS_PATH}/Device/ARM/${ARM_CPU}/Source/*.c)
CMSIS_NN_SRCS = $(shell find ${CMSIS_PATH}/NN/Source/*/*.c)
CMSIS_NN_SRCS = $(shell find ${CMSIS_PATH}/CMSIS-NN/Source/*/*.c)
UART_SRCS = $(shell find ${PLATFORM_PATH}/*.c)

ifdef ETHOSU_TEST_ROOT
Expand Down

0 comments on commit bdc555b

Please sign in to comment.