forked from mindspore-Ecosystem/mindspore
!43044 upgrade Ascend package 27 Sept on master
Merge pull request !43044 from ZPaC/upgrade_ascend_zpc
This commit is contained in:
commit
47d9ab4e04
|
@ -1 +1 @@
|
|||
Subproject commit b56450bde6d5afa1c557437ebf154487afe355f0
|
||||
Subproject commit 236001806129e36c0f48b240c4f61b2e1d92c470
|
|
@ -108,9 +108,8 @@ if(BUILD_LITE)
|
|||
target_link_libraries(mindspore_shared_lib PRIVATE $<TARGET_OBJECTS:_mindspore_transform_graph_ir_obj>)
|
||||
add_dependencies(mindspore_shared_lib _mindspore_transform_graph_ir_obj)
|
||||
elseif(MODE_ASCEND_ACL)
|
||||
target_link_libraries(mindspore_shared_lib PRIVATE $<TARGET_OBJECTS:_mindspore_transform_graph_ir_obj>
|
||||
$<TARGET_OBJECTS:_mindspore_backend_graph_compiler_obj>
|
||||
$<TARGET_OBJECTS:_mindspore_debug_obj> mindspore_backend_static)
|
||||
target_link_libraries(mindspore_shared_lib PRIVATE _mindspore_transform_graph_ir_obj
|
||||
_mindspore_backend_graph_compiler_obj _mindspore_debug_obj mindspore_backend_static)
|
||||
if(MS_BUILD_GRPC)
|
||||
target_link_libraries(mindspore_shared_lib PRIVATE mindspore::grpc++)
|
||||
endif()
|
||||
|
|
|
@ -380,7 +380,7 @@ class GeneralMode : public DistributedExecutionMode {
|
|||
~GeneralMode() = default;
|
||||
};
|
||||
|
||||
// The mode applied when AutoParallel feature is enabled.
|
||||
// The mode applied when AutoParallel/SemiAutoParallel feature is enabled.
|
||||
class ParallelMode : public DistributedExecutionMode {
|
||||
public:
|
||||
explicit ParallelMode(const FuncGraphPtr &func_graph, NodeLabels *node_labels, uint32_t rank_id,
|
||||
|
|
|
@ -17,8 +17,8 @@ function Run_Converter() {
|
|||
|
||||
# source ascend env
|
||||
export ASCEND_HOME=/usr/local/Ascend/latest
|
||||
export PATH=${ASCEND_HOME}/fwkacllib/ccec_compiler/bin:${PATH}
|
||||
export LD_LIBRARY_PATH=${ASCEND_HOME}/fwkacllib/lib64:${ASCEND_HOME}/driver/lib64:${LD_LIBRARY_PATH}
|
||||
export PATH=${ASCEND_HOME}/compiler/ccec_compiler/bin:${PATH}
|
||||
export LD_LIBRARY_PATH=${ASCEND_HOME}/lib64:${ASCEND_HOME}/../driver/lib64:${LD_LIBRARY_PATH}
|
||||
export ASCEND_OPP_PATH=${ASCEND_HOME}/opp
|
||||
export TBE_IMPL_PATH=${ASCEND_HOME}/opp/op_impl/built-in/ai_core/tbe
|
||||
export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH}
|
||||
|
|
|
@ -132,7 +132,7 @@ def __init_tune_env(job, need_ga):
|
|||
"No module named `auto_tune` or `schedule_search`. If you want tune your op's performance," \
|
||||
"please configure `auto_tune` or `schedule_search` related environment variables." \
|
||||
"Try to set the following environment variables:" \
|
||||
"export fwk_path=/usr/local/Ascend/fwkacllib" \
|
||||
"export fwk_path=/usr/local/Ascend/latest" \
|
||||
"export PYTHONPATH=${fwk_path}/python/site-packages:$PYTHONPATH" \
|
||||
"export PYTHONPATH=${fwk_path}/python/site-packages/auto_tune.egg/auto_tune:$PYTHONPATH" \
|
||||
"export PYTHONPATH=${fwk_path}/python/site-packages/schedule_search.egg:$PYTHONPATH"
|
||||
|
@ -239,6 +239,10 @@ def tbe_initialize(job: TbeJob):
|
|||
:param job:
|
||||
:return:
|
||||
"""
|
||||
if os.getenv("LD_PRELOAD"):
|
||||
os.environ["LD_PRELOAD"] = "libgomp.so.1:" + os.environ["LD_PRELOAD"]
|
||||
else:
|
||||
os.environ["LD_PRELOAD"] = "libgomp.so.1"
|
||||
os.environ["CONTEXT_MODELCOMPILING"] = "TRUE"
|
||||
soc_info = get_soc_info(job.content)
|
||||
res = te_set_version(*soc_info)
|
||||
|
|
|
@ -69,7 +69,7 @@ def check_deps_version(mindspore_version, supported_version):
|
|||
|
||||
except ImportError as e:
|
||||
logger.info("CheckFailed: ", e.args)
|
||||
logger.info("MindSpore relies on the 3 whl packages of \"te\", \"topi\" and \"hccl\" in the \"fwkacllib\" "
|
||||
logger.info("MindSpore relies on the 3 whl packages of \"te\", \"topi\" and \"hccl\" in the \"latest\" "
|
||||
"folder of the Ascend AI software package (Ascend Data Center Solution), please check whether they "
|
||||
"are installed correctly or not, reference to the match info on: https://www.mindspore.cn/install")
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ import sys
|
|||
import time
|
||||
import subprocess
|
||||
import glob
|
||||
from copy import deepcopy
|
||||
from pathlib import Path
|
||||
from abc import abstractmethod, ABCMeta
|
||||
from packaging import version
|
||||
|
@ -222,33 +223,33 @@ class AscendEnvChecker(EnvChecker):
|
|||
|
||||
def __init__(self):
|
||||
self.version = ["1.83"]
|
||||
atlas_nnae_version = "/usr/local/Ascend/nnae/latest/fwkacllib/version.info"
|
||||
atlas_toolkit_version = "/usr/local/Ascend/ascend-toolkit/latest/fwkacllib/version.info"
|
||||
hisi_fwk_version = "/usr/local/Ascend/latest/fwkacllib/version.info"
|
||||
atlas_nnae_version = "/usr/local/Ascend/nnae/latest/compiler/version.info"
|
||||
atlas_toolkit_version = "/usr/local/Ascend/ascend-toolkit/latest/compiler/version.info"
|
||||
hisi_fwk_version = "/usr/local/Ascend/latest/compiler/version.info"
|
||||
if os.path.exists(atlas_nnae_version):
|
||||
# atlas default path
|
||||
self.fwk_path = "/usr/local/Ascend/nnae/latest/fwkacllib"
|
||||
self.fwk_path = "/usr/local/Ascend/nnae/latest"
|
||||
self.op_impl_path = "/usr/local/Ascend/nnae/latest/opp/op_impl/built-in/ai_core/tbe"
|
||||
self.tbe_path = self.fwk_path + "/lib64"
|
||||
self.cce_path = self.fwk_path + "/ccec_compiler/bin"
|
||||
self.cce_path = self.fwk_path + "/compiler/ccec_compiler/bin"
|
||||
self.fwk_version = atlas_nnae_version
|
||||
self.op_path = "/usr/local/Ascend/nnae/latest/opp"
|
||||
self.aicpu_path = "/usr/local/Ascend/nnae/latest"
|
||||
elif os.path.exists(atlas_toolkit_version):
|
||||
# atlas default path
|
||||
self.fwk_path = "/usr/local/Ascend/ascend-toolkit/latest/fwkacllib"
|
||||
self.fwk_path = "/usr/local/Ascend/ascend-toolkit/latest"
|
||||
self.op_impl_path = "/usr/local/Ascend/ascend-toolkit/latest/opp/op_impl/built-in/ai_core/tbe"
|
||||
self.tbe_path = self.fwk_path + "/lib64"
|
||||
self.cce_path = self.fwk_path + "/ccec_compiler/bin"
|
||||
self.cce_path = self.fwk_path + "/compiler/ccec_compiler/bin"
|
||||
self.fwk_version = atlas_toolkit_version
|
||||
self.op_path = "/usr/local/Ascend/ascend-toolkit/latest/opp"
|
||||
self.aicpu_path = "/usr/local/Ascend/ascend-toolkit/latest"
|
||||
elif os.path.exists(hisi_fwk_version):
|
||||
# hisi default path
|
||||
self.fwk_path = "/usr/local/Ascend/latest/fwkacllib"
|
||||
self.fwk_path = "/usr/local/Ascend/latest"
|
||||
self.op_impl_path = "/usr/local/Ascend/latest/opp/op_impl/built-in/ai_core/tbe"
|
||||
self.tbe_path = self.fwk_path + "/lib64"
|
||||
self.cce_path = self.fwk_path + "/ccec_compiler/bin"
|
||||
self.cce_path = self.fwk_path + "/compiler/ccec_compiler/bin"
|
||||
self.fwk_version = hisi_fwk_version
|
||||
self.op_path = "/usr/local/Ascend/latest/opp"
|
||||
self.aicpu_path = "/usr/local/Ascend/latest"
|
||||
|
@ -270,9 +271,9 @@ class AscendEnvChecker(EnvChecker):
|
|||
self.ascend_aicpu_path = os.getenv("ASCEND_AICPU_PATH")
|
||||
|
||||
# check content
|
||||
self.path_check = "/fwkacllib/ccec_compiler/bin"
|
||||
self.path_check = "/compiler/ccec_compiler/bin"
|
||||
self.python_path_check = "opp/op_impl/built-in/ai_core/tbe"
|
||||
self.ld_lib_path_check_fwk = "/fwkacllib/lib64"
|
||||
self.ld_lib_path_check_fwk = "/lib64"
|
||||
self.ld_lib_path_check_addons = "/add-ons"
|
||||
self.ascend_opp_path_check = "/op"
|
||||
self.v = ""
|
||||
|
@ -324,9 +325,11 @@ class AscendEnvChecker(EnvChecker):
|
|||
return
|
||||
|
||||
try:
|
||||
origin_path = deepcopy(sys.path)
|
||||
import te # pylint: disable=unused-import
|
||||
# pylint: disable=broad-except
|
||||
except Exception:
|
||||
sys.path = deepcopy(origin_path)
|
||||
if Path(self.tbe_path).is_dir():
|
||||
if os.getenv('LD_LIBRARY_PATH'):
|
||||
os.environ['LD_LIBRARY_PATH'] = self.tbe_path + ":" + os.environ['LD_LIBRARY_PATH']
|
||||
|
|
|
@ -1 +1 @@
|
|||
1.9.0
|
||||
2.0.0
|
Loading…
Reference in New Issue