forked from mindspore-Ecosystem/mindspore
upgrade_ascend_0604
This commit is contained in:
parent
f9d5a813e2
commit
171d09457f
|
@ -1 +1 @@
|
||||||
Subproject commit c5be7f3198ea2ffcd100303fd12c1a7943adb6f0
|
Subproject commit 3442c74c1e99f517a7816dc39b41ab85009672eb
|
|
@ -114,6 +114,8 @@ def _check_supported(kernel_info):
|
||||||
if op_name in ("resize_nearest_neighbor_v2_grad_d", "resize_bilinear_v2_grad"):
|
if op_name in ("resize_nearest_neighbor_v2_grad_d", "resize_bilinear_v2_grad"):
|
||||||
attrs_args.pop(-1)
|
attrs_args.pop(-1)
|
||||||
ret = op_func(*inputs_args, *outputs_args, *attrs_args, kernel_name=kernel_name)
|
ret = op_func(*inputs_args, *outputs_args, *attrs_args, kernel_name=kernel_name)
|
||||||
|
if isinstance(ret, tuple) and len(ret) == 2:
|
||||||
|
ret = ret[0]
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise TBEException(str(e))
|
raise TBEException(str(e))
|
||||||
|
|
|
@ -233,6 +233,7 @@ void TbeKernelJsonCreator::GenValidInputDescJson(const std::shared_ptr<AnfNode>
|
||||||
input_desc_json[kJShape] = shape;
|
input_desc_json[kJShape] = shape;
|
||||||
input_desc_json[kJFormat] = format;
|
input_desc_json[kJFormat] = format;
|
||||||
input_desc_json[kJValid] = value;
|
input_desc_json[kJValid] = value;
|
||||||
|
input_desc_json[kJAddrType] = 0;
|
||||||
input_desc_json[kJParamType] = input_ptr->param_type();
|
input_desc_json[kJParamType] = input_ptr->param_type();
|
||||||
input_desc_json[kJRange] = tbe::TbeDynamicShapeUtil::GetInputDynamicRange(anf_node, real_input_index);
|
input_desc_json[kJRange] = tbe::TbeDynamicShapeUtil::GetInputDynamicRange(anf_node, real_input_index);
|
||||||
input_list->emplace_back(input_desc_json);
|
input_list->emplace_back(input_desc_json);
|
||||||
|
@ -463,6 +464,7 @@ void TbeKernelJsonCreator::GenOutputList(const std::shared_ptr<AnfNode> &anf_nod
|
||||||
output_obj[kJOriFormat] = def_format;
|
output_obj[kJOriFormat] = def_format;
|
||||||
output_obj[kJName] = output_ptr->name();
|
output_obj[kJName] = output_ptr->name();
|
||||||
output_obj[kJValid] = true;
|
output_obj[kJValid] = true;
|
||||||
|
output_obj[kJAddrType] = 0;
|
||||||
output_obj[kJParamType] = output_ptr->param_type();
|
output_obj[kJParamType] = output_ptr->param_type();
|
||||||
output_obj[kJRange] = tbe::TbeDynamicShapeUtil::GetOutputDynamicRange(anf_node, *output_idx);
|
output_obj[kJRange] = tbe::TbeDynamicShapeUtil::GetOutputDynamicRange(anf_node, *output_idx);
|
||||||
output_list->emplace_back(output_obj);
|
output_list->emplace_back(output_obj);
|
||||||
|
@ -945,6 +947,7 @@ void TbeKernelBuild::GenDescJson(const std::shared_ptr<mindspore::AnfNode> &anf_
|
||||||
ori_shape.emplace_back(1);
|
ori_shape.emplace_back(1);
|
||||||
}
|
}
|
||||||
(*output_desc)[kJOriShape] = ori_shape;
|
(*output_desc)[kJOriShape] = ori_shape;
|
||||||
|
(*output_desc)[kJAddrType] = 0;
|
||||||
// !! Note: output_index, only node's output use it
|
// !! Note: output_index, only node's output use it
|
||||||
(*output_desc)[kJOutputIndex] = desc_output_idx;
|
(*output_desc)[kJOutputIndex] = desc_output_idx;
|
||||||
// shape
|
// shape
|
||||||
|
|
|
@ -8,8 +8,10 @@ file(GLOB_RECURSE API_OPS_SRC ${CMAKE_CURRENT_SOURCE_DIR} "ops/*.cc")
|
||||||
if(ENABLE_D OR ENABLE_ACL)
|
if(ENABLE_D OR ENABLE_ACL)
|
||||||
# build 910 and 310 code into one distro, files needed for 310 mode
|
# build 910 and 310 code into one distro, files needed for 310 mode
|
||||||
add_compile_definitions(ENABLE_ACL)
|
add_compile_definitions(ENABLE_ACL)
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/graphengine/ge)
|
include_directories(${CMAKE_SOURCE_DIR}/graphengine/ge
|
||||||
include_directories(${CMAKE_BINARY_DIR}/proto/ge)
|
${CMAKE_BINARY_DIR}/proto/graphengine_protos
|
||||||
|
${CMAKE_BINARY_DIR}/proto/metadef_protos
|
||||||
|
)
|
||||||
file(GLOB_RECURSE API_ACL_SRC ${CMAKE_CURRENT_SOURCE_DIR}
|
file(GLOB_RECURSE API_ACL_SRC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
"akg_kernel_register.cc"
|
"akg_kernel_register.cc"
|
||||||
"model/acl/*.cc"
|
"model/acl/*.cc"
|
||||||
|
|
|
@ -82,6 +82,9 @@ add_library(_mindspore_runtime_device_obj OBJECT ${DEVICE_SRC_LIST} ${D_SRC_LIST
|
||||||
if(ENABLE_D)
|
if(ENABLE_D)
|
||||||
file(GLOB_RECURSE GE_SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "ascend/ge_runtime/*.cc")
|
file(GLOB_RECURSE GE_SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "ascend/ge_runtime/*.cc")
|
||||||
set_property(SOURCE ${GE_SRC_LIST} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_GE)
|
set_property(SOURCE ${GE_SRC_LIST} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_GE)
|
||||||
target_include_directories(_mindspore_runtime_device_obj PRIVATE ${CMAKE_BINARY_DIR}/proto/ge)
|
target_include_directories(_mindspore_runtime_device_obj PRIVATE
|
||||||
|
${CMAKE_BINARY_DIR}/proto/graphengine_protos
|
||||||
|
${CMAKE_BINARY_DIR}/proto/metadef_protos
|
||||||
|
)
|
||||||
add_dependencies(_mindspore_runtime_device_obj graph)
|
add_dependencies(_mindspore_runtime_device_obj graph)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -200,10 +200,25 @@ static bool IsAtomicNode(const CNodePtr &kernel_node) {
|
||||||
size_t param_num = parameters_indexs.size();
|
size_t param_num = parameters_indexs.size();
|
||||||
size_t total_num = input_num + workspace_num + output_num;
|
size_t total_num = input_num + workspace_num + output_num;
|
||||||
size_t pad_index = param_num;
|
size_t pad_index = param_num;
|
||||||
|
|
||||||
|
if (AnfAlgo::IsDynamicShape(kernel_node)) {
|
||||||
|
parameters_indexs.pop_back();
|
||||||
|
}
|
||||||
for (; pad_index < total_num; ++pad_index) {
|
for (; pad_index < total_num; ++pad_index) {
|
||||||
parameters_indexs.emplace_back(0);
|
parameters_indexs.emplace_back(0);
|
||||||
}
|
}
|
||||||
// process input
|
// process input
|
||||||
|
auto op_info = kernel::OpLib::FindOp(AnfAlgo::GetCNodeName(kernel_node), kernel::OpImplyType::kTBE,
|
||||||
|
AnfAlgo::IsDynamicShape(kernel_node));
|
||||||
|
if (op_info != nullptr) {
|
||||||
|
const auto &ref_infos = op_info->ref_infos();
|
||||||
|
for (auto [out, in] : ref_infos) {
|
||||||
|
if (parameters_indexs[in] == 1) {
|
||||||
|
parameters_indexs[in] = 0;
|
||||||
|
parameters_indexs[input_num + workspace_num + out] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
for (size_t j = 0; j < input_num; ++j) {
|
for (size_t j = 0; j < input_num; ++j) {
|
||||||
if (parameters_indexs.at(j) == 1) {
|
if (parameters_indexs.at(j) == 1) {
|
||||||
MS_LOG(EXCEPTION) << "Atomic addr clean doesn't support clean input address, input index: " << j;
|
MS_LOG(EXCEPTION) << "Atomic addr clean doesn't support clean input address, input index: " << j;
|
||||||
|
|
|
@ -3,7 +3,10 @@ set_property(SOURCE ${HCCL_ADAPTER_SRC_LIST} PROPERTY COMPILE_DEFINITIONS
|
||||||
SUBMODULE_ID=mindspore::SubModuleId::SM_HCCL_ADPT)
|
SUBMODULE_ID=mindspore::SubModuleId::SM_HCCL_ADPT)
|
||||||
if(ENABLE_D)
|
if(ENABLE_D)
|
||||||
add_library(_mindspore_runtime_hccl_adapter_obj OBJECT ${HCCL_ADAPTER_SRC_LIST})
|
add_library(_mindspore_runtime_hccl_adapter_obj OBJECT ${HCCL_ADAPTER_SRC_LIST})
|
||||||
target_include_directories(_mindspore_runtime_hccl_adapter_obj PRIVATE ${CMAKE_BINARY_DIR}/proto/ge)
|
target_include_directories(_mindspore_runtime_hccl_adapter_obj PRIVATE
|
||||||
|
${CMAKE_BINARY_DIR}/proto/graphengine_protos
|
||||||
|
${CMAKE_BINARY_DIR}/proto/metadef_protos
|
||||||
|
)
|
||||||
add_dependencies(_mindspore_runtime_hccl_adapter_obj graph)
|
add_dependencies(_mindspore_runtime_hccl_adapter_obj graph)
|
||||||
add_subdirectory(plugin)
|
add_subdirectory(plugin)
|
||||||
endif()
|
endif()
|
|
@ -1,5 +1,8 @@
|
||||||
add_library(hccl_plugin SHARED hccl_plugin.cc)
|
add_library(hccl_plugin SHARED hccl_plugin.cc)
|
||||||
target_include_directories(hccl_plugin PRIVATE ${CMAKE_BINARY_DIR}/proto/ge)
|
target_include_directories(hccl_plugin PRIVATE
|
||||||
|
${CMAKE_BINARY_DIR}/proto/graphengine_protos
|
||||||
|
${CMAKE_BINARY_DIR}/proto/metadef_protos
|
||||||
|
)
|
||||||
add_dependencies(hccl_plugin graph)
|
add_dependencies(hccl_plugin graph)
|
||||||
|
|
||||||
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/nnae/latest/fwkacllib/lib64)
|
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/nnae/latest/fwkacllib/lib64)
|
||||||
|
|
|
@ -206,7 +206,7 @@ class AscendEnvChecker(EnvChecker):
|
||||||
"""ascend environment check"""
|
"""ascend environment check"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.version = ["1.78.T13.0.B130"]
|
self.version = ["1.78.T21.0.B210"]
|
||||||
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"
|
||||||
|
|
|
@ -25,7 +25,8 @@ include_directories(${CMAKE_SOURCE_DIR}/mindspore/core/mindrt/src)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/stub/runtime/)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/stub/runtime/)
|
||||||
include_directories(${CMAKE_BINARY_DIR})
|
include_directories(${CMAKE_BINARY_DIR})
|
||||||
include_directories(${CMAKE_BINARY_DIR}/proto/ge)
|
include_directories(${CMAKE_BINARY_DIR}/proto/graphengine_protos)
|
||||||
|
include_directories(${CMAKE_BINARY_DIR}/proto/metadef_protos)
|
||||||
include_directories(${CUDA_INCLUDE_DIRS})
|
include_directories(${CUDA_INCLUDE_DIRS})
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/mindspore/ccsrc/backend/kernel_compiler/cpu)
|
include_directories(${CMAKE_SOURCE_DIR}/mindspore/ccsrc/backend/kernel_compiler/cpu)
|
||||||
MESSAGE("check ut_test ${CMAKE_BINARY_DIR}")
|
MESSAGE("check ut_test ${CMAKE_BINARY_DIR}")
|
||||||
|
|
Loading…
Reference in New Issue