18 lines
844 B
CMake
18 lines
844 B
CMake
set(SOC_VERSION "ascend310p3" CACHE STRING "system on chip type")
|
|
set(ASCEND_CANN_PACKAGE_PATH "/usr/local/Ascend/ascend-toolkit/latest" CACHE PATH "ASCEND CANN package installation directory")
|
|
set(RUN_MODE "npu" CACHE STRING "run mode: npu/sim/cpu")
|
|
|
|
if(EXISTS ${ASCEND_CANN_PACKAGE_PATH}/compiler/tikcpp/ascendc_kernel_cmake)
|
|
set(ASCENDC_CMAKE_DIR ${ASCEND_CANN_PACKAGE_PATH}/compiler/tikcpp/ascendc_kernel_cmake)
|
|
elseif(EXISTS ${ASCEND_CANN_PACKAGE_PATH}/ascendc_devkit/tikcpp/samples/cmake)
|
|
set(ASCENDC_CMAKE_DIR ${ASCEND_CANN_PACKAGE_PATH}/ascendc_devkit/tikcpp/samples/cmake)
|
|
else()
|
|
message(FATAL_ERROR "ascendc_kernel_cmake does not exist, please check whether the compiler package is installed.")
|
|
endif()
|
|
|
|
include(${ASCENDC_CMAKE_DIR}/ascendc.cmake)
|
|
|
|
ascendc_library(ascendc_kernels STATIC
|
|
threshold_opencv_kernel.cpp
|
|
)
|