You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -47,17 +56,20 @@ User is adding pipelines into graph via `registerPipeline` function, each pipeli
47
56
* `jumpTargets` - List of the names of pipelines to which we can dynamically jump after current pipeline.
48
57
* `populateFunc` - Callback to populate pipeline with passes.
49
58
59
+
User can either register linear sequence of passes via `OpPassManager` variant or a subgraph via `PipelineGraph`.
60
+
Registered subgraphs are isolated from the current graph and always executed as single entity (i.e. control flow can't jump into or from the middle of subgraph).
61
+
50
62
After user populated the graph object they must call `createPipelineSchedule` method to compile the resulted graph into runnable schedule.
51
63
`createPipelineSchedule` will build a DAG from pipelines dependencies provided by user, and will try to get linear execution order to satify these dependencies.
52
64
53
-
If two pipelines doesn't have direct and indirect dependencies, order in which they will be executed is not specified, but stable.
65
+
If two pipelines doesn't have direct and indirect dependencies, order in which they will be executed is not specified.
54
66
55
67
Implicit cycles in graph are not allowed and will result in `createPipelineSchedule` returning error. But cycles via `jumpTargets` are allowed (see later).
56
68
57
69
Empty pipelines (i.e. pipelines without passes, when `populateFunc` does nothing) are allowed and sometimes desirable.
58
70
59
71
One usecase is using empty pipelines as anchors for other pipelines. Let's say use wants to split hist entire compiler pipeline into 3 stages: `high`, `middle` and `low`.
60
-
They can create a two empty pipelines `high-to-middle` and `midlle-to-low` with appropriate dependencies and the use those as anchors to specify at which compiler stage insert stages which do actual work.
72
+
They can create a two empty pipelines `high-to-middle` and `middle-to-low` with appropriate dependencies and the use those as anchors to specify at which compiler stage insert stages which do actual work.
61
73
62
74
### PipelineSchedule
63
75
```C++
@@ -66,7 +78,9 @@ public:
66
78
LogicalResult run(Operation *op);
67
79
};
68
80
```
69
-
`PipelineSchedule` object encapsulates compiled pipeline graph. Main method is `LogicalResult run(Operation *op);` which follows existing MLIR `PassManager::run`.
0 commit comments