Commit 8fef233
authored
Use input size limits for constant folding (#1903)
Add input size limits for constant folding. Helps avoid excessive time
in optimizer in some edge cases. (The edge cases, where we have
non-trivial ops applied to large tensors, are not relevant for the
exporter itself. They may be of potential interest for optimization in
other settings, but that can be done by user taking explicit steps.)
Still to be done: how do we specify these values from the benchmarking
code? For now, the default values will be quite useful, but
experimenting with these values from the benchmarking code will need a
way to control these option values.1 parent ed28222 commit 8fef233
2 files changed
+58
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
114 | 123 | | |
115 | 124 | | |
116 | 125 | | |
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
| 129 | + | |
| 130 | + | |
120 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
121 | 145 | | |
122 | 146 | | |
123 | 147 | | |
124 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
125 | 154 | | |
126 | 155 | | |
127 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
550 | 552 | | |
551 | 553 | | |
552 | 554 | | |
| 555 | + | |
553 | 556 | | |
554 | | - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
555 | 560 | | |
556 | 561 | | |
557 | | - | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
558 | 565 | | |
559 | 566 | | |
560 | 567 | | |
| |||
632 | 639 | | |
633 | 640 | | |
634 | 641 | | |
635 | | - | |
| 642 | + | |
636 | 643 | | |
637 | 644 | | |
638 | 645 | | |
| |||
667 | 674 | | |
668 | 675 | | |
669 | 676 | | |
670 | | - | |
| 677 | + | |
671 | 678 | | |
672 | 679 | | |
673 | 680 | | |
| |||
696 | 703 | | |
697 | 704 | | |
698 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
699 | 716 | | |
700 | 717 | | |
701 | 718 | | |
| |||
770 | 787 | | |
771 | 788 | | |
772 | 789 | | |
| 790 | + | |
| 791 | + | |
773 | 792 | | |
774 | 793 | | |
775 | 794 | | |
776 | 795 | | |
777 | 796 | | |
778 | 797 | | |
779 | | - | |
780 | | - | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
781 | 802 | | |
782 | 803 | | |
783 | 804 | | |
| |||
0 commit comments