From 914e2802092739c0b01a99501bc1df7b01f45a4c Mon Sep 17 00:00:00 2001 From: Goose Bomb Date: Tue, 12 Oct 2021 10:44:49 +0800 Subject: [PATCH] Refactor CMake build system (#184) * Remove unnecessary compiler flags * Refactor CMakeLists.txt * Tweak CMakeLists.txt for libtim_internal * Tweak CMakeLists.txt for libtim-vx * Make TIM_VX_ENABLE_TEST defaults to OFF * Eliminate usage of include_directories * Fix CI unit test --- .github/workflows/x86_vsim_unit_test.yml | 2 +- CMakeLists.txt | 21 ++++---- samples/CMakeLists.txt | 5 +- samples/benchmark_test/CMakeLists.txt | 12 ++--- samples/lenet/CMakeLists.txt | 13 ++--- samples/multi_thread_test/CMakeLists.txt | 13 +++-- samples/nbg_runner/CMakeLists.txt | 13 ++--- src/tim/CMakeLists.txt | 54 ++++++++++--------- .../ops/activation_layout_inference.h | 6 +-- src/tim/transform/ops/addn_layout_inference.h | 4 +- src/tim/transform/ops/arg_layout_inference.h | 4 +- .../ops/batch2space_layout_inference.h | 6 +-- .../transform/ops/concat_layout_inferene.h | 6 +-- .../transform/ops/conv2d_layout_inference.h | 6 +-- .../transform/ops/deconv2d_layout_inference.h | 6 +-- .../transform/ops/default_layout_inference.h | 6 +-- .../ops/depth2space_layout_inference.h | 6 +-- .../ops/elementwise_layout_inference.h | 6 +-- .../ops/fullyconnected_layout_inference.h | 6 +-- .../transform/ops/gather_layout_inference.h | 4 +- .../ops/gather_nd_layout_inference.h | 4 +- .../ops/l2normalization_layout_inference.h | 4 +- .../transform/ops/logical_layout_inference.h | 4 +- src/tim/transform/ops/lrn_layout_inference.h | 4 +- src/tim/transform/ops/op_layout_inference.cc | 6 +-- src/tim/transform/ops/pad_layout_inference.h | 6 +-- .../transform/ops/pool2d_layout_inference.h | 6 +-- .../transform/ops/reduce_layout_inference.h | 6 +-- .../transform/ops/resize_layout_inference.h | 6 +-- .../transform/ops/reverse_layout_inference.h | 4 +- .../transform/ops/select_layout_inference.h | 4 +- .../ops/simple_ops_layout_inference.h | 6 +-- .../transform/ops/slice_layout_inference.h | 4 +- .../transform/ops/softmax_layout_inference.h | 6 +-- .../ops/space2batch_layout_inference.h | 6 +-- .../ops/space2depth_layout_inference.h | 6 +-- .../transform/ops/split_layout_inference.h | 6 +-- .../transform/ops/squeeze_layout_inference.h | 6 +-- .../transform/ops/stack_layout_inference.h | 6 +-- .../ops/stridedslice_layout_inference.h | 6 +-- src/tim/utils/CMakeLists.txt | 7 +-- src/tim/utils/nbg_parser/CMakeLists.txt | 9 ++++ src/tim/vx/internal/CMakeLists.txt | 18 +++---- src/tim/vx/ops/activations_test.cc | 2 +- src/tim/vx/ops/addn_test.cc | 2 +- src/tim/vx/ops/avg_pool_test.cc | 2 +- src/tim/vx/ops/conv1d_test.cc | 2 +- src/tim/vx/ops/conv2d_test.cc | 2 +- src/tim/vx/ops/depthwiseConv_test.cc | 2 +- src/tim/vx/ops/groupedconv2d_test.cc | 2 +- src/tim/vx/ops/instancenormalization_test.cc | 2 +- src/tim/vx/ops/layernormalization_test.cc | 2 +- src/tim/vx/ops/logsoftmax_test.cc | 2 +- src/tim/vx/ops/matmul_test.cc | 2 +- src/tim/vx/ops/moments_test.cc | 2 +- src/tim/vx/ops/resize1d_test.cc | 2 +- src/tim/vx/ops/shuffle_channel_test.cc | 2 +- src/tim/vx/ops/transposeConv_test.cc | 2 +- 58 files changed, 192 insertions(+), 177 deletions(-) create mode 100644 src/tim/utils/nbg_parser/CMakeLists.txt diff --git a/.github/workflows/x86_vsim_unit_test.yml b/.github/workflows/x86_vsim_unit_test.yml index 1a5fd9d..d6e6bd8 100644 --- a/.github/workflows/x86_vsim_unit_test.yml +++ b/.github/workflows/x86_vsim_unit_test.yml @@ -24,7 +24,7 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTIM_VX_ENABLE_TEST=ON - name: Build # Build your program with the given configuration diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b75d73..348a05a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,13 @@ cmake_minimum_required (VERSION 3.14) project(tim-vx LANGUAGES C CXX) -OPTION(TIM_VX_ENABLE_TEST "Build the unit test" ON) -OPTION(TIM_VX_ENABLE_LAYOUT_INFER "Enable layout inference support" ON) -OPTION(TIM_VX_CODE_COVERAGE "Run code coverage with gconv(gcc only" OFF) -OPTION(TIM_VX_USE_EXTERNAL_OVXLIB "Use external OVXLIB" OFF) -OPTION(TIM_VX_ENABLE_NB_PARSER_EXAMPLE "Demo shows nbg parser usage" OFF) +option(BUILD_SHARED_LIBS "Build using shared libraries" OFF) +option(TIM_VX_ENABLE_TEST "Build the unit test" OFF) +option(TIM_VX_ENABLE_LAYOUT_INFER "Enable layout inference support" ON) +option(TIM_VX_ENABLE_NBG_PARSER "Enable NBG parser" OFF) +option(TIM_VX_CODE_COVERAGE "Run code coverage with gconv(gcc only" OFF) +option(TIM_VX_USE_EXTERNAL_OVXLIB "Use external OVXLIB" OFF) +option(TIM_VX_BUILD_EXAMPLES "Build demos show general usage" OFF) set(CMAKE_CXX_STANDARD 14) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -27,7 +29,6 @@ if(EXTERNAL_VIV_SDK AND EXISTS ${EXTERNAL_VIV_SDK}) # this is for internal development purpose include(cmake/local_sdk.cmake) else() - set(TIM_VX_ENABLE_TEST OFF) if("${CONFIG}" STREQUAL "A311D") include(cmake/A311D.cmake) elseif("${CONFIG}" STREQUAL "S905D3") @@ -37,7 +38,6 @@ else() elseif("${CONFIG}" STREQUAL "YOCTO") include(cmake/YOCTO.cmake) else() - set(TIM_VX_ENABLE_TEST ON) include(cmake/X86_64_linux.cmake) endif() endif() @@ -60,7 +60,8 @@ if(TIM_VX_ENABLE_TEST) endif() endif() -include_directories(${OVXDRV_INCLUDE_DIRS}) +add_subdirectory("src/tim") -add_subdirectory("src/tim/") -add_subdirectory("samples") +if(TIM_VX_BUILD_EXAMPLES) + add_subdirectory("samples") +endif() diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index f6cadfc..87dfffa 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -1,7 +1,10 @@ add_subdirectory("benchmark_test") add_subdirectory("lenet") -add_subdirectory("nbg_runner") if(NOT ANDROID_TOOLCHAIN) add_subdirectory("multi_thread_test") endif() + +if(TIM_VX_ENABLE_NBG_PARSER) + add_subdirectory("nbg_runner") +endif() diff --git a/samples/benchmark_test/CMakeLists.txt b/samples/benchmark_test/CMakeLists.txt index b600ee7..5248c6f 100644 --- a/samples/benchmark_test/CMakeLists.txt +++ b/samples/benchmark_test/CMakeLists.txt @@ -1,11 +1,9 @@ -message("benchmark_test") +message("samples/benchmark_test") set(TARGET_NAME "benchmark_test") -aux_source_directory(. SRC) +aux_source_directory(. ${TARGET_NAME}_SRCS) +add_executable(${TARGET_NAME} ${${TARGET_NAME}_SRCS}) -include_directories(${PROJECT_SOURCE_DIR}/include) -include_directories(./) - -add_executable(${TARGET_NAME} ${SRC}) -target_link_libraries(${TARGET_NAME} ${OVXDRV_LIBRARIES} tim-vx-static) \ No newline at end of file +target_link_libraries(${TARGET_NAME} PRIVATE tim-vx) +target_include_directories(${TARGET_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include) \ No newline at end of file diff --git a/samples/lenet/CMakeLists.txt b/samples/lenet/CMakeLists.txt index 0def5fc..d8a170e 100644 --- a/samples/lenet/CMakeLists.txt +++ b/samples/lenet/CMakeLists.txt @@ -2,10 +2,11 @@ message("samples/lenet") set(TARGET_NAME "lenet") -aux_source_directory(. SRC) +aux_source_directory(. ${TARGET_NAME}_SRCS) +add_executable(${TARGET_NAME} ${${TARGET_NAME}_SRCS}) -include_directories(${PROJECT_SOURCE_DIR}/include) -include_directories(./) - -add_executable(${TARGET_NAME} ${SRC}) -target_link_libraries(${TARGET_NAME} ${OVXDRV_LIBRARIES} tim-vx-static) \ No newline at end of file +target_link_libraries(${TARGET_NAME} PRIVATE tim-vx) +target_include_directories(${TARGET_NAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${PROJECT_SOURCE_DIR}/include +) \ No newline at end of file diff --git a/samples/multi_thread_test/CMakeLists.txt b/samples/multi_thread_test/CMakeLists.txt index 3575a59..a1c18f1 100644 --- a/samples/multi_thread_test/CMakeLists.txt +++ b/samples/multi_thread_test/CMakeLists.txt @@ -2,10 +2,13 @@ message("samples/multi_thread_test") set(TARGET_NAME "multi_thread_test") -aux_source_directory(. SRC) +find_package(Threads REQUIRED) -include_directories(${PROJECT_SOURCE_DIR}/include) -include_directories(./) +aux_source_directory(. ${TARGET_NAME}_SRCS) +add_executable(${TARGET_NAME} ${${TARGET_NAME}_SRCS}) -add_executable(${TARGET_NAME} ${SRC}) -target_link_libraries(${TARGET_NAME} ${OVXDRV_LIBRARIES} tim-vx-static pthread) \ No newline at end of file +target_link_libraries(${TARGET_NAME} PRIVATE tim-vx Threads::Threads) +target_include_directories(${TARGET_NAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${PROJECT_SOURCE_DIR}/include +) \ No newline at end of file diff --git a/samples/nbg_runner/CMakeLists.txt b/samples/nbg_runner/CMakeLists.txt index 0cb3235..32b918e 100644 --- a/samples/nbg_runner/CMakeLists.txt +++ b/samples/nbg_runner/CMakeLists.txt @@ -1,8 +1,9 @@ -if(TIM_VX_ENABLE_NB_PARSER_EXAMPLE) +message("samples/nbg_runner") -include_directories(${PROJECT_SOURCE_DIR}/include) -aux_source_directory(. nbg_runner_src) -add_executable(nbg_runner ${nbg_runner_src}) -target_link_libraries(nbg_runner tim-vx-static nbg_parser) +set(TARGET_NAME "nbg_runner") -endif() +aux_source_directory(. ${TARGET_NAME}_SRCS) +add_executable(${TARGET_NAME} ${${TARGET_NAME}_SRCS}) + +target_link_libraries(${TARGET_NAME} PRIVATE tim-vx nbg_parser) +target_include_directories(${TARGET_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include) \ No newline at end of file diff --git a/src/tim/CMakeLists.txt b/src/tim/CMakeLists.txt index ab99ed3..d42c267 100644 --- a/src/tim/CMakeLists.txt +++ b/src/tim/CMakeLists.txt @@ -15,15 +15,11 @@ endif() aux_source_directory(./vx VX_SRC) aux_source_directory(./vx/ops OPS_SRC) -set(SRC) -list(APPEND SRC +set(${TARGET_NAME}_SRCS) +list(APPEND ${TARGET_NAME}_SRCS ${VX_SRC} ${OPS_SRC} - ) - -include_directories(${PROJECT_SOURCE_DIR}/include) -include_directories(${PROJECT_SOURCE_DIR}/include/tim/vx) -include_directories(${PROJECT_SOURCE_DIR}/src/tim/vx) +) if(${TIM_VX_USE_EXTERNAL_OVXLIB}) if(NOT OVXLIB_INC) @@ -34,51 +30,57 @@ else() set(OVXLIB_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/src/tim/vx/internal/include") endif() message(STATUS "OVXLIB include directory: ${OVXLIB_INCLUDE_DIR}") -include_directories(${OVXLIB_INCLUDE_DIR}) if(TIM_VX_ENABLE_LAYOUT_INFER) - include_directories(${PROJECT_SOURCE_DIR}/) - aux_source_directory(./transform LAYOUT_INFER_FRAMEWORK_SRCS) aux_source_directory(./transform/ops LAYOUT_INFER_OP_SRCS) - list(APPEND SRC + list(APPEND ${TARGET_NAME}_SRCS ${LAYOUT_INFER_FRAMEWORK_SRCS} ${LAYOUT_INFER_OP_SRCS} ) endif() -foreach(src_file ${SRC}) +foreach(src_file ${${TARGET_NAME}_SRCS}) if(${src_file} MATCHES ".*_test\.cc") - list(REMOVE_ITEM SRC ${src_file}) - list(APPEND UT_SRC ${src_file}) + list(REMOVE_ITEM ${TARGET_NAME}_SRCS ${src_file}) + list(APPEND ${TARGET_NAME}_TEST_SRCS ${src_file}) endif() endforeach() -add_library(${TARGET_NAME} SHARED ${SRC}) +add_library(${TARGET_NAME} ${${TARGET_NAME}_SRCS}) target_link_libraries(${TARGET_NAME} PRIVATE -Wl,--whole-archive tim_internal -Wl,--no-whole-archive) +target_include_directories(${TARGET_NAME} PRIVATE + ${PROJECT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/vx + ${CMAKE_CURRENT_SOURCE_DIR}/transform + ${OVXLIB_INCLUDE_DIR} + ${OVXDRV_INCLUDE_DIRS} +) -add_library(${TARGET_NAME}-static STATIC ${SRC}) -target_link_libraries(${TARGET_NAME}-static PRIVATE - -Wl,--whole-archive tim_internal -Wl,--no-whole-archive) - -install(TARGETS ${TARGET_NAME} ${TARGET_NAME}-static +install(TARGETS ${TARGET_NAME} ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) -install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/tim/vx DESTINATION ${CMAKE_INSTALL_PREFIX}/include/tim/) +install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/tim/vx + DESTINATION ${CMAKE_INSTALL_PREFIX}/include/tim) if(TIM_VX_ENABLE_LAYOUT_INFER) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/tim/transform DESTINATION ${CMAKE_INSTALL_PREFIX}/include/tim/) + install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/tim/transform + DESTINATION ${CMAKE_INSTALL_PREFIX}/include/tim) endif() -if (TIM_VX_ENABLE_TEST) +if(TIM_VX_ENABLE_TEST) include(GoogleTest) - add_executable(unit_test ${UT_SRC}) - target_link_libraries(unit_test gtest gtest_main gmock gmock_main ${TARGET_NAME}-static) + add_executable(unit_test ${${TARGET_NAME}_TEST_SRCS}) + target_link_libraries(unit_test PRIVATE gtest gtest_main gmock gmock_main ${TARGET_NAME}) + target_include_directories(unit_test PRIVATE + ${PROJECT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/vx + ) - install(TARGETS unit_test DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/) + install(TARGETS unit_test DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) endif() add_subdirectory("utils") diff --git a/src/tim/transform/ops/activation_layout_inference.h b/src/tim/transform/ops/activation_layout_inference.h index a8d06a3..c1e22fb 100644 --- a/src/tim/transform/ops/activation_layout_inference.h +++ b/src/tim/transform/ops/activation_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/activations.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/addn_layout_inference.h b/src/tim/transform/ops/addn_layout_inference.h index 1ace581..51d2af3 100644 --- a/src/tim/transform/ops/addn_layout_inference.h +++ b/src/tim/transform/ops/addn_layout_inference.h @@ -24,8 +24,8 @@ #ifndef TIM_LAYOUT_INFER_ADDN_LAYOUT_INFERENCE_H_ #define TIM_LAYOUT_INFER_ADDN_LAYOUT_INFERENCE_H_ -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "operation_private.h" #include "tim/vx/ops/addn.h" namespace tim { diff --git a/src/tim/transform/ops/arg_layout_inference.h b/src/tim/transform/ops/arg_layout_inference.h index 3c69f37..18138d8 100644 --- a/src/tim/transform/ops/arg_layout_inference.h +++ b/src/tim/transform/ops/arg_layout_inference.h @@ -24,8 +24,8 @@ #ifndef TIM_LAYOUT_INFER_ARG_OPS_LAYOUT_INFERENCE_H_ #define TIM_LAYOUT_INFER_ARG_OPS_LAYOUT_INFERENCE_H_ -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "operation_private.h" #include "tim/vx/ops/arg.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/batch2space_layout_inference.h b/src/tim/transform/ops/batch2space_layout_inference.h index 5ae1b35..876b885 100644 --- a/src/tim/transform/ops/batch2space_layout_inference.h +++ b/src/tim/transform/ops/batch2space_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/batch2space.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { class Batch2SpaceLayoutInfer : public OpLayoutInfer { diff --git a/src/tim/transform/ops/concat_layout_inferene.h b/src/tim/transform/ops/concat_layout_inferene.h index bdc73b1..9643ddf 100644 --- a/src/tim/transform/ops/concat_layout_inferene.h +++ b/src/tim/transform/ops/concat_layout_inferene.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/concat.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/conv2d_layout_inference.h b/src/tim/transform/ops/conv2d_layout_inference.h index 87b753a..b24cdc5 100644 --- a/src/tim/transform/ops/conv2d_layout_inference.h +++ b/src/tim/transform/ops/conv2d_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/conv2d.h" -#include "src/tim/vx/operation_private.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/transform/ops/op_layout_inference.h" +#include "operation_private.h" +#include "permute_vector.h" +#include "ops/op_layout_inference.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/deconv2d_layout_inference.h b/src/tim/transform/ops/deconv2d_layout_inference.h index cdf9068..b91be41 100644 --- a/src/tim/transform/ops/deconv2d_layout_inference.h +++ b/src/tim/transform/ops/deconv2d_layout_inference.h @@ -24,9 +24,9 @@ #ifndef TIM_LAYOUT_INFER_DECONV2D_LAYOUT_INFERENCE_H_ #define TIM_LAYOUT_INFER_DECONV2D_LAYOUT_INFERENCE_H_ -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" #include "tim/vx/ops/deconv.h" namespace tim { diff --git a/src/tim/transform/ops/default_layout_inference.h b/src/tim/transform/ops/default_layout_inference.h index fd8bb6e..9f54c4b 100644 --- a/src/tim/transform/ops/default_layout_inference.h +++ b/src/tim/transform/ops/default_layout_inference.h @@ -31,9 +31,9 @@ #include "tim/vx/ops/clip.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/depth2space_layout_inference.h b/src/tim/transform/ops/depth2space_layout_inference.h index 7b92fb7..84ec4d5 100644 --- a/src/tim/transform/ops/depth2space_layout_inference.h +++ b/src/tim/transform/ops/depth2space_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/depth2space.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/elementwise_layout_inference.h b/src/tim/transform/ops/elementwise_layout_inference.h index 43821ba..ab6b6ff 100644 --- a/src/tim/transform/ops/elementwise_layout_inference.h +++ b/src/tim/transform/ops/elementwise_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/elementwise.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/fullyconnected_layout_inference.h b/src/tim/transform/ops/fullyconnected_layout_inference.h index 3708dfb..a49febc 100644 --- a/src/tim/transform/ops/fullyconnected_layout_inference.h +++ b/src/tim/transform/ops/fullyconnected_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/fullyconnected.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/gather_layout_inference.h b/src/tim/transform/ops/gather_layout_inference.h index 4294588..72b145a 100644 --- a/src/tim/transform/ops/gather_layout_inference.h +++ b/src/tim/transform/ops/gather_layout_inference.h @@ -24,8 +24,8 @@ #ifndef TIM_LAYOUT_INFER_GATHER_LAYOUT_INFERENCE_H_ #define TIM_LAYOUT_INFER_GATHER_LAYOUT_INFERENCE_H_ -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "operation_private.h" #include "tim/vx/ops/gather.h" namespace tim { diff --git a/src/tim/transform/ops/gather_nd_layout_inference.h b/src/tim/transform/ops/gather_nd_layout_inference.h index c70ec17..9c8fc23 100644 --- a/src/tim/transform/ops/gather_nd_layout_inference.h +++ b/src/tim/transform/ops/gather_nd_layout_inference.h @@ -24,8 +24,8 @@ #ifndef TIM_LAYOUT_INFER_GATHER_ND_LAYOUT_INFERENCE_H_ #define TIM_LAYOUT_INFER_GATHER_ND_LAYOUT_INFERENCE_H_ -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "operation_private.h" #include "tim/vx/ops/gathernd.h" namespace tim { diff --git a/src/tim/transform/ops/l2normalization_layout_inference.h b/src/tim/transform/ops/l2normalization_layout_inference.h index a9c5f6e..027cecc 100644 --- a/src/tim/transform/ops/l2normalization_layout_inference.h +++ b/src/tim/transform/ops/l2normalization_layout_inference.h @@ -24,8 +24,8 @@ #ifndef TIM_LAYOUT_INFER_L2_NORMALIZATION_LAYOUT_INFERENCE_H_ #define TIM_LAYOUT_INFER_L2_NORMALIZATION_LAYOUT_INFERENCE_H_ -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "operation_private.h" #include "tim/vx/ops/l2normalization.h" namespace tim { diff --git a/src/tim/transform/ops/logical_layout_inference.h b/src/tim/transform/ops/logical_layout_inference.h index f9885c1..848f0eb 100644 --- a/src/tim/transform/ops/logical_layout_inference.h +++ b/src/tim/transform/ops/logical_layout_inference.h @@ -24,8 +24,8 @@ #ifndef TIM_LAYOUT_INFER_LOGICAL_OPS_LAYOUT_INFERENCE_H_ #define TIM_LAYOUT_INFER_LOGICAL_OPS_LAYOUT_INFERENCE_H_ -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "operation_private.h" #include "tim/vx/ops/logical.h" namespace tim { diff --git a/src/tim/transform/ops/lrn_layout_inference.h b/src/tim/transform/ops/lrn_layout_inference.h index c3cb2f8..c541007 100644 --- a/src/tim/transform/ops/lrn_layout_inference.h +++ b/src/tim/transform/ops/lrn_layout_inference.h @@ -26,8 +26,8 @@ #include "tim/vx/ops/localresponsenormalization.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/op_layout_inference.cc b/src/tim/transform/ops/op_layout_inference.cc index 3a8ee10..5457290 100644 --- a/src/tim/transform/ops/op_layout_inference.cc +++ b/src/tim/transform/ops/op_layout_inference.cc @@ -23,10 +23,10 @@ *****************************************************************************/ #include "op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "permute_vector.h" +#include "operation_private.h" #include "tim/vx/ops/transpose.h" -#include "src/tim/vx/type_utils.h" +#include "type_utils.h" #include #include diff --git a/src/tim/transform/ops/pad_layout_inference.h b/src/tim/transform/ops/pad_layout_inference.h index 3388604..607927c 100644 --- a/src/tim/transform/ops/pad_layout_inference.h +++ b/src/tim/transform/ops/pad_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/pad.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { class PadLayoutInfer : public OpLayoutInfer { diff --git a/src/tim/transform/ops/pool2d_layout_inference.h b/src/tim/transform/ops/pool2d_layout_inference.h index aea557c..9954a7e 100644 --- a/src/tim/transform/ops/pool2d_layout_inference.h +++ b/src/tim/transform/ops/pool2d_layout_inference.h @@ -24,9 +24,9 @@ #ifndef TIM_LAYOUT_INFER_POOL2D_LAYOUT_INFERENCE_H_ #define TIM_LAYOUT_INFER_POOL2D_LAYOUT_INFERENCE_H_ -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" #include "tim/vx/ops/pool2d.h" namespace tim { diff --git a/src/tim/transform/ops/reduce_layout_inference.h b/src/tim/transform/ops/reduce_layout_inference.h index e773c8f..e8ec676 100644 --- a/src/tim/transform/ops/reduce_layout_inference.h +++ b/src/tim/transform/ops/reduce_layout_inference.h @@ -28,9 +28,9 @@ #include -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/resize_layout_inference.h b/src/tim/transform/ops/resize_layout_inference.h index ca71cec..4653513 100644 --- a/src/tim/transform/ops/resize_layout_inference.h +++ b/src/tim/transform/ops/resize_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/resize.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { class ResizeLayoutInfer : public OpLayoutInfer { diff --git a/src/tim/transform/ops/reverse_layout_inference.h b/src/tim/transform/ops/reverse_layout_inference.h index abfc412..f999e27 100644 --- a/src/tim/transform/ops/reverse_layout_inference.h +++ b/src/tim/transform/ops/reverse_layout_inference.h @@ -24,8 +24,8 @@ #ifndef TIM_LAYOUT_INFER_REVERSE_LAYOUT_INFERENCE_H_ #define TIM_LAYOUT_INFER_REVERSE_LAYOUT_INFERENCE_H_ -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "operation_private.h" #include "tim/vx/ops/reverse.h" namespace tim { diff --git a/src/tim/transform/ops/select_layout_inference.h b/src/tim/transform/ops/select_layout_inference.h index 3fbde95..60dd898 100644 --- a/src/tim/transform/ops/select_layout_inference.h +++ b/src/tim/transform/ops/select_layout_inference.h @@ -24,8 +24,8 @@ #ifndef TIM_LAYOUT_INFER_SELECT_LAYOUT_INFERENCE_H_ #define TIM_LAYOUT_INFER_SELECT_LAYOUT_INFERENCE_H_ -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "operation_private.h" #include "tim/vx/ops/select.h" namespace tim { diff --git a/src/tim/transform/ops/simple_ops_layout_inference.h b/src/tim/transform/ops/simple_ops_layout_inference.h index 90c953d..a1e92d2 100644 --- a/src/tim/transform/ops/simple_ops_layout_inference.h +++ b/src/tim/transform/ops/simple_ops_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/simple_operations.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/slice_layout_inference.h b/src/tim/transform/ops/slice_layout_inference.h index 1b15f94..9b6079e 100644 --- a/src/tim/transform/ops/slice_layout_inference.h +++ b/src/tim/transform/ops/slice_layout_inference.h @@ -24,8 +24,8 @@ #ifndef TIM_LAYOUT_INFER_SLICE_LAYOUT_INFERENCE_H_ #define TIM_LAYOUT_INFER_SLICE_LAYOUT_INFERENCE_H_ -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "operation_private.h" #include "tim/vx/ops/slice.h" namespace tim { diff --git a/src/tim/transform/ops/softmax_layout_inference.h b/src/tim/transform/ops/softmax_layout_inference.h index 2aa798e..1b8a21f 100644 --- a/src/tim/transform/ops/softmax_layout_inference.h +++ b/src/tim/transform/ops/softmax_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/softmax.h" -#include "src/tim/vx/operation_private.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/transform/ops/op_layout_inference.h" +#include "operation_private.h" +#include "permute_vector.h" +#include "ops/op_layout_inference.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/space2batch_layout_inference.h b/src/tim/transform/ops/space2batch_layout_inference.h index 2b25720..77fdfd9 100644 --- a/src/tim/transform/ops/space2batch_layout_inference.h +++ b/src/tim/transform/ops/space2batch_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/space2batch.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { class Space2BatchLayoutInfer : public OpLayoutInfer { diff --git a/src/tim/transform/ops/space2depth_layout_inference.h b/src/tim/transform/ops/space2depth_layout_inference.h index 222098d..fbc89cb 100644 --- a/src/tim/transform/ops/space2depth_layout_inference.h +++ b/src/tim/transform/ops/space2depth_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/space2depth.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { class SpaceToDepthLayoutInfer : public OpLayoutInfer { diff --git a/src/tim/transform/ops/split_layout_inference.h b/src/tim/transform/ops/split_layout_inference.h index d76d10e..6fceec9 100644 --- a/src/tim/transform/ops/split_layout_inference.h +++ b/src/tim/transform/ops/split_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/split.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/squeeze_layout_inference.h b/src/tim/transform/ops/squeeze_layout_inference.h index 0e33725..0fe8d67 100644 --- a/src/tim/transform/ops/squeeze_layout_inference.h +++ b/src/tim/transform/ops/squeeze_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/squeeze.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/stack_layout_inference.h b/src/tim/transform/ops/stack_layout_inference.h index 5df8a7d..4161245 100644 --- a/src/tim/transform/ops/stack_layout_inference.h +++ b/src/tim/transform/ops/stack_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/stack.h" -#include "src/tim/vx/operation_private.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/transform/ops/op_layout_inference.h" +#include "operation_private.h" +#include "permute_vector.h" +#include "ops/op_layout_inference.h" namespace tim { namespace transform { diff --git a/src/tim/transform/ops/stridedslice_layout_inference.h b/src/tim/transform/ops/stridedslice_layout_inference.h index 04bea42..afbdebf 100644 --- a/src/tim/transform/ops/stridedslice_layout_inference.h +++ b/src/tim/transform/ops/stridedslice_layout_inference.h @@ -26,9 +26,9 @@ #include "tim/vx/ops/stridedslice.h" -#include "src/tim/transform/ops/op_layout_inference.h" -#include "src/tim/transform/permute_vector.h" -#include "src/tim/vx/operation_private.h" +#include "ops/op_layout_inference.h" +#include "permute_vector.h" +#include "operation_private.h" namespace tim { namespace transform { diff --git a/src/tim/utils/CMakeLists.txt b/src/tim/utils/CMakeLists.txt index ac8c3ab..f6353b9 100644 --- a/src/tim/utils/CMakeLists.txt +++ b/src/tim/utils/CMakeLists.txt @@ -1,6 +1,3 @@ -if(TIM_VX_ENABLE_NB_PARSER_EXAMPLE) - -aux_source_directory(./nbg_parser nbg_parser_src) -add_library(nbg_parser STATIC ${nbg_parser_src}) - +if(TIM_VX_ENABLE_NBG_PARSER) + add_subdirectory("nbg_parser") endif() \ No newline at end of file diff --git a/src/tim/utils/nbg_parser/CMakeLists.txt b/src/tim/utils/nbg_parser/CMakeLists.txt new file mode 100644 index 0000000..5a5bcb4 --- /dev/null +++ b/src/tim/utils/nbg_parser/CMakeLists.txt @@ -0,0 +1,9 @@ +message("src/tim/vx/utils/nbg_parser") + +set(TARGET_NAME "nbg_parser") + +aux_source_directory(. ${TARGET_NAME}_SRCS) +add_library(${TARGET_NAME} STATIC ${${TARGET_NAME}_SRCS}) +target_include_directories(${TARGET_NAME} PRIVATE + ${PROJECT_SOURCE_DIR}/include +) \ No newline at end of file diff --git a/src/tim/vx/internal/CMakeLists.txt b/src/tim/vx/internal/CMakeLists.txt index 0e19d53..a707d65 100644 --- a/src/tim/vx/internal/CMakeLists.txt +++ b/src/tim/vx/internal/CMakeLists.txt @@ -1,9 +1,8 @@ message("src/tim/vx/internal") -set(lib_name "tim_internal") +set(TARGET_NAME "tim_internal") set(OVXLIB_API_ATTR "__attribute__\(\(visibility\(\"default\"\)\)\)") add_definitions(-DOVXLIB_API=${OVXLIB_API_ATTR}) -add_compile_options(-Wno-strict-aliasing -Wno-unused-but-set-variable -Wno-maybe-uninitialized) aux_source_directory(src INTERNAL_SRC) aux_source_directory(src/kernel INTERNAL_KERNEL) @@ -18,8 +17,8 @@ aux_source_directory(src/custom/ops INTERNAL_CUSTOM_OPS) aux_source_directory(src/custom/ops/kernel INTERNAL_CUSTOM_OPS_KERNEL) aux_source_directory(src/utils INTERNAL_UTILS) -set(SRC) -list(APPEND SRC +set(${TARGET_NAME}_SRCS) +list(APPEND ${TARGET_NAME}_SRCS ${INTERNAL_SRC} ${INTERNAL_KERNEL} ${INTERNAL_KERNEL_CL} @@ -34,8 +33,9 @@ list(APPEND SRC ${INTERNAL_UTILS} ) -include_directories(include) -include_directories(${OVXDRV_INCLUDE_DIRS}) - -add_library(${lib_name} ${SRC}) -target_link_libraries(${lib_name} PRIVATE ${OVXDRV_LIBRARIES}) +add_library(${TARGET_NAME} STATIC ${${TARGET_NAME}_SRCS}) +target_link_libraries(${TARGET_NAME} PRIVATE ${OVXDRV_LIBRARIES}) +target_include_directories(${TARGET_NAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${OVXDRV_INCLUDE_DIRS} +) diff --git a/src/tim/vx/ops/activations_test.cc b/src/tim/vx/ops/activations_test.cc index 5cde1e7..fad39ae 100644 --- a/src/tim/vx/ops/activations_test.cc +++ b/src/tim/vx/ops/activations_test.cc @@ -26,7 +26,7 @@ #include "tim/vx/ops/activations.h" #include "gtest/gtest.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" TEST(Linear, shape_5_1_fp32) { auto ctx = tim::vx::Context::Create(); diff --git a/src/tim/vx/ops/addn_test.cc b/src/tim/vx/ops/addn_test.cc index ae50b27..67afbc3 100644 --- a/src/tim/vx/ops/addn_test.cc +++ b/src/tim/vx/ops/addn_test.cc @@ -25,7 +25,7 @@ #include "tim/vx/graph.h" #include "tim/vx/ops/addn.h" #include "tim/vx/types.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "gtest/gtest.h" diff --git a/src/tim/vx/ops/avg_pool_test.cc b/src/tim/vx/ops/avg_pool_test.cc index 0465302..807975f 100644 --- a/src/tim/vx/ops/avg_pool_test.cc +++ b/src/tim/vx/ops/avg_pool_test.cc @@ -26,7 +26,7 @@ #include "tim/vx/ops/pool2d.h" #include #include "gtest/gtest.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" TEST(AVG, shape_3_3_1_2_fp32_kernel_2_stride_1) { auto ctx = tim::vx::Context::Create(); diff --git a/src/tim/vx/ops/conv1d_test.cc b/src/tim/vx/ops/conv1d_test.cc index b024c67..1bf1ae7 100644 --- a/src/tim/vx/ops/conv1d_test.cc +++ b/src/tim/vx/ops/conv1d_test.cc @@ -24,7 +24,7 @@ #include "tim/vx/context.h" #include "tim/vx/graph.h" #include "tim/vx/ops/conv1d.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "gtest/gtest.h" TEST(Conv1d, shape_3_6_1_float_ksize_1_stride_1_weights_3_no_bias_whcn) { diff --git a/src/tim/vx/ops/conv2d_test.cc b/src/tim/vx/ops/conv2d_test.cc index 9533f51..08b709d 100644 --- a/src/tim/vx/ops/conv2d_test.cc +++ b/src/tim/vx/ops/conv2d_test.cc @@ -1,7 +1,7 @@ #include "tim/vx/ops/conv2d.h" #include "gtest/gtest.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "tim/vx/context.h" #include "tim/vx/graph.h" #include "tim/vx/types.h" diff --git a/src/tim/vx/ops/depthwiseConv_test.cc b/src/tim/vx/ops/depthwiseConv_test.cc index 63137ab..9be4bd5 100644 --- a/src/tim/vx/ops/depthwiseConv_test.cc +++ b/src/tim/vx/ops/depthwiseConv_test.cc @@ -1,5 +1,5 @@ #include "gtest/gtest.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "tim/vx/context.h" #include "tim/vx/graph.h" #include "tim/vx/ops/conv2d.h" diff --git a/src/tim/vx/ops/groupedconv2d_test.cc b/src/tim/vx/ops/groupedconv2d_test.cc index b6ae3ca..3cd6cfd 100644 --- a/src/tim/vx/ops/groupedconv2d_test.cc +++ b/src/tim/vx/ops/groupedconv2d_test.cc @@ -24,7 +24,7 @@ #include "tim/vx/context.h" #include "tim/vx/graph.h" #include "tim/vx/ops/groupedconv2d.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "gtest/gtest.h" TEST(GroupedConv2d, shape_3_3_6_1_float_group_1_no_bias_whcn) { diff --git a/src/tim/vx/ops/instancenormalization_test.cc b/src/tim/vx/ops/instancenormalization_test.cc index 7111057..e5013f5 100644 --- a/src/tim/vx/ops/instancenormalization_test.cc +++ b/src/tim/vx/ops/instancenormalization_test.cc @@ -24,7 +24,7 @@ #include "tim/vx/context.h" #include "tim/vx/graph.h" #include "tim/vx/ops/instancenormalization.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "gtest/gtest.h" TEST(InstanceNorm, shape_3_6_1_float) { diff --git a/src/tim/vx/ops/layernormalization_test.cc b/src/tim/vx/ops/layernormalization_test.cc index e749903..ba6a9f2 100644 --- a/src/tim/vx/ops/layernormalization_test.cc +++ b/src/tim/vx/ops/layernormalization_test.cc @@ -24,7 +24,7 @@ #include "tim/vx/context.h" #include "tim/vx/graph.h" #include "tim/vx/ops/layernormalization.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "gtest/gtest.h" TEST(LayerNorm, axis_0_shape_3_6_1_float) { diff --git a/src/tim/vx/ops/logsoftmax_test.cc b/src/tim/vx/ops/logsoftmax_test.cc index 681621d..781d9f3 100644 --- a/src/tim/vx/ops/logsoftmax_test.cc +++ b/src/tim/vx/ops/logsoftmax_test.cc @@ -24,7 +24,7 @@ #include "tim/vx/context.h" #include "tim/vx/graph.h" #include "tim/vx/ops/logsoftmax.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "gtest/gtest.h" TEST(LogSoftmax, shape_6_1_float_axis_0) { diff --git a/src/tim/vx/ops/matmul_test.cc b/src/tim/vx/ops/matmul_test.cc index 60f6395..903c0f0 100644 --- a/src/tim/vx/ops/matmul_test.cc +++ b/src/tim/vx/ops/matmul_test.cc @@ -24,7 +24,7 @@ #include "tim/vx/context.h" #include "tim/vx/graph.h" #include "tim/vx/ops/matmul.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "gtest/gtest.h" TEST(Matmul, shape_2_6_shape_6_2_float) { diff --git a/src/tim/vx/ops/moments_test.cc b/src/tim/vx/ops/moments_test.cc index 7e2c34b..b109f23 100644 --- a/src/tim/vx/ops/moments_test.cc +++ b/src/tim/vx/ops/moments_test.cc @@ -25,7 +25,7 @@ #include "tim/vx/context.h" #include "tim/vx/graph.h" #include "tim/vx/ops/moments.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "gtest/gtest.h" TEST(Moments, shape_6_3_1_float_axes_0_1) { diff --git a/src/tim/vx/ops/resize1d_test.cc b/src/tim/vx/ops/resize1d_test.cc index 357dc42..f57c188 100644 --- a/src/tim/vx/ops/resize1d_test.cc +++ b/src/tim/vx/ops/resize1d_test.cc @@ -24,7 +24,7 @@ #include "tim/vx/context.h" #include "tim/vx/graph.h" #include "tim/vx/ops/resize1d.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "gtest/gtest.h" TEST(Resize1d, shape_4_2_1_float_nearest_whcn) { diff --git a/src/tim/vx/ops/shuffle_channel_test.cc b/src/tim/vx/ops/shuffle_channel_test.cc index 03ec497..9e1e028 100644 --- a/src/tim/vx/ops/shuffle_channel_test.cc +++ b/src/tim/vx/ops/shuffle_channel_test.cc @@ -25,7 +25,7 @@ #include "tim/vx/graph.h" #include "tim/vx/ops/shuffle_channel.h" #include "tim/vx/types.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "gtest/gtest.h" diff --git a/src/tim/vx/ops/transposeConv_test.cc b/src/tim/vx/ops/transposeConv_test.cc index 59e9131..83cdd3e 100644 --- a/src/tim/vx/ops/transposeConv_test.cc +++ b/src/tim/vx/ops/transposeConv_test.cc @@ -1,6 +1,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "src/tim/vx/test_utils.h" +#include "test_utils.h" #include "tim/vx/context.h" #include "tim/vx/graph.h" #include "tim/vx/ops/deconv.h"