From: @selfws Reviewed-by: @xchu42,@ji_chen Signed-off-by: @ji_chentags/v1.2.0
@@ -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 { | ||||
@@ -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!")); | ||||
@@ -86,7 +86,6 @@ | |||||
| Node | | | Node | | ||||
+------------+ | +------------+ | ||||
*******************************************************************************/ | *******************************************************************************/ | ||||
namespace ge { | namespace ge { | ||||
class CaseOpLabelMaker : public LabelMaker { | class CaseOpLabelMaker : public LabelMaker { | ||||
public: | public: | ||||
@@ -70,7 +70,6 @@ | |||||
| Node | | | Node | | ||||
+------------+ | +------------+ | ||||
*******************************************************************************/ | *******************************************************************************/ | ||||
namespace ge { | namespace ge { | ||||
class IfOpLabelMaker : public LabelMaker { | class IfOpLabelMaker : public LabelMaker { | ||||
public: | public: | ||||
@@ -54,7 +54,6 @@ | |||||
| c | | | c | | ||||
+---------------+ | +---------------+ | ||||
*******************************************************************************/ | *******************************************************************************/ | ||||
namespace ge { | namespace ge { | ||||
class PartitionedCallLabelMaker : public LabelMaker { | class PartitionedCallLabelMaker : public LabelMaker { | ||||
public: | public: | ||||
@@ -70,7 +70,6 @@ | |||||
| Node | | | Node | | ||||
+------------+ | +------------+ | ||||
*******************************************************************************/ | *******************************************************************************/ | ||||
namespace ge { | namespace ge { | ||||
class WhileOpLabelMaker : public LabelMaker { | class WhileOpLabelMaker : public LabelMaker { | ||||
public: | public: | ||||
@@ -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()) { | ||||
@@ -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); | ||||
@@ -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 | \ | ||||
@@ -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()); | ||||
@@ -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; | ||||
@@ -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 | ||||