| @@ -147,18 +147,6 @@ class NodeStreamUpdatePass : public LogicalStreamPass { | |||||
| public: | public: | ||||
| STREAM_PASS_DEFAULT_FUNC(NodeStreamUpdatePass); | STREAM_PASS_DEFAULT_FUNC(NodeStreamUpdatePass); | ||||
| Status Run(ComputeGraphPtr graph, const std::vector<SubgraphPtr> &subgraphs, Context &context) override; | Status Run(ComputeGraphPtr graph, const std::vector<SubgraphPtr> &subgraphs, Context &context) override; | ||||
| private: | |||||
| /// Optimize for case like: | |||||
| /// NodeA(stream1) -> Const(stream2) -> NodeB(stream1) | |||||
| /// To case: | |||||
| /// NodeA(stream1) -> Const(stream1) -> NodeB(stream1) | |||||
| /// Which could reduce event number (Const could be other type which belong to skipped engine subgraph) | |||||
| Status UpdateForSkippedEngine(const ComputeGraphPtr &graph, const std::vector<SubgraphPtr> &subgraphs); | |||||
| int64_t GetSingleInoutStream(const NodePtr &node) const; | |||||
| // Judge if all predecessors' streams of node are kInvalidStream | |||||
| bool AreAllPredStreamsInvalid(const NodePtr &node) const; | |||||
| }; | }; | ||||
| // Update the stream of subgraphs to nodes. | // Update the stream of subgraphs to nodes. | ||||