This commit is contained in:
wanghailu0717 2023-10-26 10:08:58 +08:00
parent 6b06ab0534
commit cc057bcf80
1 changed files with 3 additions and 3 deletions

View File

@ -311,8 +311,8 @@ if(USE_ASCEND)
find_library(ASCEND_CL libascendcl.so "${ASCEND_HOME}/lib64") find_library(ASCEND_CL libascendcl.so "${ASCEND_HOME}/lib64")
find_library(ASCEND_BASE libnnopbase.so "${ASCEND_HOME}/lib64") find_library(ASCEND_BASE libnnopbase.so "${ASCEND_HOME}/lib64")
find_library(ASCEND_DNN libopapi.so "${ASCEND_HOME}/lib64") find_library(ASCEND_DNN libopapi.so "${ASCEND_HOME}/lib64")
#find_library(ASCEND_HAL libascend_hal.so "${ASCEND_HOME}/../../driver/lib64/driver") find_library(ASCEND_HAL libascend_hal.so "${ASCEND_HOME}/../../driver/lib64/driver")
#find_library(ASCEND_RT libruntime.so "${ASCEND_HOME}/lib64") find_library(ASCEND_RT libruntime.so "${ASCEND_HOME}/lib64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lstdc++ -Wall -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lstdc++ -Wall -Werror")
if ((NOT DEFINED TARGET_CPU_ARCH) AND (NOT DEFINED ENV{TARGET_CPU_ARCH})) if ((NOT DEFINED TARGET_CPU_ARCH) AND (NOT DEFINED ENV{TARGET_CPU_ARCH}))
execute_process(COMMAND uname -m OUTPUT_VARIABLE _uname_m OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND uname -m OUTPUT_VARIABLE _uname_m OUTPUT_STRIP_TRAILING_WHITESPACE)
@ -323,7 +323,7 @@ if(USE_ASCEND)
set(TARGET_CPU_ARCH $ENV{TARGET_CPU_ARCH} CACHE STRING "Target CPU ARCH") set(TARGET_CPU_ARCH $ENV{TARGET_CPU_ARCH} CACHE STRING "Target CPU ARCH")
endif() endif()
message(STATUS "TARGET_CPU_ARCH: ${TARGET_CPU_ARCH}") message(STATUS "TARGET_CPU_ARCH: ${TARGET_CPU_ARCH}")
target_link_libraries(InfiniTensor ${ASCEND_CL} ${ASCEND_BASE} ${ASCEND_DNN} stdc++) target_link_libraries(InfiniTensor ${ASCEND_RT} ${ASCEND_HAL} ${ASCEND_CL} ${ASCEND_BASE} ${ASCEND_DNN} stdc++)
endif() endif()
# # Python bindings # # Python bindings