Commit 170ccf4
Work around torch.jit.trace bug upon Gather-ScatterElements sequence
## Problems
Gather was added to SKIP_LIST_FOR_SUBGRAPH_TRACE in 7563948, but it turned out that it only creates a new problem without solving any existing problems.
Two symptoms have been identified
1. Putting `Gather` in `SKIP_LIST_FOR_SUBGRAPH_TRACE` doesn't help torch.jit.trace capture the input order correctly.
2. For some reason, putting `Gather` in `SKIP_LIST_FOR_SUBGRAPH_TRACE` causes another type of mis-tracing upon Gather-ScatterElements sequence. It thinks ScatterElements and Gather takes the same input, when in fact ScatterElements takes Gather's output as input.
## Main Changes
* Partially reverted 7563948 -- removed Gather from `SKIP_LIST_FOR_SUBGRAPH_TRACE`. This fixes problem 2
* Added explicit unit tests for both problem 1 and 2
---------
Signed-off-by: Kyunggeun Lee <kyunggeu@qti.qualcomm.com>1 parent d1b9b0c commit 170ccf4
2 files changed
Lines changed: 28 additions & 1 deletion
File tree
- TrainingExtensions/torch
- src/python/aimet_torch/meta
- test/python
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1428 | 1428 | | |
1429 | 1429 | | |
1430 | 1430 | | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
1431 | 1436 | | |
1432 | 1437 | | |
1433 | 1438 | | |
| |||
1454 | 1459 | | |
1455 | 1460 | | |
1456 | 1461 | | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
1457 | 1465 | | |
1458 | 1466 | | |
1459 | 1467 | | |
| |||
1468 | 1476 | | |
1469 | 1477 | | |
1470 | 1478 | | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
0 commit comments