Browse Source

self check

feature/build-system-rewrite
jiaorui 4 years ago
parent
commit
763f1ecf97
7 changed files with 9 additions and 2 deletions
  1. +1
    -1
      mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_kernel_runtime.cc
  2. +1
    -1
      mindspore/ccsrc/plugin/device/ascend/hal/hardware/ascend_device_context.cc
  3. +1
    -0
      mindspore/ccsrc/plugin/device/ascend/optimizer/ir_fusion/batchnormgrad_to_bninfergrad.cc
  4. +2
    -0
      mindspore/ccsrc/plugin/device/ascend/optimizer/ir_fusion/parameter_and_transop_fusion.cc
  5. +1
    -0
      mindspore/ccsrc/plugin/device/ascend/optimizer/ir_fusion/refresh_parameter_format.cc
  6. +1
    -0
      mindspore/ccsrc/plugin/device/ascend/optimizer/ir_fusion/reshape_transpose_fusion.cc
  7. +2
    -0
      mindspore/ccsrc/plugin/device/ascend/optimizer/ir_fusion/transposed_update_fusion.cc

+ 1
- 1
mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_kernel_runtime.cc View File

@@ -555,7 +555,7 @@ bool AscendKernelRuntime::LoadTask(const session::KernelGraph &graph) {
#ifdef ENABLE_DUMP_IR
mindspore::RDR::TriggerAll();
#endif
MS_LOG(EXCEPTION) << "Distribute Task Failed, error: " << e.what();
MS_LOG(EXCEPTION) << "Distribute Task Failed, \nerror msg: " << e.what();
}

#ifndef ENABLE_SECURITY


+ 1
- 1
mindspore/ccsrc/plugin/device/ascend/hal/hardware/ascend_device_context.cc View File

@@ -390,7 +390,7 @@ void AscendDeviceContext::PreprocessBeforeRunGraph(const KernelGraphPtr &graph)
}
} catch (const std::exception &e) {
ReportErrorMessage();
MS_LOG(EXCEPTION) << "Preprocess failed before run graph " << graph->graph_id() << ", error msg: " << e.what();
MS_LOG(EXCEPTION) << "Preprocess failed before run graph " << graph->graph_id() << ", \nerror msg: " << e.what();
}

PROF_END(preprocess_before_run_graph);


+ 1
- 0
mindspore/ccsrc/plugin/device/ascend/optimizer/ir_fusion/batchnormgrad_to_bninfergrad.cc View File

@@ -29,6 +29,7 @@ namespace {
CNodePtr CreateBNInferGrad(const FuncGraphPtr &graph, const CNodePtr &batchnormgrad, const AnfNodePtr &node) {
MS_EXCEPTION_IF_NULL(graph);
MS_EXCEPTION_IF_NULL(batchnormgrad);
MS_EXCEPTION_IF_NULL(node);
auto prim = std::make_shared<Primitive>(kBNInferGradOpName);
std::vector<AnfNodePtr> inputs = {NewValueNode(prim)};
constexpr size_t kDBatchMean = 1;


+ 2
- 0
mindspore/ccsrc/plugin/device/ascend/optimizer/ir_fusion/parameter_and_transop_fusion.cc View File

@@ -44,9 +44,11 @@ const AnfNodePtr ParamTransRoad(const FuncGraphPtr &func_graph, const AnfNodePtr
if (users.size() > 1 && !first_flag) {
return nullptr;
}
MS_EXCEPTION_IF_NULL(trans_road);
trans_road->push_back(cnode);
first_flag = false;
auto next_node = AnfAlgo::GetInputNode(cnode, 0);
MS_EXCEPTION_IF_NULL(next_node);
if (next_node->isa<Parameter>() || next_node->isa<ValueNode>()) {
return next_node;
}


+ 1
- 0
mindspore/ccsrc/plugin/device/ascend/optimizer/ir_fusion/refresh_parameter_format.cc View File

@@ -31,6 +31,7 @@ void DoRefresh(const CNodePtr &cnode) {
if (input_kernel_node->isa<Parameter>()) {
std::shared_ptr<kernel::KernelBuildInfo::KernelBuildInfoBuilder> builder =
std::make_shared<kernel::KernelBuildInfo::KernelBuildInfoBuilder>();
MS_EXCEPTION_IF_NULL(builder);
auto cnode_input_format = AnfAlgo::GetInputFormat(cnode, input_index);
auto kernel_node_format = AnfAlgo::GetOutputFormat(input_kernel_node, 0);
auto dtype = AnfAlgo::GetOutputDeviceDataType(input_kernel_node, 0);


+ 1
- 0
mindspore/ccsrc/plugin/device/ascend/optimizer/ir_fusion/reshape_transpose_fusion.cc View File

@@ -48,6 +48,7 @@ const BaseRef ReshapeTransposeFusion::DefinePattern() const {
const AnfNodePtr ReshapeTransposeFusion::Process(const FuncGraphPtr &func_graph, const AnfNodePtr &node,
const EquivPtr &equiv) const {
MS_EXCEPTION_IF_NULL(func_graph);
MS_EXCEPTION_IF_NULL(node);
MS_EXCEPTION_IF_NULL(equiv);
auto transpose_cnode = CheckAnfNodeIfCNodeAndInputSize(node, kBackendReshapeInputTensorNum);
MS_EXCEPTION_IF_NULL(transpose_cnode);


+ 2
- 0
mindspore/ccsrc/plugin/device/ascend/optimizer/ir_fusion/transposed_update_fusion.cc View File

@@ -97,10 +97,12 @@ const AnfNodePtr TransposedUpdateFusion::Process(const FuncGraphPtr &func_graph,
return nullptr;
}

MS_EXCEPTION_IF_NULL(kernel_select_);
kernel_select_->SelectKernel(transpose);
auto ori_build_info = AnfAlgo::GetSelectKernelBuildInfo(transpose);
MS_EXCEPTION_IF_NULL(ori_build_info);
auto builder = std::make_shared<kernel::KernelBuildInfo::KernelBuildInfoBuilder>(ori_build_info);
MS_EXCEPTION_IF_NULL(builder);
auto input_format = AnfAlgo::GetInputFormat(node, 0);
auto output_format = AnfAlgo::GetOutputFormat(node, 0);
builder->SetInputsFormat({input_format, kOpFormat_DEFAULT});


Loading…
Cancel
Save