Conversation
Port Orbit's three ILP-reduction techniques: addition-tree squashing and structural compression (auto_compress) merge equivalent ops into groups that share one set of ILP variables (exact, since op costs are linear in level), and single-input single-output partitioning solves large circuits piecewise under enumerated boundary states with a DP stitch.
Port Orbit's bypass (handle_bypass): a fork feeding a deep main path and a shallow path that rejoin at an addition has no single-input single-output cut, so the region is split into main and bypass and solved separately instead of as one monolithic ILP. The main path is solved for every enumerated output level to build a transfer table, the shallow path plus the join is solved once per main-output state, and the cheapest combination is kept. Detection runs on every region — the whole body and each partition of the DP — so mid-circuit residuals are handled; the residual-join addition is kept out of squashed addition trees so its structure stays visible. On by default (bypass-depth-threshold=15, matching Orbit); set to 0 to disable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on #3194.
A residual connection is a fork that feeds a deep "main" path and a shallow path which rejoin at an addition. No single value is live across that span, so the region has no single-input single-output cut and SISO partitioning would leave it as one monolithic ILP. When the two rejoined operands differ in multiplicative depth by at least bypass-depth-threshold (Orbit's bpsdepth, default 15), the region is instead split and solved separately.
How it works
To make bypass regions first-class, the partition driver was generalized from a contiguous [begin, end) range to an explicit op-set (groupIds), so main and bypass can be arbitrary subsets of a region.
Default
On by default at threshold 15, matching Orbit; set bypass-depth-threshold=0 to disable. Existing circuits without a large-gap residual are unaffected.