Skip to content

Commit 124e3dd

Browse files
committed
motivation
1 parent 5943311 commit 124e3dd

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/rfcs/PipelineComposition.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,25 @@
22

33
Ivan Butygin, Renato Golin
44

5+
## Summary
6+
7+
We propose a new API to build a dependencies-based graph of pass pipelines.
8+
59
## Motivation
610

7-
TBD use cases from IREE, TPP
11+
At this point MLIR pass infrastruture only allows to define a linear sequence of passes. While this approach works
12+
for simple cases, more complex compiler pipelines may require more control over passes execution order.
13+
14+
Two main usecases we are considering:
15+
* Extensibility. We want to have the abilty for users to extend existing pipeline by inserting theirs custom passes
16+
into various places while reusing most of the exiting pipeline. With current approach the most common way way to achieve this is
17+
for pipeline developer to add a fixed 'extension point' during initial pipeline design.
18+
* Dynamic pipeline control flow. It's often required to have an ability select specific sequence of passes based on some info which
19+
is only becomes available durin compilation process. It can be either branching to some separate sequnces of passes based on selected codegen path
20+
or running sequence of passes in the loop until some runtime condition is reached.
821

922
## Proposal
1023

11-
We propose a new API to build a dependencies-based graph of pass pipelines.
1224
This API also allows a dynamic control flow between pipelines in graph, controlled by passes inside said pipelines.
1325

1426
## New APIs

0 commit comments

Comments
 (0)