Commit a6e2e19
committed
Assign names for None dims
When onnx shape inference is run on symbolic input dims, it will not handle the dim name propagation and instead create a None. As long as we rely on the current version onnx shape inference there is not better information we can get.
However, since in the optimizer we also have some custom shape propagator implemented (e.g. for Identity) that will propagate sym dims, we should encode the equivalents for those dimensions as much as possible.
This PR assigns a string to all None dims produced by onnx shape inference, so that the string names can get propagated when possible by the optimizer.
Signed-off-by: Justin Chu <[email protected]>1 parent cb6f873 commit a6e2e19
1 file changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
| 977 | + | |
977 | 978 | | |
978 | 979 | | |
979 | 980 | | |
| |||
982 | 983 | | |
983 | 984 | | |
984 | 985 | | |
| 986 | + | |
985 | 987 | | |
986 | 988 | | |
987 | 989 | | |
| |||
1029 | 1031 | | |
1030 | 1032 | | |
1031 | 1033 | | |
1032 | | - | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
1033 | 1040 | | |
1034 | 1041 | | |
1035 | 1042 | | |
| |||
1038 | 1045 | | |
1039 | 1046 | | |
1040 | 1047 | | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
1041 | 1053 | | |
1042 | 1054 | | |
1043 | 1055 | | |
| |||
0 commit comments