Commit b4738be
Dedup delegate blobs in emitter (pytorch#14564)
Summary:
Previously we deduplicated entire 'BackendDelegate' blobs using the preprocessed blob. If two BackendDelegate fields have different id or compile specs, but the same preprocessed blob, we would take the first one and use it in the execution plan. The id/compile specs of the second would be lost.
This diff:
1. Only deduplicates the preprocessed blob. BackendDelegate retains its own compile specs, etc.
2. Removes the per-method 'delegate_cache', as we have a program-wide delegate cache.
3. Adds a test to confirm we have one delegate segment but two BackendDelegate references pointing at it.
Reviewed By: JacobSzwejbka
Differential Revision: D831621071 parent 684b5fd commit b4738be
3 files changed
+77
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | 167 | | |
169 | 168 | | |
170 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | 150 | | |
153 | 151 | | |
154 | 152 | | |
| |||
1092 | 1090 | | |
1093 | 1091 | | |
1094 | 1092 | | |
1095 | | - | |
| 1093 | + | |
1096 | 1094 | | |
1097 | 1095 | | |
1098 | 1096 | | |
| |||
1130 | 1128 | | |
1131 | 1129 | | |
1132 | 1130 | | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
1136 | 1135 | | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
1148 | | - | |
1149 | | - | |
1150 | | - | |
1151 | | - | |
1152 | | - | |
1153 | | - | |
1154 | 1136 | | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
1155 | 1145 | | |
1156 | 1146 | | |
1157 | 1147 | | |
| |||
1164 | 1154 | | |
1165 | 1155 | | |
1166 | 1156 | | |
1167 | | - | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1168 | 1163 | | |
1169 | 1164 | | |
1170 | 1165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1770 | 1770 | | |
1771 | 1771 | | |
1772 | 1772 | | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
1773 | 1831 | | |
1774 | 1832 | | |
1775 | 1833 | | |
| |||
0 commit comments