mindspore.graph.CustomPassType

View Source On AtomGit
class mindspore.graph.CustomPassType[source]

Custom pass type. Possible enumeration values include: CustomPassType.PATTERN , CustomPassType.FULL_GRAPH .

  • CustomPassType.PATTERN: Rewrites the graph structure based on a user-defined pattern to match, such as replacing an Add operator and a Neg operator with a Sub operator. This is applied in the backend optimization process.

  • CustomPassType.FULL_GRAPH: Rewrites the graph based on the information of the entire graph. This is applied in the frontend optimization process.