Commit 93783ee
authored
Capture rewrite rule name as metadata (#2675)
Capture rewrite rule name as metadata to simplify debugging issues from
rewrites. This is just a basic version.
TODO / Extensions:
* Sometimes we apply a sequence of rewrite-rules one after another, to
perform complex fusions. This currently records only the last rule
applied.
* This can be solved when we merge metadata from original nodes into new
nodes. (See #2375 )
* May be useful standardize on a single ONNX metadata key for "source"
info (that can be used by torchlib/other exporters/rewriter/optimizer
etc.)
---------
Signed-off-by: Ganesan Ramalingam <[email protected]>1 parent 5be9d3b commit 93783ee
File tree
3 files changed
+53
-0
lines changed- onnxscript/rewriter
3 files changed
+53
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
719 | 724 | | |
720 | 725 | | |
721 | 726 | | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
722 | 734 | | |
723 | 735 | | |
724 | 736 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
936 | 937 | | |
937 | 938 | | |
938 | 939 | | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
939 | 978 | | |
940 | 979 | | |
941 | 980 | | |
| |||
0 commit comments