Skip to content

Refactor select pipeline scenarios into compact immutable data - #283

Merged
zhoubot merged 1 commit into
mainfrom
codex/select-pipeline-bench
Oct 9, 2026
Merged

zhoubot merged 1 commit into
mainfrom
codex/select-pipeline-bench

Conversation

@zhoubot

@zhoubot zhoubot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Replace the select-pipeline bench's expanded conditional expressions with 1,829 immutable typed scenario rows and one clamped lookup. Omitted fields use existing implicit-zero initialization. The source shrinks from 22,903 lines / 1.142 MB to 1,905 lines / 0.293 MB without changing the DUT, native/RTL oracles, four-state tests, configuration or registered 1,829 cycles. No API, compiler or budget changes are needed.

Preserve the original 11-bit phase and wrap, constant tail, five guarded assertions and five unconditional logs. Independent comparison proves all 24,576 field values across all 2,048 phases. Native workers 1/2 and Verilator retain all 18,290 observations. Extended resetless runs preserve the original failure at epoch 4,102 after an identical 20,510-observation prefix; no reset or assertion workaround is introduced.

The cost tradeoff is explicit in the README. On the same Clang22 -O0 profile, bench compilation drops 83.51→21.74 seconds and peak RSS 515.8→362.4 MiB; linked IR shrinks 15.9%. The C++ header grows 11.5%, native build time grows 16.0% and peak RSS grows 19.5%. Two warm runs give native runtime median 42.69→44.24 seconds (+3.6%); RTL runtime remains about 0.33 seconds. This is a source/front-end improvement, not a general runtime speedup.

Validation: existing standalone module/system/four-state CTests 3/3; related units 108/108 and post-catalog checks 19/19; changed-file pre-commit, strict MkDocs and diff checks pass. Source-import and transformed stages reproduce published units byte-for-byte; measured and verified system backends use identical final IR. Add the verified generated receipt/excerpts and link them in the existing catalog/navigation.

Evidence stays local and ignored under docs/gates/logs/select-bench-20261009/. Build-phase measurements are single samples, runtime medians use two warm samples, and results are platform/profile-specific. Full-catalog/nightly and platform acceptance remain open in #272; scaling work remains in #265.

@zhoubot
zhoubot requested a review from xiekunpeng as a code owner October 9, 2026 19:36
@zhoubot
zhoubot merged commit 8039961 into main Oct 9, 2026
2 checks passed
@zhoubot
zhoubot deleted the codex/select-pipeline-bench branch October 9, 2026 19:40
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