Commit 5457abb
committed
[Codegen] Emit
Prior to this PR, the PrimExpr `tir::Let` is treated as inlining during
codegen, which makes any common subexpression elimination (CSE) efforts
using `tir::Let` at TIR level effectless.
This PR updates codegen so that the `tir::Let` will have an explicit
var assignment and thus can effectively reflect the CSE efforts.tir::Let as var assignment explicitly1 parent 132daf6 commit 5457abb
File tree
3 files changed
+25
-6
lines changed- python/tvm/relax/frontend/nn
- src/target/source
- tests/python/relax
3 files changed
+25
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2544 | 2544 | | |
2545 | 2545 | | |
2546 | 2546 | | |
2547 | | - | |
| 2547 | + | |
2548 | 2548 | | |
2549 | 2549 | | |
2550 | 2550 | | |
| |||
2564 | 2564 | | |
2565 | 2565 | | |
2566 | 2566 | | |
2567 | | - | |
2568 | | - | |
| 2567 | + | |
| 2568 | + | |
2569 | 2569 | | |
2570 | 2570 | | |
2571 | 2571 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
890 | | - | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
891 | 905 | | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
892 | 911 | | |
893 | 912 | | |
894 | 913 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
947 | 947 | | |
948 | 948 | | |
949 | 949 | | |
950 | | - | |
| 950 | + | |
951 | 951 | | |
952 | 952 | | |
953 | 953 | | |
| |||
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
973 | | - | |
| 973 | + | |
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
| |||
0 commit comments