Commit 6b7115e
Allow for matching debug handles with partial overlap between aten graph and runtime
Summary:
When aten graph is modified for debug, for instance using int4 matmul, it wont have complete
overlap with debug handles recorded by the delegate. For example, original model will have
chose_qparams,q, dq, dq, linear nodes. Delegate will record debug hanlde for all of those.
Say those are (4, 5, 6, 7, 8). When int4 matmul rewrite pass, from torchao, is applied,
we just inherit from_node information from linear node. Thus only the last debug handle 8
is associated with custom op int4 node. Thus when we map delegate debug handles with custom op
we find overlap for 8 only.
This diff allows to look for overlapping match instead of exact match.
Plus it also changes the code for AOT debug handle so that we can look for all ancestor nodes
instead of just parent node. This is also needed so as to allow for numerical comparison despite
passes applied on original aten graph.
Reviewed By: Gasoonjia
Differential Revision: D822293671 parent 0f066e0 commit 6b7115e
File tree
2 files changed
+29
-13
lines changed- devtools/inspector
- tests
2 files changed
+29
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
660 | | - | |
661 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
662 | 667 | | |
663 | 668 | | |
664 | 669 | | |
665 | 670 | | |
666 | 671 | | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
667 | 675 | | |
668 | 676 | | |
669 | 677 | | |
| |||
1059 | 1067 | | |
1060 | 1068 | | |
1061 | 1069 | | |
1062 | | - | |
| 1070 | + | |
1063 | 1071 | | |
1064 | 1072 | | |
1065 | | - | |
1066 | | - | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
1067 | 1080 | | |
1068 | 1081 | | |
1069 | 1082 | | |
| |||
1097 | 1110 | | |
1098 | 1111 | | |
1099 | 1112 | | |
1100 | | - | |
| 1113 | + | |
| 1114 | + | |
1101 | 1115 | | |
1102 | 1116 | | |
1103 | | - | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
1108 | | - | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
1109 | 1124 | | |
1110 | 1125 | | |
1111 | 1126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
| 344 | + | |
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
| |||
0 commit comments