Skip to content

feat(cli)!: unify benchmark execution under celox run - #1633

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/heliodor-tiered-parallel/unify-benchmark-execution-under-celox-run--7db09e59
Oct 20, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/heliodor-tiered-parallel/unify-benchmark-execution-under-celox-run--7db09e59

Conversation

@tignear

@tignear tignear commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Heliodor previously used a separate Celox executable with backend selection,
parallel execution, timing, caching and native-image support that ordinary CLI
users could not access. Move that execution path into celox run and remove the
celox-heliodor binary. Heliodor now invokes celox run --report --unlimited;
its tiered runner also requires compiled execution and retains the configured
thread count.

For both SystemVerilog and Veryl, expose native/tiered/interpreter/Cranelift/WASM
selection with explicit thread and state modes. Add timed tiered construction
that preserves initial scheduling and live state across promotion. Keep normal
runs free of JIT timing overhead and preserve execution limits and failures.
Veryl additionally supports compilation caching, image import/export, compiler
diagnostics and opt-in machine-readable timing records.

Accept Veryl project directories and explicit source selection through the
normal project resolver. Include CLI parameter, diagnostic and signal-access
settings in cache identity. Compile exported VPI artifacts without initializing
executable memory, retaining their warnings and supporting cross-codegen builds.
Update benchmark scripts, ARM profiling, CI selection and both language guides.

Resolve source-file paths against celox.toml's directory, report native images'
embedded state mode, and return usage status 2 for invalid execution options.
Preserve warnings from fresh native compile-only builds and reject combining
compile-only with dump-ir-and-run. Reject legacy profiling-run reuse early with
rebuild instructions; comparison baselines still accept legacy executables.
Clamp default benchmark threads to 2–64 and reset inherited overrides in the
fixed gate.

Validation:

  • cargo test --locked -p celox-vpi: 127 passed, including review regressions
    and all five CLI backends in two-state/four-state mode.
  • Timed process tests: 9 passed, including actual tiered promotion with pending
    delayed processes, NBA updates, and 1/4-thread configurations.
  • Clippy for celox and celox-vpi across all targets, formatting, API docs,
    script tests, Heliodor result/gate fixtures, workflow YAML parsing and
    syntax checks for all 19 shell steps passed.
  • Earlier validation also passed bench tests, the three explicit cocotb tests,
    ARM64 cross-codegen image export, and the CLI no-default-features check.

ARM hardware Linux boot benchmarks were not run. Existing cargo-deny CI fails
on Wasmtime 49.0.3 advisories; dependency remediation is outside this CLI change.

BREAKING CHANGE: celox run now defaults to two-state simulation for both
SystemVerilog and Veryl. Pass --four-state to retain X/Z tracking. The internal
celox-heliodor executable is replaced by celox run.

@tignear

tignear commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(bench): enable parallel execution in the Heliodor tiered runner #1625
2 feat(cli)!: unify benchmark execution under celox run #1633 👈

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-20T16:26:18.732384Z b407278 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.

@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

