Overview

Defines a subgraph boundary.

  • A subgraph must contain the output operators except the boundary operators. The data output consumers of all operators within the boundary must also be within the boundary. If there is a consumer outside the boundary, the consumer cannot find the original tensor 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 Files 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