Commit 72508c7
authored
[TOSA] Retag resource literals to signless constants (#4367)
- Extend ValueTensorLiteral lowering so DenseResourceElementsAttr
integers are rebuilt with signless element types before emitting
tosa.const, matching the converted tensor type.
- Add lit coverage for resource-backed i32/i64 vtensor literals.
- Add FX importer e2e tests that return constant int32/int64 tensors.1 parent 244f4b6 commit 72508c7
File tree
4 files changed
+101
-2
lines changed- lib/Conversion/TorchToTosa
- projects/pt1
- e2e_testing
- python/torch_mlir_e2e_test/test_suite
- test/Conversion/TorchToTosa
4 files changed
+101
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
3161 | 3162 | | |
3162 | 3163 | | |
3163 | 3164 | | |
3164 | | - | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
3165 | 3180 | | |
3166 | 3181 | | |
3167 | 3182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| 683 | + | |
| 684 | + | |
683 | 685 | | |
684 | 686 | | |
685 | 687 | | |
| |||
2882 | 2884 | | |
2883 | 2885 | | |
2884 | 2886 | | |
| 2887 | + | |
| 2888 | + | |
2885 | 2889 | | |
2886 | 2890 | | |
2887 | 2891 | | |
| |||
3671 | 3675 | | |
3672 | 3676 | | |
3673 | 3677 | | |
3674 | | - | |
3675 | 3678 | | |
3676 | 3679 | | |
3677 | 3680 | | |
| |||
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2976 | 2976 | | |
2977 | 2977 | | |
2978 | 2978 | | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
| 3001 | + | |
| 3002 | + | |
| 3003 | + | |
| 3004 | + | |
| 3005 | + | |
| 3006 | + | |
| 3007 | + | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
2979 | 3022 | | |
2980 | 3023 | | |
2981 | 3024 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1051 | 1051 | | |
1052 | 1052 | | |
1053 | 1053 | | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
1054 | 1092 | | |
1055 | 1093 | | |
1056 | 1094 | | |
| |||
0 commit comments