From d946b61a88e6e296d2d46c890d2f93d25f13d9ae Mon Sep 17 00:00:00 2001 From: yanghaoran Date: Tue, 21 Jul 2020 21:58:35 +0800 Subject: [PATCH] add environment variable ASCEND_CUSTOM_FWK_PATH to support specific ascend software structutres --- cmake/dependency_graphengine.cmake | 6 +++++- mindspore/ccsrc/CMakeLists.txt | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cmake/dependency_graphengine.cmake b/cmake/dependency_graphengine.cmake index 91a471d1f..21658cb1c 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 9409a3992..93e2adea6 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}") -- GitLab