Repository navigation
feat(runtime)!: opt-in partitioned combinational settle - #2106
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
tignear
force-pushed
the
feature/perf/2013-partitioned-settle
branch
from
October 26, 2026 05:12
33feb4b to
11a2d65
Compare
Cut the combinational settle into contiguous ranges of its schedule, each guarded by a dirty flag in a hidden `$settle.flags` object. A partition that runs clears its flag and sets the flags of the partitions reading what it wrote; every other writer of state the settle reads or writes sets them too: generated stores and commits, host and VCD writes, initial values, state loads, and a retained raw view (the untracked flag, after which every partition runs). Off unless `SirPass::PartitionedSettle` is enabled or `SimulatorBuilder::settle_partition` is called (#2013). The flags stay out of state files and of the differential and derived-edge checks. `SimulatorBuilder::settle_check` runs every settle a second time with every partition flagged and panics where the two differ. BREAKING CHANGE: RuntimeSchema has a new field, `settle_partitions`, and MemoryLayout a new field, `settle`; SirPass has a new variant, PartitionedSettle. Native images use container format 39; images written by earlier versions must be rebuilt. Change-Id: I6d2c7e90376cf6fd96173e2cd4959f79171834fc
tignear
force-pushed
the
feature/perf/2013-partitioned-settle
branch
from
October 26, 2026 05:38
11a2d65 to
7e7b80e
Compare
Contributor
Merge Queue Status
This pull request spent 47 minutes 15 seconds in the queue, including 33 minutes 19 seconds running CI. Required conditions to merge
|
43 of 73 tasks
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.
Part 1 of #2013: the infrastructure for a combinational settle that runs only the parts whose inputs changed. It stays off unless enabled (
SirPass::PartitionedSettle,+sir:partitioned_settle, orSimulatorBuilder::settle_partition). With unconditional marks it does not pay off yet on C906; change-detected marks come in the next PR, which turns it on by default.What it does
SettlePartitioning). It does not partition schedules with captures or pre-lowered nodes, or settles that run on lanes. Each partition is guarded by one byte of a hidden$settle.flagsobject, and the last byte is an "untracked" flag that makes every partition run. A partition that runs clears its own flag and sets the flags of the partitions reading what it writes.celox::settle::instrument), including processes the scheduler and derived-edge units generate.SettleLayout::mark_range).SimulatorBuilder::settle_checkmakes the native and Cranelift backends run every settle a second time with every partition flagged, and panic at the first state byte that differs. Effects of partitions that run in both passes, such as runtime events, then happen twice.!), like earlier container bumps:RuntimeSchemagainssettle_partitions,MemoryLayoutgainssettle, andSirPassgainsPartitionedSettle. Native images use container format 39, so images from earlier versions must be rebuilt.Validation
celox+celox-test-suitewith partitioning forced on (Always, one partition per scheduled work) and the cross-check on: everything passes except the expected SIR/MIR snapshot changes and native raw-buffer harness tests. One test fails because a$displayin analways_combis reported twice under the check (documented above).tests/settle_partitions.rscompares partitioned against single-pass settles on native, Cranelift, wasm and the interpreter, with host writes, state loads, a latch-gated clock (BUFGCE), a process writing two outputs with an intermediate write, and a copy of a process output read by another process. The tests fail if the outside marks or the host-write marks are removed.--backend native, release), base vs branch: 4,212,004,002 / 4,185,203,922 Ir, same output. The JIT code is identical (2,777,200,097 Ir in both). The difference is in the runtime: moving the timing and cross-check path out of line letsNativeBackend::call_func_timedinline into its callers.