Commit 7be2601
Fix non-deterministic rewriter behavior by using ordered dict instead of set for output_nodes
Replace set[NodePattern] with dict[NodePattern, None] to preserve deterministic
insertion order from the outputs sequence. Python sets have non-deterministic
iteration order due to hash randomization, which caused the multi-output pattern
matching to behave differently across runs.
Fixes #2234
Agent-Logs-Url: https://github.com/microsoft/onnxscript/sessions/50f46d7a-beee-47c4-9369-3c28417380d1
Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>1 parent 12d4645 commit 7be2601
2 files changed
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
839 | | - | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
840 | 844 | | |
841 | 845 | | |
842 | 846 | | |
| |||
848 | 852 | | |
849 | 853 | | |
850 | 854 | | |
851 | | - | |
| 855 | + | |
852 | 856 | | |
853 | 857 | | |
854 | 858 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
74 | 99 | | |
75 | 100 | | |
76 | 101 | | |
0 commit comments