Skip to content

ci(bench): measure scheduler scaling and RTLMeter designs on CodSpeed - #4380

Open
tignear wants to merge 1 commit into
masterfrom
stack/tignear/ci/codspeed-rtlmeter/measure-scheduler-scaling-rtlmeter-designs--7ff427b9
Open

tignear wants to merge 1 commit into
masterfrom
stack/tignear/ci/codspeed-rtlmeter/measure-scheduler-scaling-rtlmeter-designs--7ff427b9

Conversation

@tignear

@tignear tignear commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

CodSpeed's ARM64 Macro Runner now measures, besides compile time:

  • benches/scaling.rs: N clock-alias domains (assign l1clk = clk,
    as in VeeR-EH1's 1,451 copies) and N clock-gated flops, at N = 16 and
    1024, compile and 1,000-cycle simulation, so the history shows the
    slope; and a fixed 64-lane combinational design with ONE comb
    $display, assert final, DPI-C call in always @*, string array
    or final block next to the same design without it, so a construct
    that moves the whole design to a slower path shows as a gap to the
    baseline.
  • benches/rtlmeter.rs: celox run (native, O2, two-state, one thread)
    on VeeR-EL2, VeeR-EH1 and XuanTie-E906 CoreMark, reporting the
    analysis and code generation time and the per-cycle time of a fixed
    +max_cycles window from the command's CELOX_TEST_TIMING record.
    BlackParrot 1x1 runs nightly, on dispatch or with the
    bench-blackparrot label. run-rtlmeter-bench.py codspeed-layout
    lays the cases of benchmarks/rtlmeter/codspeed_manifest.json out at
    the pinned RTLMeter revision, merging configuration include files,
    common arguments and Verilator parameter overrides as RTLMeter does.

The workflow runs on every push to master, each commit in a concurrency
group of its own so a burst of pushes keeps every measurement, and on
pull requests labelled bench, instead of only daily. It also builds
with cranelift, which the compilation benchmark requires (every run
since 2026-10-25 failed to build), and every manual schedule takes at
least two rounds, the fewest samples the walltime analysis accepts (one
round panicked).

The runner (32 GB, 16 Cortex-A72 cores) lost its connection twice: in
the build, linking four fat-LTO binaries at once, and in the benchmarks,
where the walltime profiler sampled every process with 8 KiB stack
copies for tens of minutes (the compilation benchmark alone takes 9.6
minutes and 6.9 GB on x86-64). The benchmarks now build with thin LTO
and run without the profiler; each RTLMeter run is killed and fails its
benchmark past 20 GiB resident or an hour and prints its start and peak
memory, and the build and run print memory and disk use each minute.

Locally (x86-64, heliodor-dev profile) the scaling benchmarks show
fallback/deferred_assert at 4.9x and fallback/string_array at 2.2x
the baseline, and clock-alias simulation at 0.05 us/cycle for N = 16
against 2.8 us/cycle for N = 1024; they peak at 1.0 GB resident.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T08:33:15.240178Z 2124331 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear tignear added the bench Run the CodSpeed benchmarks on this PR label Nov 19, 2026
@mergify

mergify Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3f67affd2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/codspeed.yml Resolved
Comment thread docs/benchmarks/index.md Resolved
tignear added a commit that referenced this pull request Nov 19, 2026
…are declared

Each parameter declaration built the packed dimensions of every parameter
the scope imports and of every one it had declared so far, for the
contexts that bind its value and its type: as many tables as the scope has
parameters, each as large as its packages' parameters. BlackParrot's
modules import the parameters of large configuration packages and declare
many of their own, so the copies of the dimensions of members of packed
structures were a large part of its discovery.

The parameter environment of a scope now builds the dimensions of the
imported parameters once, for the imported symbols they come from, and
each declaration adds those of the scope's parameters to a shared copy.

BlackParrot (1x1 cmark) builds with 7.7% fewer instructions than on
master (2,731.1 G to 2,521.3 G, perf stat instructions:u).

A unit test checks that the environment gives the dimensions of
`parameter_packed_dimensions_with_imported` for every prefix of a scope's
parameters, with shadowed imported ones, through two tables of imported
symbols. A first version that updated the table as parameters were
declared broke BlackParrot ("constant cast operand") while the suites
passed; BlackParrot's build is this change's regression check, and the
nightly CodSpeed BlackParrot case (#4380) compiles it. Reducing that
shape to a small regression test is #4384.

Change-Id: I3afed5e1f43e5fc3656adb19bc67c23a86b61575
@tignear
tignear force-pushed the stack/tignear/ci/codspeed-rtlmeter/measure-scheduler-scaling-rtlmeter-designs--7ff427b9 branch from 3f67aff to dbd5763 Compare November 19, 2026 05:59
@tignear

tignear commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 3f67aff 2026-11-19 05:58 UTC
2 content 3f67aff → dbd5763 The bench run lost its runner while linking four fat-LTO binaries; build with thin LTO, per-commit concurrency groups on master, and fix the documented command order (Codex threads). 2026-11-19 05:58 UTC
3 content dbd5763 → 2124331 The runner died again in the benchmark step: run without the walltime profiler, kill RTLMeter runs past 20 GiB or an hour, log memory and disk each minute. 2026-11-19 08:27 UTC

CodSpeed's ARM64 Macro Runner now measures, besides compile time:

- `benches/scaling.rs`: N clock-alias domains (`assign l1clk = clk`,
  as in VeeR-EH1's 1,451 copies) and N clock-gated flops, at N = 16 and
  1024, compile and 1,000-cycle simulation, so the history shows the
  slope; and a fixed 64-lane combinational design with ONE comb
  `$display`, `assert final`, DPI-C call in `always @*`, `string` array
  or `final` block next to the same design without it, so a construct
  that moves the whole design to a slower path shows as a gap to the
  baseline.
- `benches/rtlmeter.rs`: `celox run` (native, O2, two-state, one thread)
  on VeeR-EL2, VeeR-EH1 and XuanTie-E906 CoreMark, reporting the
  analysis and code generation time and the per-cycle time of a fixed
  `+max_cycles` window from the command's CELOX_TEST_TIMING record.
  BlackParrot 1x1 runs nightly, on dispatch or with the
  `bench-blackparrot` label. `run-rtlmeter-bench.py codspeed-layout`
  lays the cases of `benchmarks/rtlmeter/codspeed_manifest.json` out at
  the pinned RTLMeter revision, merging configuration include files,
  common arguments and Verilator parameter overrides as RTLMeter does.

The workflow runs on every push to master, each commit in a concurrency
group of its own so a burst of pushes keeps every measurement, and on
pull requests labelled `bench`, instead of only daily. It also builds
with `cranelift`, which the compilation benchmark requires (every run
since 2026-10-25 failed to build), and every manual schedule takes at
least two rounds, the fewest samples the walltime analysis accepts (one
round panicked).

The runner (32 GB, 16 Cortex-A72 cores) lost its connection twice: in
the build, linking four fat-LTO binaries at once, and in the benchmarks,
where the walltime profiler sampled every process with 8 KiB stack
copies for tens of minutes (the compilation benchmark alone takes 9.6
minutes and 6.9 GB on x86-64). The benchmarks now build with thin LTO
and run without the profiler; each RTLMeter run is killed and fails its
benchmark past 20 GiB resident or an hour and prints its start and peak
memory, and the build and run print memory and disk use each minute.

Locally (x86-64, heliodor-dev profile) the scaling benchmarks show
`fallback/deferred_assert` at 4.9x and `fallback/string_array` at 2.2x
the baseline, and clock-alias simulation at 0.05 us/cycle for N = 16
against 2.8 us/cycle for N = 1024; they peak at 1.0 GB resident.

Change-Id: I7ff427b9a4206224c1bb7c47e198ae0c83625094
@tignear
tignear force-pushed the stack/tignear/ci/codspeed-rtlmeter/measure-scheduler-scaling-rtlmeter-designs--7ff427b9 branch from dbd5763 to 2124331 Compare November 19, 2026 08:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bench Run the CodSpeed benchmarks on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant