Commit 4b7d78d
authored
[Relax] Handle dynamic arguments in legalization of nn.attention (#16592)
Prior to this commit, when using causal_mask="BottomRight" in `R.nn.attention`,
the legalization would assume that the query and key/value sequence lengths
were static integers. This commit updates the legalization to allow dynamic shapes.1 parent 8f42597 commit 4b7d78d
File tree
2 files changed
+25
-1
lines changed- python/tvm/relax/transform/legalize_ops
- tests/python/relax
2 files changed
+25
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
| 489 | + | |
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3270 | 3270 | | |
3271 | 3271 | | |
3272 | 3272 | | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
| 3276 | + | |
| 3277 | + | |
| 3278 | + | |
| 3279 | + | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
3273 | 3297 | | |
3274 | 3298 | | |
3275 | 3299 | | |
| |||
0 commit comments