Browse Source

!517 static check

From: @selfws
Reviewed-by: @xchu42,@ji_chen
Signed-off-by: @ji_chen
tags/v1.2.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
368931a59f
12 changed files with 6 additions and 15 deletions
  1. +0
    -1
      ge/common/formats/format_transfers/format_transfer_nchw_fz_c04.cc
  2. +2
    -2
      ge/graph/build/graph_builder.cc
  3. +0
    -1
      ge/graph/label/case_label_maker.h
  4. +0
    -1
      ge/graph/label/if_label_maker.h
  5. +0
    -1
      ge/graph/label/partitioned_call_label_maker.h
  6. +0
    -1
      ge/graph/label/while_label_maker.h
  7. +0
    -2
      ge/graph/manager/graph_manager.cc
  8. +0
    -1
      ge/graph/passes/ctrl_edge_transfer_pass.cc
  9. +2
    -2
      ge/graph/passes/switch_to_stream_switch_pass.h
  10. +0
    -1
      ge/graph/passes/variable_op_pass_bak.cc
  11. +1
    -1
      ge/host_kernels/concat_v2_kernel.cc
  12. +1
    -1
      ge/hybrid/node_executor/aicore/aicore_node_executor.h

+ 0
- 1
ge/common/formats/format_transfers/format_transfer_nchw_fz_c04.cc View File

@@ -35,7 +35,6 @@
* Padding to (N, ceil(Z/16)*16) * Padding to (N, ceil(Z/16)*16)
* Last Step: View the (N, ceil(Z/16)*16) as 4D (N/16, 16, C/16, 16) and transpose to (C/16, N/16, 16, 16) * Last Step: View the (N, ceil(Z/16)*16) as 4D (N/16, 16, C/16, 16) and transpose to (C/16, N/16, 16, 16)
*/ */

