Overview
Defines a subgraph boundary.
- A subgraph must be self-contained. Except the boundary output operators, the output consumers for the other operators must be within the boundary. If there are consumers outside the boundary, these consumers cannot find the original tensors after rewriting.
- Nodes in a subgraph cannot span multiple graphs.
- A subgraph cannot contain the boundary operators (such as data, netoutput, and variable) of the graph where the subgraph is located.
Header File to Be Included
1 | #include <ge/fusion/subgraph_boundary.h> |
Public Member Functions
SubgraphBoundary() SubgraphBoundary(std::vector<SubgraphInput> inputs, std::vector<SubgraphOutput> outputs) SubgraphBoundary(const SubgraphBoundary &other) noexcept SubgraphBoundary &operator=(SubgraphBoundary &&other) noexcept SubgraphBoundary &operator=(const SubgraphBoundary &other) noexcept Status AddInput(int64_t index, SubgraphInput input) Status AddOutput(int64_t index, SubgraphOutput output) Status GetInput(int64_t index, SubgraphInput &subgraph_input) const Status GetAllInputs(std::vector<SubgraphInput> &subgraph_input) const Status GetOutput(int64_t index, SubgraphOutput &subgraph_output) const Status GetAllOutputs(std::vector<SubgraphOutput> &subgraph_outputs) const
Parent topic: SubgraphBoundary