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
Copy file name to clipboardExpand all lines: docs/rfcs/PipelineComposition.md
+54Lines changed: 54 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,3 +83,57 @@ Passes inside pipeline can set this attribute to indicate they want compilatin f
83
83
After current pipeline is finished, runtime will check if module object have attribute set and if it does, jump to the selected pipeline and clear the attribute.
84
84
85
85
Setting attribute to the value, which wasnt in `jumpTargets` for the current pipeline will result in error and abort the compilation flow.
86
+
87
+
88
+
### Pipeline examples
89
+
90
+
Here is some examples where non-trivial pipeline dependencies are needed.
91
+
92
+
#### Numba-mlir
93
+
94
+
```
95
+
frontend
96
+
|
97
+
V
98
+
cfg-to-scf
99
+
/ ^
100
+
/ \
101
+
V \
102
+
python-to-std |
103
+
\ /
104
+
\ /
105
+
V /
106
+
numpy-to-linalg
107
+
|
108
+
V
109
+
bufferization
110
+
|
111
+
V
112
+
optimization
113
+
/ \
114
+
/ \
115
+
V \
116
+
lower-to-gpu |
117
+
\ /
118
+
\ /
119
+
V V
120
+
lower-to-llvm
121
+
```
122
+
In this pipeline we are lowering scalar python ops in `python-to-std` stage and
123
+
numpy ops in `numpy-to-linalg` and we may need to jump backwards to `cfg-to-scf`/`python-to-std`
124
+
multiple times to lower generated `linalg.generic` body, which are represented as
125
+
normal python function in our numpy->linalg conversion.
126
+
127
+
Pipeline description for this will looks like (pseudocode):
0 commit comments