Commit 7d1b976
[export] Make dict_keys_getitem tracable. (pytorch#166776)
Summary:
dict_keys_getitem can show up in the bytecode but it's using dict.keys() which is not fx tracable.
fx.wrap should make it as a standalone function in the graph to be invoked later with real inputs.
Test Plan:
pytest test/export/test_experimental.py
Pull Request resolved: pytorch#166776
Approved by: https://github.com/jamesjwu
ghstack dependencies: pytorch#1667751 parent 27cfdd9 commit 7d1b976
File tree
4 files changed
+47
-1
lines changed- test/export
- torch/_dynamo
4 files changed
+47
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
544 | 582 | | |
545 | 583 | | |
546 | 584 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
1003 | | - | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
1004 | 1007 | | |
1005 | 1008 | | |
1006 | 1009 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| 529 | + | |
| 530 | + | |
529 | 531 | | |
530 | 532 | | |
531 | 533 | | |
| |||
573 | 575 | | |
574 | 576 | | |
575 | 577 | | |
| 578 | + | |
| 579 | + | |
576 | 580 | | |
577 | 581 | | |
578 | 582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2707 | 2707 | | |
2708 | 2708 | | |
2709 | 2709 | | |
| 2710 | + | |
2710 | 2711 | | |
2711 | 2712 | | |
2712 | 2713 | | |
| |||
0 commit comments