Skip to content

Consolidate pressure API, add placement pressure, unify budget defaults#42

Merged
fpedd merged 2 commits into
mainfrom
pressure-api-consolidation
Jul 16, 2026
Merged

Consolidate pressure API, add placement pressure, unify budget defaults#42
fpedd merged 2 commits into
mainfrom
pressure-api-consolidation

Conversation

@fpedd

@fpedd fpedd commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Fold get_antichain_pressure into get_pressure behind work_budget:
int | None — the two computed the identical max-weight antichain and
differed only in the default budget; None now removes the bound. Thread
work_budget through per_allocation_antichain_pressure (the linearize
attempt and each pinned flow), mirroring the global query.

Add get_placement_pressure, the peak a placement realizes
(max(offset + size)): an upper bound on the exact pressures and the max
entry of get_per_allocation_placement_pressure. It replaces the ad-hoc
_peak helpers in the omni tests and the pressure benchmark.

Move the closure-cap default to C++ as kDefaultClosureCap (exported as
DEFAULT_CLOSURE_CAP) so both exact-query defaults live next to the
algorithms they tune, default closure_cap on the raw closure bindings,
and rename kNoLinearizeBudget to kNoWorkBudget — it bounds the antichain
flow construction too, not just linearization.

fpedd added 2 commits July 16, 2026 00:54
Fold get_antichain_pressure into get_pressure behind work_budget:
int | None — the two computed the identical max-weight antichain and
differed only in the default budget; None now removes the bound. Thread
work_budget through per_allocation_antichain_pressure (the linearize
attempt and each pinned flow), mirroring the global query.

Add get_placement_pressure, the peak a placement realizes
(max(offset + size)): an upper bound on the exact pressures and the max
entry of get_per_allocation_placement_pressure. It replaces the ad-hoc
_peak helpers in the omni tests and the pressure benchmark.

Move the closure-cap default to C++ as kDefaultClosureCap (exported as
DEFAULT_CLOSURE_CAP) so both exact-query defaults live next to the
algorithms they tune, default closure_cap on the raw closure bindings,
and rename kNoLinearizeBudget to kNoWorkBudget — it bounds the antichain
flow construction too, not just linearization.
Public wrapper over the C++ compute_temporal_overlaps binding, keyed by
id like the raw map but total and deterministic: every allocation is a
key in input order, conflict-free ones map to an empty set (the raw
binding omits them). Rejects duplicate ids like the other id-keyed
primitives.
@fpedd
fpedd force-pushed the pressure-api-consolidation branch from 29a983e to 5f72b14 Compare July 15, 2026 22:54
@fpedd
fpedd merged commit d742fca into main Jul 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant