run
Applicable Products
All processors
Function Usage
Executes the optimization logic for a computational graph. It is the pass execution entry and called by the engine in the corresponding compilation phase.
Prototype
1 | run(graph: Graph, context: PassContext) -> StatusLike |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
graph |
Input |
Computational graph object to be optimized, which is of the ge.graph.Graph type. |
context |
Input |
Pass execution context, which is of the PassContext type and provides information about the current compilation environment. |
Returns
None, a boolean value, or an integer. If None or a true value is returned, the execution succeeds. If False or 0 is returned, the execution fails.
Restrictions
This method is required for the subclass.
Parent topic: FusionBasePass