!3293 Add environment variable ASCEND_CUSTOM_FWK_PATH to fit specific ascend software structures

Merge pull request !3293 from yanghaoran/r0.5
This commit is contained in:
mindspore-ci-bot 2020-07-22 11:36:16 +08:00 committed by Gitee
commit aef097d312
2 changed files with 10 additions and 2 deletions

View File

@ -45,7 +45,11 @@ else()
set(ASCEND_PATH /usr/local/Ascend)
endif()
set(ASCEND_DRIVER_PATH ${ASCEND_PATH}/driver/lib64/common)
set(ASCEND_RUNTIME_PATH ${ASCEND_PATH}/fwkacllib/lib64)
if (DEFINED ENV{ASCEND_CUSTOM_FWK_PATH})
set(ASCEND_RUNTIME_PATH $ENV{ASCEND_CUSTOM_FWK_PATH}/fwkacllib/lib64)
else ()
set(ASCEND_RUNTIME_PATH ${ASCEND_PATH}/fwkacllib/lib64)
endif ()
find_library(c_sec libc_sec.so ${ASCEND_DRIVER_PATH})
find_library(slog libslog.so ${ASCEND_DRIVER_PATH})
find_library(mmpa libmmpa.so ${ASCEND_DRIVER_PATH})

View File

@ -164,7 +164,11 @@ if (ENABLE_D)
endif ()
set(ASCEND_DRIVER_PATH ${ASCEND_PATH}/driver/lib64/common)
set(ASCEND_DRIVER_BACK_PATH ${ASCEND_PATH}/driver/lib64/driver)
set(ASCEND_RUNTIME_PATH ${ASCEND_PATH}/fwkacllib/lib64)
if (DEFINED ENV{ASCEND_CUSTOM_FWK_PATH})
set(ASCEND_RUNTIME_PATH $ENV{ASCEND_CUSTOM_FWK_PATH}/fwkacllib/lib64)
else ()
set(ASCEND_RUNTIME_PATH ${ASCEND_PATH}/fwkacllib/lib64)
endif ()
endif()
MESSAGE("USE DAV LIB PATH: ${ASCEND_PATH}")