Commit 684edfc
fix transpose / permutations fusion pass (#10780)
Summary:
Follow up on D73619452
We noticed that this pattern used to be fused, but stopped being fused after D73619452.
What happens is that we were checking for unitary dimensions. So a tensor of shape [1, 5, 30] is equivalent (in memory) to [5, 1, 30]. So, transposing on [0, 2] then on [0, 1] is (almost) equivalent to an identity and can be fused
This diff re-establishes this behavior.
Reviewed By: mcremon-meta
Differential Revision: D744473831 parent b1b46ee commit 684edfc
File tree
2 files changed
+55
-2
lines changed- backends/cadence/aot
- tests
2 files changed
+55
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
885 | 885 | | |
886 | 886 | | |
887 | 887 | | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
888 | 891 | | |
889 | 892 | | |
890 | 893 | | |
| |||
908 | 911 | | |
909 | 912 | | |
910 | 913 | | |
911 | | - | |
| 914 | + | |
912 | 915 | | |
913 | 916 | | |
914 | 917 | | |
| |||
918 | 921 | | |
919 | 922 | | |
920 | 923 | | |
921 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
922 | 928 | | |
923 | 929 | | |
924 | 930 | | |
925 | 931 | | |
926 | 932 | | |
927 | 933 | | |
928 | 934 | | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
929 | 938 | | |
930 | 939 | | |
931 | 940 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
587 | 609 | | |
588 | 610 | | |
589 | 611 | | |
| |||
622 | 644 | | |
623 | 645 | | |
624 | 646 | | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
625 | 669 | | |
626 | 670 | | |
627 | 671 | | |
| |||
0 commit comments