Commit 2a9709c
authored
[Unity][Frontend] FX exp and strided_slice fix (#14338)
* Add the support of `exp` for the FX translator.
* Previously the way FX translator dealt with `None` in torch tensor
slice (e.g., `x[:, None, None]`) is not right. This PR fixes this issue.
Specifically, the `None` here means dim expansion, and the previous impl
mistakenly increases the dim counter when seeing `None`, which will lead
to dim counter out-of-range issue in the end.1 parent 57b42a8 commit 2a9709c
File tree
2 files changed
+49
-6
lines changed- python/tvm/relax/frontend/torch
- tests/python/relax
2 files changed
+49
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
858 | 861 | | |
859 | 862 | | |
860 | 863 | | |
861 | | - | |
862 | | - | |
| 864 | + | |
863 | 865 | | |
864 | 866 | | |
865 | 867 | | |
| |||
903 | 905 | | |
904 | 906 | | |
905 | 907 | | |
| 908 | + | |
906 | 909 | | |
907 | 910 | | |
908 | 911 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
1372 | 1372 | | |
1373 | 1373 | | |
1374 | 1374 | | |
1375 | | - | |
1376 | | - | |
1377 | 1375 | | |
1378 | 1376 | | |
1379 | 1377 | | |
| |||
1398 | 1396 | | |
1399 | 1397 | | |
1400 | 1398 | | |
1401 | | - | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
1402 | 1422 | | |
1403 | 1423 | | |
1404 | 1424 | | |
| |||
1451 | 1471 | | |
1452 | 1472 | | |
1453 | 1473 | | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
1454 | 1494 | | |
1455 | 1495 | | |
1456 | 1496 | | |
| |||
0 commit comments