upgrade Ascend packages 26 Aug 21

This commit is contained in:
yanghaoran 2021-08-25 10:23:36 +08:00
parent 785e5fe6fd
commit 5e4f5b6c95
16 changed files with 27 additions and 26 deletions

@ -1 +1 @@
Subproject commit 91db15bf51c190329c439d55978769fe23d3abc5 Subproject commit 46b34ffdfd7ed41240e6a1ff74abb9a7e540a653

View File

@ -25,14 +25,14 @@ from te.platform.cce_policy import set_L1_info
from te_fusion.compile_task_manager import dispatch_prebuild_task, dispatch_single_op_compile_task, import_py_module, \ from te_fusion.compile_task_manager import dispatch_prebuild_task, dispatch_single_op_compile_task, import_py_module, \
dispatch_fusion_op_compile_task, dispatch_autotune_task, sync_op_tune_params dispatch_fusion_op_compile_task, dispatch_autotune_task, sync_op_tune_params
from te_fusion.compile_task_manager import sync_syspath from te_fusion.compile_task_manager import sync_syspath
from te_fusion.fusion_manager import check_supported, call_op_func, clear_fusion_params, check_op_impl_mode, \ from te_fusion.fusion_manager import call_op_func, clear_fusion_params, check_op_impl_mode, \
save_op_params, build_single_op_from_c, op_params_to_json save_op_params, build_single_op_from_c, op_params_to_json
from te_fusion.fusion_util import dump_fusion_json, fusion_op from te_fusion.fusion_util import dump_fusion_json, fusion_op
from te_fusion.parallel_compilation import init_multi_process_env, start_ga_multi_process, deinit_multi_process_env, \ from te_fusion.parallel_compilation import init_multi_process_env, start_ga_multi_process, deinit_multi_process_env, \
get_finished_compilation_task get_finished_compilation_task
from .tbe_helper import get_soc_info, assemble_op_args, get_compute_op_list, get_options_info, get_fuzz_build_info, \ from .tbe_helper import get_soc_info, assemble_op_args, get_compute_op_list, get_options_info, get_fuzz_build_info, \
BuildType, adjust_custom_op_info, pack_op_args, get_module_name adjust_custom_op_info, pack_op_args, get_module_name
from .tbe_job import TbeJob, JobStatus from .tbe_job import TbeJob, JobStatus
PLATFORM_FLAG = ["Ascend310", "Ascend910", "Hi3796CV300ES", "Ascend710", "Ascend610", "Hi3796CV300CS", "SD3403"] PLATFORM_FLAG = ["Ascend310", "Ascend910", "Hi3796CV300ES", "Ascend710", "Ascend610", "Hi3796CV300CS", "SD3403"]
@ -246,8 +246,7 @@ def check_support(job: TbeJob):
py_module_path = compute_op_info["py_module_path"] py_module_path = compute_op_info["py_module_path"]
_normalize_module_name(op_module_name, py_module_path) _normalize_module_name(op_module_name, py_module_path)
func_name = "check_supported" func_name = "check_supported"
fuzz_build = compute_op_info["build_type"] == BuildType.FUZZILY.value res = call_op_func((inputs, outputs, attrs), op_module_name, func_name)
res = check_supported(op_module_name, func_name, (inputs, outputs, attrs, fuzz_build))
if isinstance(res, tuple): if isinstance(res, tuple):
result, reason = res result, reason = res
result_str = str(result) result_str = str(result)
@ -285,7 +284,7 @@ def select_op_format(job: TbeJob):
py_module_path = compute_op_info["py_module_path"] py_module_path = compute_op_info["py_module_path"]
_normalize_module_name(op_module_name, py_module_path) _normalize_module_name(op_module_name, py_module_path)
op_func_name = "op_select_format" op_func_name = "op_select_format"
res = call_op_func(op_module_name, op_func_name, (inputs, outputs, attrs)) res = call_op_func((inputs, outputs, attrs), op_module_name, op_func_name)
job.result = str(res) job.result = str(res)
return True return True

View File

