Commit 4b60b69
committed
[Unity][Transform] Extract partial-tuple-usage from FuseTIR
Prior to this commit, the `FuseTIR` pass explicitly tracked usage of
tuple arguments, to minimize the set of arguments provided to each
kernel. The additional tgracking and handling of partially-used
tuples makes it difficult to follow the primary changes being made by
`FuseTIR`.
This commit implements the same functionality in terms of the
`ExpandTupleArguments` and `RemoveUnusedParameters` transforms,
introduced in #16115 and
#16116 respectively. By using these
passes before the main `FuseOps` changes, partial tuple usage is
already handled at that point.
This commit is intended to minimize any changes to user-facing
behavior, and so these pre-process passes are currently used
internally by `FuseOps`. This may be avoided in the future by pulling
this internal delegation out into a lowering pipeline.1 parent 4e505c0 commit 4b60b69
File tree
2 files changed
+18
-25
lines changed- src/relax/transform
- tests/python/relax
2 files changed
+18
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | 379 | | |
387 | 380 | | |
388 | 381 | | |
| |||
397 | 390 | | |
398 | 391 | | |
399 | 392 | | |
400 | | - | |
| 393 | + | |
401 | 394 | | |
402 | 395 | | |
403 | 396 | | |
| |||
529 | 522 | | |
530 | 523 | | |
531 | 524 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
| 525 | + | |
538 | 526 | | |
539 | 527 | | |
540 | 528 | | |
| |||
835 | 823 | | |
836 | 824 | | |
837 | 825 | | |
838 | | - | |
839 | | - | |
840 | 826 | | |
841 | 827 | | |
842 | 828 | | |
| |||
1040 | 1026 | | |
1041 | 1027 | | |
1042 | 1028 | | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
1047 | 1040 | | |
1048 | 1041 | | |
1049 | 1042 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
| 376 | + | |
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| |||
1115 | 1115 | | |
1116 | 1116 | | |
1117 | 1117 | | |
1118 | | - | |
| 1118 | + | |
1119 | 1119 | | |
1120 | 1120 | | |
1121 | 1121 | | |
| |||
0 commit comments