Commit d44853e
authored
Attention fusion (part 2) (#2013)
Continuation of attention fusion.
* Adds a version of GroupQueryAttention
* Adds support in Cos-Sin cache fusion for constant-folded position-ids
* Restructure MHA fusion into a class-based rewrite rule
Also restructure the folder structure.
* Eventually eliminate folders called "onnxruntime" and "transfomers",
which hinder importing the original packages with those names. For now
moving just the relevant new files. (Will restructure older files
later.)
* ORT-specific fusions go into the ort_fusions folder.1 parent 6d2b530 commit d44853e
File tree
23 files changed
+471
-251
lines changed- onnxscript/rewriter
- onnxruntime/xformers
- ort_fusions
23 files changed
+471
-251
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| 552 | + | |
552 | 553 | | |
553 | 554 | | |
| 555 | + | |
554 | 556 | | |
555 | 557 | | |
556 | 558 | | |
| |||
This file was deleted.
Lines changed: 0 additions & 19 deletions
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 commit comments