Repository navigation
Commit d874ac3
authored
Expose opt-out for horizontal partition fusion (pytorch#23082)
Summary:
`CapabilityBasedPartitioner` normally merges supported partitions even when their nodes are independent in dataflow. This produces larger delegated subgraphs, but its pairwise candidate checks are quadratic in the number of partitions. Wide graphs with many independent branches—Eagle-3 is the motivating case—can therefore spend prohibitive time in partition generation before backend compilation begins.
`CapabilityBasedPartitioner` already exposes `skip_horizontal_fusion`, but the canonical `generate_pattern_op_partitions` helper did not forward it. Backend integrations had to duplicate the helper or accept the quadratic work. Expose the option in both the fbcode and xplat mirrors; the default remains false, so existing callers keep their current partitioning behavior.
Differential Revision: D121425768
Pull Request resolved: pytorch#230821 parent deef069 commit d874ac3
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| |||
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
0 commit comments