@ -299,12 +299,13 @@ if(MODE_ASCEND_ALL)
${ASCEND_DRIVER_BACK_PATH}) ${ASCEND_DRIVER_BACK_PATH})
find_library(PROFILING msprofiler ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH}) find_library(PROFILING msprofiler ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(ACL ascendcl ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH}) find_library(ACL ascendcl ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(ACL_TDT_CHANNEL acl_tdt_channel ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(PLATFORM platform ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH}) find_library(PLATFORM platform ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(OPTILING optiling ${ASCEND_OPP_PATH} ${ASCEND_TOOLKIT_OPP_PATH}) find_library(OPTILING optiling ${ASCEND_OPP_PATH} ${ASCEND_TOOLKIT_OPP_PATH})
find_library(OPT_FEATURE opt_feature ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH}) find_library(OPT_FEATURE opt_feature ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
target_link_libraries(mindspore ${RUNTIME_LIB} ${TSDCLIENT} ${DATATRANSFER} ${ERROR_MANAGER} -Wl,--no-as-needed target_link_libraries(mindspore ${RUNTIME_LIB} ${TSDCLIENT} ${DATATRANSFER} ${ERROR_MANAGER} -Wl,--no-as-needed
${OPTILING} ${PLATFORM} ${ACL} ${OPT_FEATURE} ${PROFILING}) ${OPTILING} ${PLATFORM} ${ACL} ${ACL_TDT_CHANNEL} ${OPT_FEATURE} ${PROFILING})
target_link_libraries(mindspore -Wl,--start-group proto_input mindspore::protobuf -Wl,--end-group) target_link_libraries(mindspore -Wl,--start-group proto_input mindspore::protobuf -Wl,--end-group)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
target_link_libraries(mindspore -Wl,--start-group proto_input mindspore::protobuf mindspore::sentencepiece target_link_libraries(mindspore -Wl,--start-group proto_input mindspore::protobuf mindspore::sentencepiece

View File

@ -17,7 +17,7 @@
#include "backend/kernel_compiler/rts/label_goto.h" #include "backend/kernel_compiler/rts/label_goto.h"
#include <memory> #include <memory>
#include "runtime/stream.h" #include "runtime/stream.h"
#include "framework/ge_runtime/task_info.h" #include "runtime/device/ascend/ge_runtime/task_info.h"
#include "backend/session/anf_runtime_algorithm.h" #include "backend/session/anf_runtime_algorithm.h"
using mindspore::ge::model_runner::LabelGotoTaskInfo; using mindspore::ge::model_runner::LabelGotoTaskInfo;

View File

@ -17,7 +17,7 @@
#include "backend/kernel_compiler/rts/label_set.h" #include "backend/kernel_compiler/rts/label_set.h"
#include <memory> #include <memory>
#include "runtime/stream.h" #include "runtime/stream.h"
#include "framework/ge_runtime/task_info.h" #include "runtime/device/ascend/ge_runtime/task_info.h"
#include "backend/session/anf_runtime_algorithm.h" #include "backend/session/anf_runtime_algorithm.h"
using mindspore::ge::model_runner::LabelSetTaskInfo; using mindspore::ge::model_runner::LabelSetTaskInfo;

View File

@ -18,7 +18,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "runtime/stream.h" #include "runtime/stream.h"
#include "framework/ge_runtime/task_info.h" #include "runtime/device/ascend/ge_runtime/task_info.h"
#include "backend/session/anf_runtime_algorithm.h" #include "backend/session/anf_runtime_algorithm.h"
using mindspore::ge::model_runner::LabelSwitchTaskInfo; using mindspore::ge::model_runner::LabelSwitchTaskInfo;
@ -72,8 +72,8 @@ std::vector<TaskInfoPtr> LabelSwitchKernel::GenTask(const std::vector<AddressPtr
std::vector<std::shared_ptr<kernel::KernelBuildInfo>> LabelSwitchDesc::GetKernelInfo() { std::vector<std::shared_ptr<kernel::KernelBuildInfo>> LabelSwitchDesc::GetKernelInfo() {
std::vector<std::shared_ptr<kernel::KernelBuildInfo>> label_switch_build_info{}; std::vector<std::shared_ptr<kernel::KernelBuildInfo>> label_switch_build_info{};
vector<string> input_format{kOpFormat_DEFAULT}; std::vector<string> input_format{kOpFormat_DEFAULT};
vector<TypeId> input_type{kNumberTypeInt32}; std::vector<TypeId> input_type{kNumberTypeInt32};
if (input_format.size() != input_type.size()) { if (input_format.size() != input_type.size()) {
MS_LOG(EXCEPTION) << "Invalid param num, input_format size " << input_format.size() << " input_type size " MS_LOG(EXCEPTION) << "Invalid param num, input_format size " << input_format.size() << " input_type size "
<< input_type.size(); << input_type.size();

View File

@ -18,7 +18,7 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include <memory> #include <memory>
#include "framework/ge_runtime/task_info.h" #include "runtime/device/ascend/ge_runtime/task_info.h"
#include "runtime/device/ascend/profiling/profiling_utils.h" #include "runtime/device/ascend/profiling/profiling_utils.h"
#include "backend/session/anf_runtime_algorithm.h" #include "backend/session/anf_runtime_algorithm.h"
#include "runtime/device/ascend/executor/rts/profiling_rts_dynamic_kernel.h" #include "runtime/device/ascend/executor/rts/profiling_rts_dynamic_kernel.h"

View File

@ -18,7 +18,7 @@
#include <memory> #include <memory>
#include "runtime/stream.h" #include "runtime/stream.h"
#include "utils/ms_context.h" #include "utils/ms_context.h"
#include "framework/ge_runtime/task_info.h" #include "runtime/device/ascend/ge_runtime/task_info.h"
#include "backend/session/anf_runtime_algorithm.h" #include "backend/session/anf_runtime_algorithm.h"
namespace mindspore { namespace mindspore {

View File

@ -17,7 +17,7 @@
#include "backend/kernel_compiler/rts/send.h" #include "backend/kernel_compiler/rts/send.h"
#include <memory> #include <memory>
#include "runtime/event.h" #include "runtime/event.h"
#include "framework/ge_runtime/task_info.h" #include "runtime/device/ascend/ge_runtime/task_info.h"
#include "backend/session/anf_runtime_algorithm.h" #include "backend/session/anf_runtime_algorithm.h"
using mindspore::ge::model_runner::EventRecordTaskInfo; using mindspore::ge::model_runner::EventRecordTaskInfo;

View File

@ -17,7 +17,7 @@
#include "backend/kernel_compiler/rts/stream_active.h" #include "backend/kernel_compiler/rts/stream_active.h"
#include <memory> #include <memory>
#include "runtime/stream.h" #include "runtime/stream.h"
#include "framework/ge_runtime/task_info.h" #include "runtime/device/ascend/ge_runtime/task_info.h"
#include "backend/session/anf_runtime_algorithm.h" #include "backend/session/anf_runtime_algorithm.h"
using mindspore::ge::model_runner::StreamActiveTaskInfo; using mindspore::ge::model_runner::StreamActiveTaskInfo;

View File

@ -18,7 +18,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "runtime/stream.h" #include "runtime/stream.h"
#include "framework/ge_runtime/task_info.h" #include "runtime/device/ascend/ge_runtime/task_info.h"
#include "backend/session/anf_runtime_algorithm.h" #include "backend/session/anf_runtime_algorithm.h"
using mindspore::ge::model_runner::StreamSwitchTaskInfo; using mindspore::ge::model_runner::StreamSwitchTaskInfo;

View File

@ -18,7 +18,7 @@
#include <algorithm> #include <algorithm>
#include "runtime/rt.h" #include "runtime/rt.h"
#include "utils/ms_context.h" #include "utils/ms_context.h"
#include "graphengine/inc/framework/ge_runtime/task_info.h" #include "runtime/device/ascend/ge_runtime/task_info.h"
#include "runtime/device/ascend/executor/ai_core_dynamic_kernel.h" #include "runtime/device/ascend/executor/ai_core_dynamic_kernel.h"
#include "runtime/device/kernel_runtime.h" #include "runtime/device/kernel_runtime.h"

View File

@ -82,7 +82,7 @@ if(ENABLE_D OR ENABLE_ACL)
find_library(acl_cblas libacl_cblas.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH}) find_library(acl_cblas libacl_cblas.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(acl_dvpp libacl_dvpp.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH}) find_library(acl_dvpp libacl_dvpp.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(acl_runtime libruntime.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH}) find_library(acl_runtime libruntime.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(ge_runner libge_runner.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH}) find_library(ge_compiler libge_compiler.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(libplatform libplatform.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH}) find_library(libplatform libplatform.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(libcompress libcompress.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH}) find_library(libcompress libcompress.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(libopskernel libopskernel.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH}) find_library(libopskernel libopskernel.so ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})

View File

@ -289,7 +289,7 @@ if(ENABLE_GPUQUE)
endif() endif()
if(ENABLE_TDTQUE) if(ENABLE_TDTQUE)
target_link_libraries(_c_dataengine PRIVATE ${ACL}) target_link_libraries(_c_dataengine PRIVATE ${ACL} ${ACL_TDT_CHANNEL})
endif() endif()
add_dependencies(_c_dataengine _c_mindrecord) add_dependencies(_c_dataengine _c_mindrecord)

View File

@ -48,22 +48,22 @@ def check_deps_version(mindspore_version, supported_version):
""" """
try: try:
from hccl import sys_version as hccl_version from hccl import sys_version as hccl_version
v = hccl_version.__sys_version__ v = '.'.join(hccl_version.__sys_version__.split('.')[0:2])
if v not in supported_version: if v not in supported_version:
print(f"MindSpore version {mindspore_version} and \"hccl\" wheel package version {v} does not " print(f"MindSpore version {mindspore_version} and \"hccl\" wheel package version {v} does not "
"match, reference to the match info on: https://www.mindspore.cn/install") "match, reference to the match info on: https://www.mindspore.cn/install")
import te import te
v = te.__version__ v = '.'.join(te.__version__.split('.')[0:2])
if v not in supported_version: if v not in supported_version:
print(f"MindSpore version {mindspore_version} and \"te\" wheel package version {v} does not " print(f"MindSpore version {mindspore_version} and \"te\" wheel package version {v} does not "
"match, reference to the match info on: https://www.mindspore.cn/install") "match, reference to the match info on: https://www.mindspore.cn/install")
import topi import topi
v = topi.__version__ v = '.'.join(topi.__version__.split('.')[0:2])
if v not in supported_version: if v not in supported_version:
print(f"MindSpore version {mindspore_version} and \"topi\" wheel package version {v} does not " print(f"MindSpore version {mindspore_version} and \"topi\" wheel package version {v} does not "
"match, reference to the match info on: https://www.mindspore.cn/install") "match, reference to the match info on: https://www.mindspore.cn/install")
except Exception as e: except ImportError as e:
print("CheckFailed: ", e.args) print("CheckFailed: ", e.args)
print("Minspore relies on the 3 whl packages of \"te\", \"topi\" and \"hccl\" in the \"fwkacllib\" " print("Minspore relies on the 3 whl packages of \"te\", \"topi\" and \"hccl\" in the \"fwkacllib\" "
"folder of the Ascend 910 AI software package, please check whether they are installed " "folder of the Ascend 910 AI software package, please check whether they are installed "

View File

@ -207,7 +207,7 @@ class AscendEnvChecker(EnvChecker):
"""ascend environment check""" """ascend environment check"""
def __init__(self): def __init__(self):
self.version = ["1.79.T15.0.B150"] self.version = ["1.79"]
atlas_nnae_version = "/usr/local/Ascend/nnae/latest/fwkacllib/version.info" atlas_nnae_version = "/usr/local/Ascend/nnae/latest/fwkacllib/version.info"
atlas_toolkit_version = "/usr/local/Ascend/ascend-toolkit/latest/fwkacllib/version.info" atlas_toolkit_version = "/usr/local/Ascend/ascend-toolkit/latest/fwkacllib/version.info"
hisi_fwk_version = "/usr/local/Ascend/fwkacllib/version.info" hisi_fwk_version = "/usr/local/Ascend/fwkacllib/version.info"
@ -380,7 +380,8 @@ class AscendEnvChecker(EnvChecker):
all_info = f.readlines() all_info = f.readlines()
for line in all_info: for line in all_info:
if line.startswith("Version="): if line.startswith("Version="):
self.v = line.strip().split("=")[1] full_Version = line.strip().split("=")[1]
self.v = '.'.join(full_Version.split('.')[0:2])
return self.v return self.v
return self.v return self.v