diff --git a/inc/graph/utils/graph_utils.h b/inc/graph/utils/graph_utils.h index 61c713c1..6c344435 100644 --- a/inc/graph/utils/graph_utils.h +++ b/inc/graph/utils/graph_utils.h @@ -130,7 +130,7 @@ struct NodeIndexIO { IOType io_type_ = kOut; std::string value_; - const std::string &ToString() const { return value_; } + std::string ToString() const { return value_; } }; class GraphUtils { @@ -188,8 +188,8 @@ class GraphUtils { /// @param [in] output_index /// @return graphStatus /// - static graphStatus InsertNodeAfter(const OutDataAnchorPtr &src, const std::vector &dsts, - const NodePtr &insert_node, uint32_t input_index = 0, uint32_t output_index = 0); + static graphStatus InsertNodeBefore(const OutDataAnchorPtr &src, const std::vector &dsts, + const NodePtr &insert_node, uint32_t input_index = 0, uint32_t output_index = 0); static graphStatus RemoveJustNode(ComputeGraphPtr compute_graph, const NodePtr &node); @@ -303,14 +303,6 @@ class GraphUtils { /// static graphStatus MoveOutCtrlEdges(NodePtr &src_node, NodePtr &dst_node); - /// - /// Copy all in-data edges from `src_node` to `dst_node` - /// @param src_node - /// @param dst_node - /// @return - /// - static graphStatus CopyInDataEdges(const NodePtr &src_node, NodePtr &dst_node); - static ComputeGraphPtr FindRootGraph(ComputeGraphPtr graph); static graphStatus TopologicalSortingByName(const ge::ComputeGraphPtr &compute_graph, vector &node_vec); @@ -736,4 +728,5 @@ class PartialGraphBuilder : public ComputeGraphBuilder { std::vector exist_nodes_; }; } // namespace ge + #endif // INC_GRAPH_UTILS_GRAPH_UTILS_H_ diff --git a/inc/graph/utils/node_utils.h b/inc/graph/utils/node_utils.h index 4307e008..6e0e655d 100644 --- a/inc/graph/utils/node_utils.h +++ b/inc/graph/utils/node_utils.h @@ -99,13 +99,6 @@ class NodeUtils { /// static NodePtr GetParentInput(const NodePtr &node); - /// - /// @brief Check is varying_input for while node - /// @param [in] node: Data node for subgraph - /// @return bool - /// - static bool IsWhileVaryingInput(const ge::NodePtr &node); - /// /// @brief Get subgraph input is constant. /// @param [in] node @@ -121,24 +114,6 @@ class NodeUtils { /// static graphStatus RemoveSubgraphsOnNode(const NodePtr &node); - /// - /// @brief Get subgraph input data node by index. - /// @param [in] node - /// @return Node - /// - static vector GetSubgraphDataNodesByIndex(const Node &node, int index); - - /// - /// @brief Get subgraph input data node by index. - /// @param [in] node - /// @return Node - /// - static vector GetSubgraphOutputNodes(const Node &node); - - static NodePtr GetInDataNodeByIndex(const Node &node, int index); - - static vector GetOutDataNodesByIndex(const Node &node, int index); - private: static std::map> map_send_info_; static std::map> map_recv_info_; diff --git a/inc/graph/utils/tensor_adapter.h b/inc/graph/utils/tensor_adapter.h index a7355553..f9993606 100644 --- a/inc/graph/utils/tensor_adapter.h +++ b/inc/graph/utils/tensor_adapter.h @@ -20,7 +20,6 @@ #include #include "graph/ge_tensor.h" #include "graph/tensor.h" - namespace ge { using GeTensorPtr = std::shared_ptr; using ConstGeTensorPtr = std::shared_ptr; diff --git a/inc/graph/utils/tensor_utils.h b/inc/graph/utils/tensor_utils.h index caa80dcf..2fa398db 100644 --- a/inc/graph/utils/tensor_utils.h +++ b/inc/graph/utils/tensor_utils.h @@ -21,7 +21,6 @@ #include "graph/def_types.h" #include "graph/ge_error_codes.h" #include "graph/ge_tensor.h" - namespace ge { class TensorUtils { public: