Commit 4917316
[Dynamo][Guards]Fix TLParse CPP guard message with sorting get_leaf_guards and verbose_code_parts (pytorch#169102)
Fix pytorch#168379.
1. The results are validated in the improved testing that the ``___dict_contains`` will be sorted based on the verbose part. The first solution was also suggested in https://fb.workplace.com/groups/1075192433118967/permalink/1650742858897252/ by sorting the ``get_leaf_guards()`` in ``construct_manager_string``.
2. The second solution will be adopted the ``OrderedSet`` in setGuards during guards construction to make sure the ``contain_dict`` are displayed as the order of being added.
We decided to pursuit the second options to reduce the sorting time overhead and simplicity.
Pull Request resolved: pytorch#169102
Approved by: https://github.com/anijain23051 parent 1e34fb2 commit 4917316
3 files changed
+30
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1225 | 1225 | | |
1226 | 1226 | | |
1227 | 1227 | | |
1228 | | - | |
| 1228 | + | |
1229 | 1229 | | |
1230 | 1230 | | |
1231 | 1231 | | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | | - | |
1236 | | - | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
1237 | 1236 | | |
1238 | 1237 | | |
1239 | | - | |
1240 | | - | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
1241 | 1244 | | |
| 1245 | + | |
1242 | 1246 | | |
1243 | 1247 | | |
1244 | | - | |
1245 | | - | |
1246 | | - | |
1247 | | - | |
1248 | | - | |
1249 | | - | |
1250 | | - | |
1251 | | - | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
1252 | 1251 | | |
1253 | 1252 | | |
1254 | 1253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3871 | 3871 | | |
3872 | 3872 | | |
3873 | 3873 | | |
3874 | | - | |
| 3874 | + | |
3875 | 3875 | | |
3876 | 3876 | | |
3877 | 3877 | | |
3878 | 3878 | | |
3879 | 3879 | | |
3880 | 3880 | | |
3881 | 3881 | | |
3882 | | - | |
| 3882 | + | |
3883 | 3883 | | |
3884 | 3884 | | |
3885 | 3885 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
487 | 488 | | |
488 | 489 | | |
489 | 490 | | |
490 | | - | |
| 491 | + | |
491 | 492 | | |
492 | | - | |
| 493 | + | |
493 | 494 | | |
494 | 495 | | |
495 | | - | |
| 496 | + | |
496 | 497 | | |
497 | 498 | | |
498 | 499 | | |
499 | | - | |
| 500 | + | |
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
| |||
605 | 606 | | |
606 | 607 | | |
607 | 608 | | |
608 | | - | |
| 609 | + | |
609 | 610 | | |
610 | | - | |
611 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
612 | 614 | | |
613 | 615 | | |
614 | 616 | | |
| |||
645 | 647 | | |
646 | 648 | | |
647 | 649 | | |
648 | | - | |
| 650 | + | |
649 | 651 | | |
650 | | - | |
| 652 | + | |
651 | 653 | | |
652 | 654 | | |
653 | 655 | | |
| |||
664 | 666 | | |
665 | 667 | | |
666 | 668 | | |
667 | | - | |
| 669 | + | |
668 | 670 | | |
669 | 671 | | |
670 | 672 | | |
| |||
0 commit comments