let compiled = compiled?;
cache.store(compiled.program_image(), &dependencies);
compiled.into_program_image()
} else {
builder.compile_native()?.into_program_image()

P2 Badge Preserve diagnostics in compile-only mode

For a successful native --compile-only invocation that emits nonfatal compiler warnings, both fresh-compilation branches immediately consume NativeCompilation into its image and discard its warning vector. The equivalent compile-and-run path calls report_warnings, so adding --compile-only silently hides diagnostics. Report compiled.warnings() before consuming the compilation, including the cache-miss branch.

ℹ️ 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 on lines +314 to +318
design
.project_root
.as_deref()
.unwrap_or(Path::new("."))
.join(path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resolve --source-file against the celox.toml directory

When --project names a celox.toml, design.project_root remains unset, so a relative --source-file is joined to the process working directory rather than the project manifest's directory. For example, invoking Celox from another directory with --project /tmp/p/celox.toml --source-file src/test.veryl attempts to read ./src/test.veryl, contrary to the option's project-relative contract. Preserve the manifest parent separately and use it as the base here.

Useful? React with 👍 / 👎.

Comment on lines +385 to 389
report!(
opts.report,
"CELOX_TEST_CONFIG test={} backend={} opt_level={} four_state={} compile_only={}",
opts.test,
opts.backend.as_str(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Report native images' embedded state mode

When --native-image-input loads an image generated with the opposite four-state setting, build_native_from_image takes the actual mode from the image, but this record prints the current CLI flag. Thus a four-state image loaded without --four-state is reported as four_state=false (and the reverse invocation can report true while executing two-state code), corrupting machine-readable benchmark configuration. Derive this field from the loaded image or reject conflicting state-mode flags.

Useful? React with 👍 / 👎.

Comment on lines +230 to +233
if opts.require_compiled && opts.backend != Backend::Tiered {
return Err(RunError::InvalidConfiguration {
message: "--require-compiled requires --backend tiered",
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Return usage status for invalid execution options

These option-compatibility checks run after Clap parsing and return RunError::InvalidConfiguration, which main maps to exit status 1. Consequently invocations such as --report --require-compiled --backend native are indistinguishable from compilation or simulation failures and violate the CLI's documented status-2 contract for invalid arguments. Encode these relationships as Clap conflicts/requirements or otherwise return a usage error.

Useful? React with 👍 / 👎.

Comment on lines 611 to +614
if opts.dump_ir_and_run {
let mut sim = compiled.initialize()?;
let testbench = compile_initial_testbench(&sim)
.ok_or(CeloxHeliodorError::MissingInitialBlock)?;
let testbench =
compile_initial_testbench(&sim).ok_or(RunError::MissingInitialBlock)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject running an explicitly compile-only invocation

If users combine --compile-only --dump-ir-dir DIR --dump-ir-and-run—a combination currently accepted—control reaches this branch and initializes and executes the testbench despite the explicit compile-only request. This can run long simulations or trigger design side effects when callers expect compilation only; reject --compile-only with --dump-ir-and-run before entering the trace path.

Useful? React with 👍 / 👎.

Comment on lines 44 to 49
if [[ -z "$CELOX_RUNNER_BIN" ]]; then
if [[ -n "$HELIODOR_CELOX_EXECUTION_TARGET" ]]; then
CELOX_RUNNER_BIN="$CELOX_TARGET_ROOT/$HELIODOR_CELOX_EXECUTION_TARGET/$HELIODOR_CELOX_CARGO_PROFILE/celox-heliodor"
CELOX_RUNNER_BIN="$CELOX_TARGET_ROOT/$HELIODOR_CELOX_EXECUTION_TARGET/$HELIODOR_CELOX_CARGO_PROFILE/celox"
else
CELOX_RUNNER_BIN="$CELOX_TARGET_ROOT/$HELIODOR_CELOX_CARGO_PROFILE/celox-heliodor"
CELOX_RUNNER_BIN="$CELOX_TARGET_ROOT/$HELIODOR_CELOX_CARGO_PROFILE/celox"
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Support legacy artifacts in profiling-run reuse

In the arm64-linux-boot-full workflow's “Reuse ARM64 profiling runners” path, selecting an arm64_profile_run_id from before this migration downloads an artifact containing celox-heliodor, while the build and Rust setup are skipped and this script now looks only for target/release/celox. The later comparison/capture steps therefore fail at chmod before profiling starts. The comparison-artifact path already handles this transition; the profiling-run reuse path needs an equivalent filename-and-CLI fallback or an explicit compatibility rejection.

Useful? React with 👍 / 👎.

Base automatically changed from stack/tignear/fix/heliodor-tiered-parallel/enable-parallel-execution-heliodor-tiered-runner--3e9e1831 to master October 20, 2026 16:21
Heliodor previously used a separate Celox executable with backend selection,
parallel execution, timing, caching and native-image support that ordinary CLI
users could not access. Move that execution path into celox run and remove the
celox-heliodor binary. Heliodor now invokes celox run --report --unlimited;
its tiered runner also requires compiled execution and retains the configured
thread count.

For both SystemVerilog and Veryl, expose native/tiered/interpreter/Cranelift/WASM
selection with explicit thread and state modes. Add timed tiered construction
that preserves initial scheduling and live state across promotion. Keep normal
runs free of JIT timing overhead and preserve execution limits and failures.
Veryl additionally supports compilation caching, image import/export, compiler
diagnostics and opt-in machine-readable timing records.

Accept Veryl project directories and explicit source selection through the
normal project resolver. Include CLI parameter, diagnostic and signal-access
settings in cache identity. Compile exported VPI artifacts without initializing
executable memory, retaining their warnings and supporting cross-codegen builds.
Update benchmark scripts, ARM profiling, CI selection and both language guides.

Resolve source-file paths against celox.toml's directory, report native images'
embedded state mode, and return usage status 2 for invalid execution options.
Preserve warnings from fresh native compile-only builds and reject combining
compile-only with dump-ir-and-run. Reject legacy profiling-run reuse early with
rebuild instructions; comparison baselines still accept legacy executables.
Clamp default benchmark threads to 2–64 and reset inherited overrides in the
fixed gate.

Validation:
- cargo test --locked -p celox-vpi: 127 passed, including review regressions
  and all five CLI backends in two-state/four-state mode.
- Timed process tests: 9 passed, including actual tiered promotion with pending
  delayed processes, NBA updates, and 1/4-thread configurations.
- Clippy for celox and celox-vpi across all targets, formatting, API docs,
  script tests, Heliodor result/gate fixtures, workflow YAML parsing and
  syntax checks for all 19 shell steps passed.
- Earlier validation also passed bench tests, the three explicit cocotb tests,
  ARM64 cross-codegen image export, and the CLI no-default-features check.

ARM hardware Linux boot benchmarks were not run. Existing cargo-deny CI fails
on Wasmtime 49.0.3 advisories; dependency remediation is outside this CLI change.

BREAKING CHANGE: celox run now defaults to two-state simulation for both
SystemVerilog and Veryl. Pass --four-state to retain X/Z tracking. The internal
celox-heliodor executable is replaced by celox run.

Change-Id: I7db09e5916dcec3a0173ad3df4901ff82eb72bb8
@tignear
tignear force-pushed the stack/tignear/fix/heliodor-tiered-parallel/unify-benchmark-execution-under-celox-run--7db09e59 branch from 3e315ef to b407278 Compare October 20, 2026 16:26
@tignear

tignear commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 3e315ef 2026-10-20 16:25 UTC
2 content 3e315ef → b407278 Address PR review findings and enable SystemVerilog backend selection with timed tiered execution. 2026-10-20 16:25 UTC

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 46 minutes 49 seconds in the queue, including 36 minutes 3 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

@mergify mergify Bot added the queued Mergify queue entry label Oct 20, 2026
@mergify
mergify Bot merged commit 2d13cb3 into master Oct 20, 2026
31 of 32 checks passed
@mergify
mergify Bot deleted the stack/tignear/fix/heliodor-tiered-parallel/unify-benchmark-execution-under-celox-run--7db09e59 branch October 20, 2026 21:35
@mergify mergify Bot removed the queued Mergify queue entry label Oct 20, 2026
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