diff --git a/cmake/dependency_graphengine.cmake b/cmake/dependency_graphengine.cmake index 91a471d1f26e2ef2b18d3c37a5a7052e2890202e..21658cb1c6c5d149b504ef94fcc58f4dcae8968a 100644 --- a/cmake/dependency_graphengine.cmake +++ b/cmake/dependency_graphengine.cmake @@ -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}) diff --git a/mindspore/ccsrc/CMakeLists.txt b/mindspore/ccsrc/CMakeLists.txt index 9409a399234a456a68fba94eba307d5757c7d955..93e2adea66cdf0c21dd6d0bbe382cb393fe338e3 100644 --- a/mindspore/ccsrc/CMakeLists.txt +++ b/mindspore/ccsrc/CMakeLists.txt @@ -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}")