-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
2,362 additions
and
398 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
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 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef KERNEL_TILING_H | ||
#define KERNEL_TILING_H | ||
|
||
/* | ||
* threshType: | ||
* THRESH_BINARY = 0, | ||
* THRESH_BINARY_INV = 1, | ||
* THRESH_TRUNC = 2, | ||
* THRESH_TOZERO = 3, | ||
* THRESH_TOZERO_INV = 4, | ||
*/ | ||
#pragma pack(push, 8) | ||
struct ThresholdOpencvTilingData | ||
{ | ||
float maxVal; | ||
float thresh; | ||
uint32_t totalLength; | ||
uint8_t threshType; | ||
uint8_t dtype; | ||
}; | ||
#pragma pack(pop) | ||
#endif // KERNEL_TILING_H |
Oops, something went wrong.