forked from ggml-org/llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change cmake to support compile ascendc kernels
- Loading branch information
Showing
4 changed files
with
36 additions
and
62 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
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,19 @@ | ||
if(NOT SOC_VERSION) | ||
set(SOC_VERSION "ascend910b3") | ||
endif() | ||
set(ASCEND_CANN_PACKAGE_PATH ${CANN_INSTALL_DIR}) | ||
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,4 @@ | ||
#ifndef ASCENDC_KERNELS_H | ||
#define ASCENDC_KERNELS_H | ||
|
||
#endif //ASCENDC_KERNELS_H |