Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The conditions for a subgraph to be valid for TRT TensorRT are:

 - all the Ops ops are "TRT TensorRT compatible " (defined by IsTRTCompatible function in src/executor/tensorrt_pass.cc)

 - there should be no cycle created by replacing the subgraph by a TensorRT node

A cycle would imply that there is a path (out of the subgraph) from an output of the subgraph to an input of the subgraph. While respecting those conditions we want to maximize the size of this subgraph.


We first generate a list of pairs of groups of node nodes that are incompatibles (if the subgraph contains one node of one of the group then it can't contain any node in the other) by running BFS and reverse BFS starting from all the non-TRT compatible nodes.

...