Run

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Header File/Library File

  • Header file: #include <ge/fusion/pass/decompose_pass.h>
  • Library file: libge_compiler

Function Usage

Finds matched nodes in a graph based on the op type declared during registration.

For the matched nodes, the MeetRequirements function defined by the subclass is called to determine whether the nodes can be replaced in sequence. The replacement defined by the subclass is obtained to replace the matched nodes in the graph in sequence.

Note: The Run function can be used to process only the current graph. If a subgraph needs to be processed, the pass caller is responsible for processing the subgraph.

Prototype

1
Status Run(GraphPtr &graph, CustomPassContext &pass_context) override

Parameters

Parameter

Input/Output

Description

graph

Input

Original graph to be modified.

pass_context

Input

Customized pass context.

Returns

Parameter

Type

Description

-

Status

SUCCESS: Replacement succeeded.

FAILED: Replacement failed.

Constraints

None