Commit ada7c2f
committed
[TORCH] Transformer encoder decomposition
- Add a dedicated DecomposeTransformerEncoder pass to expand encoder ops into primitive Torch patterns.
- Extend shared lowering helpers (ReduceOpVariants.cpp, Utils.h)
so the new pass can reuse reduction utilities during decomposition.
- Register the pass in the Torch Transform pipeline so it runs as part of the decomposition flow.
- Expand e2e coverage with new transformer encoder tests to validate the lowering path.
Signed-off-by: Cathal Corbett <[email protected]>
Change-Id: I6bcda53569cf7b06df4cb97c624bbf512d8fecb71 parent b834f94 commit ada7c2f
File tree
11 files changed
+691
-1
lines changed- include/torch-mlir/Dialect/Torch/Transforms
- lib/Dialect/Torch/Transforms
- projects/pt1
- e2e_testing
- python/torch_mlir_e2e_test/test_suite
- test/python
11 files changed
+691
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13084 | 13084 | | |
13085 | 13085 | | |
13086 | 13086 | | |
| 13087 | + | |
| 13088 | + | |
13087 | 13089 | | |
13088 | 13090 | | |
13089 | 13091 | | |
| |||
0 commit comments