namespace ge { namespace ge {
namespace formats { namespace formats {
namespace { namespace {


+ 2
- 2
ge/graph/build/graph_builder.cc View File

@@ -424,7 +424,7 @@ Status GraphBuilder::GetTaskInfo(const ge::ModelBuilder &builder, const ModelPtr
} }


Status GraphBuilder::SetInputSize(const ge::NodePtr &node_ptr) { Status GraphBuilder::SetInputSize(const ge::NodePtr &node_ptr) {
// set input_desc.size = src_node.output_desc.size
// Set the size of input_desc to 'src_node.output_desc.size'
if (node_ptr->GetType() == DATA) { if (node_ptr->GetType() == DATA) {
bool is_unknown_shape = false; bool is_unknown_shape = false;
GE_CHK_STATUS_RET(ge::NodeUtils::GetNodeUnknownShapeStatus(*node_ptr, is_unknown_shape), GE_CHK_STATUS_RET(ge::NodeUtils::GetNodeUnknownShapeStatus(*node_ptr, is_unknown_shape),
@@ -447,7 +447,7 @@ Status GraphBuilder::SetInputSize(const ge::NodePtr &node_ptr) {
GE_IF_BOOL_EXEC(src_op == nullptr, continue); GE_IF_BOOL_EXEC(src_op == nullptr, continue);
auto node_op_desc = node_ptr->GetOpDesc(); auto node_op_desc = node_ptr->GetOpDesc();
GE_IF_BOOL_EXEC(node_op_desc == nullptr, continue); GE_IF_BOOL_EXEC(node_op_desc == nullptr, continue);
// set dst_node.input_desc = src_node.output_desc
// Set the input_desc of dst_node to 'src_node.output_desc'
auto output_desc = src_op->GetOutputDescPtr(peer_out_anchor->GetIdx()); auto output_desc = src_op->GetOutputDescPtr(peer_out_anchor->GetIdx());
int64_t size = 0; int64_t size = 0;
GE_IF_BOOL_EXEC(ge::TensorUtils::GetSize(*output_desc, size) != SUCCESS, GELOGI("Get size failed!")); GE_IF_BOOL_EXEC(ge::TensorUtils::GetSize(*output_desc, size) != SUCCESS, GELOGI("Get size failed!"));


+ 0
- 1
ge/graph/label/case_label_maker.h View File

@@ -86,7 +86,6 @@
| Node | | Node |
+------------+ +------------+
*******************************************************************************/ *******************************************************************************/

namespace ge { namespace ge {
class CaseOpLabelMaker : public LabelMaker { class CaseOpLabelMaker : public LabelMaker {
public: public:


+ 0
- 1
ge/graph/label/if_label_maker.h View File

@@ -70,7 +70,6 @@
| Node | | Node |
+------------+ +------------+
*******************************************************************************/ *******************************************************************************/

namespace ge { namespace ge {
class IfOpLabelMaker : public LabelMaker { class IfOpLabelMaker : public LabelMaker {
public: public:


+ 0
- 1
ge/graph/label/partitioned_call_label_maker.h View File

@@ -54,7 +54,6 @@
| c | | c |
+---------------+ +---------------+
*******************************************************************************/ *******************************************************************************/

namespace ge { namespace ge {
class PartitionedCallLabelMaker : public LabelMaker { class PartitionedCallLabelMaker : public LabelMaker {
public: public:


+ 0
- 1
ge/graph/label/while_label_maker.h View File

@@ -70,7 +70,6 @@
| Node | | Node |
+------------+ +------------+
*******************************************************************************/ *******************************************************************************/

namespace ge { namespace ge {
class WhileOpLabelMaker : public LabelMaker { class WhileOpLabelMaker : public LabelMaker {
public: public:


+ 0
- 2
ge/graph/manager/graph_manager.cc View File

@@ -2688,9 +2688,7 @@ void GraphManager::PreRunThread(GraphManager *graph_manager) {
} }


// it will not execute graph preprocess, optimize, parition, build if the graph has built successful. // it will not execute graph preprocess, optimize, parition, build if the graph has built successful.

GELOGI("Start for run graph async."); GELOGI("Start for run graph async.");

GeRootModelPtr ge_root_model = nullptr; GeRootModelPtr ge_root_model = nullptr;
if (graph_manager->IsGraphNeedBuild(graph_node)) { if (graph_manager->IsGraphNeedBuild(graph_node)) {
if (graph_node->GetBuildFlag()) { if (graph_node->GetBuildFlag()) {


+ 0
- 1
ge/graph/passes/ctrl_edge_transfer_pass.cc View File

@@ -38,7 +38,6 @@ namespace ge {
* \ / * \ /
* B * B
*/ */

Status CtrlEdgeTransferPass::Run(ge::ComputeGraphPtr graph) { Status CtrlEdgeTransferPass::Run(ge::ComputeGraphPtr graph) {
GELOGD("CtrlEdgeTransferPass start running"); GELOGD("CtrlEdgeTransferPass start running");
GE_CHECK_NOTNULL(graph); GE_CHECK_NOTNULL(graph);


+ 2
- 2
ge/graph/passes/switch_to_stream_switch_pass.h View File

@@ -42,9 +42,9 @@ namespace ge {
+-----------+ +-----------+ +-----------+ +-----------+
| Const | | VariableV2| | Const | | VariableV2|
+-----------+ +-----------+ +-----------+ +-----------+
*/


/* Switch branch op optimize, Switches in same case merge to one StreamSwitch, update following nodes' input

Switch branch op optimize, Switches in same case merge to one StreamSwitch, update following nodes' input


+-----------+ +-----------+
/ | task2 | \ / | task2 | \


+ 0
- 1
ge/graph/passes/variable_op_pass_bak.cc View File

@@ -252,7 +252,6 @@ Status VariableOpPass::RenewTransRoadDesc(const NodePtr &var, VarTransRoad &fusi
// case 2: suppose input format of transdata not equal with out format // case 2: suppose input format of transdata not equal with out format
// and input format not equal with var // and input format not equal with var
// so we make input format equal with var // so we make input format equal with var

for (auto &cur_trans : fusion_road) { for (auto &cur_trans : fusion_road) {
if (cur_trans.input.GetFormat() == cur_trans.output.GetFormat()) { if (cur_trans.input.GetFormat() == cur_trans.output.GetFormat()) {
cur_trans.output.SetFormat(prev_node_info.output.GetFormat()); cur_trans.output.SetFormat(prev_node_info.output.GetFormat());


+ 1
- 1
ge/host_kernels/concat_v2_kernel.cc View File

@@ -120,7 +120,7 @@ Status ConcatV2Kernel::ConcatV2PreCompute(const std::vector<ConstGeTensorPtr> &i
int &tidx, int &tidx,
ConstGeTensorPtr &tensor) { ConstGeTensorPtr &tensor) {
size_t input_size = input.size(); size_t input_size = input.size();
// N >= 2 and N + 1 >= 3
// N + 1 is greater than or equal to 3
if (input_size < kConcatV2InputNum) { if (input_size < kConcatV2InputNum) {
GELOGI("The number of input for ConcatV2 must not be less than %zu.", kConcatV2InputNum); GELOGI("The number of input for ConcatV2 must not be less than %zu.", kConcatV2InputNum);
return NOT_CHANGED; return NOT_CHANGED;


+ 1
- 1
ge/hybrid/node_executor/aicore/aicore_node_executor.h View File

@@ -89,7 +89,7 @@ class TaskCompilerFactory {


class CompilerFunctionRegistrar { class CompilerFunctionRegistrar {
public: public:
CompilerFunctionRegistrar(CreateFn fn);
explicit CompilerFunctionRegistrar(CreateFn fn);
~CompilerFunctionRegistrar() = default; ~CompilerFunctionRegistrar() = default;
}; };
} // namespace hybrid } // namespace hybrid


Loading…
Cancel
Save