Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions docs/.vitepress/components/BenchmarkDashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -485,15 +485,11 @@ const allSeries = computed<Series[]>(() => {
if (isRetiredBenchmark(b.name)) continue;
const seriesRuntime = runtime(b.name);
if (!seriesRuntime) continue;
let benchName = normalizeBenchName(stripPrefix(b.name));
// Historical Celox tiered points also include background compilation.
// Keep their history, but do not mix them with post-compile throughput.
if (
seriesRuntime.includes("tiered") &&
/^heliodor_(?:linux_boot|suite_.+)_execution$/.test(benchName)
) {
benchName = benchName.replace(/_execution$/, "_tiered_execution");
}
const benchName = normalizeBenchName(stripPrefix(b.name));
// Keep historical phase samples in the archive, but compare tiered
// implementations only by complete workload time.
if (seriesRuntime.includes("tiered") &&
!benchName.endsWith("_total") && !benchName.endsWith("_end_to_end")) continue;
// Hosted runners hand out different CPU models between runs, so one
// backend is one series per CPU. Merging them would read as a
// regression whenever the runner happens to change model.
Expand Down Expand Up @@ -824,17 +820,17 @@ onBeforeUnmount(() => {
<p v-if="activeTab === 'heliodor'" class="bench-methodology">
Synchronous runs finish compilation before simulation begins. Tiered runs
start on the interpreter (Celox) or Cranelift (Veryl-CC), then switch to
compiled code when it is ready. Startup measures time until simulation
begins; end-to-end measures time through Linux boot completion. Both
start before design analysis. Each Veryl-CC run uses an empty C compilation
compiled code when it is ready. Tiered charts show the complete interval
from before design analysis through Linux boot completion, including
compilation while simulation is running. Each Veryl-CC run uses an empty C compilation
cache. Building the benchmark executables is excluded.
Execution time includes the testbench for both simulators.
</p>

<p v-if="activeTab === 'circuits'" class="bench-methodology">
Fixed self-checking workloads, with compilation, execution and total time
shown separately. Each point is the median of three fresh processes.
Execution includes resets, stimulus and assertions. Different workload
Fixed self-checking workloads, compared by total process time including
compilation, resets, stimulus and assertions. Each point is the median
of three fresh processes. Different workload
contracts and host architectures have separate charts. No SV frontend
comparison is implied by the Veryl results.
</p>
Expand Down
10 changes: 6 additions & 4 deletions docs/benchmarks/collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,19 @@ Resets, stimulus and assertions are included in execution time. Every measured
process must complete the entire fixed workload and print its completion marker.
Each simulator runs three fresh processes sequentially on the same host. The
primary comparison is **Celox tiered versus Veryl simulator tiered**, with the
same DUT and TB bytes. Celox starts in its interpreter and promotes to native
code (O2); Veryl starts in Cranelift with asynchronous C compilation enabled.
same DUT and TB bytes. Celox lowers both DUT and TB to the shared SIR pipeline,
starts execution in its interpreter and promotes to native code (O2). Veryl
starts in Cranelift with asynchronous C compilation enabled.
Completing before promotion is valid; dispatch/promotion statistics are retained.
Both use one simulation thread; compiler parallelism follows each implementation's
defaults within the same host CPU allocation.

The dashboard's **total** is the median process wall time, from launching the
runner through its exit, including startup and shutdown. CLI binary builds and
source preparation happen before measurement. The internal compilation/startup
and execution intervals are supplementary: background compilation overlaps
execution, so those intervals do not represent isolated compiler cost or warmed
and execution intervals remain in diagnostic logs and are not published as
comparison charts: background compilation overlaps execution, so those intervals
do not represent isolated compiler cost or warmed
throughput. Every process gets a new empty Veryl AOT cache; Celox's build cache
and waveform output are disabled. This `cold-tiered-process-v1` contract starts
new charts, separate from the old native-only internal-timing series.
Expand Down
9 changes: 4 additions & 5 deletions docs/benchmarks/heliodor.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ The benchmark separates three questions:
while compilation overlaps simulation?

Execution time includes the testbench for both simulators.
Tiered results have separate charts for startup until simulation begins, execution
with background compilation, and total time through Linux completion. The tiered
execution interval includes time on the initial backend and must not be read as
compiled-code throughput. Veryl-CC may finish on Cranelift before C compilation
Tiered charts compare only total time through Linux completion, including
startup and background compilation. Startup and execution intervals remain in
the diagnostic logs; neither is a separate tiered performance score. Veryl-CC may finish on Cranelift before C compilation
completes; these runs remain valid tiered measurements. Startup and total time
begin before design analysis; source-file loading and building the benchmark
executables with Cargo are excluded.
Expand All @@ -43,7 +42,7 @@ A run is accepted only when it:

- uses the pinned Heliodor and workload revisions;
- reaches the configured Linux completion marker;
- records compilation and execution separately;
- records total completion time, retaining timing details for diagnosis;
- compares runners built from the intended Celox and Veryl revisions;
- preserves the logs needed to diagnose a timeout or semantic mismatch;
- proves that Celox tiered promoted and executed at least one generated-code
Expand Down
4 changes: 2 additions & 2 deletions docs/benchmarks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ publication preserves both sets of results. Only `master` publishes history.

Heliodor uses an additional fixed-input acceptance workload. Its methodology is
described in [Heliodor Linux Benchmark](./heliodor.md). The dashboard compares
the native backend with synchronous Veryl-CC, and shows startup and end-to-end
time separately for Celox and Veryl-CC tiered execution. Standalone Cranelift boot
the native backend with synchronous Veryl-CC, and compares Celox and Veryl-CC
tiered execution by total time through completion, including compilation. Standalone Cranelift boot
results are excluded because their much longer runtime makes this chart
ineffective for that comparison.
Heliodor charts are separated by CPU architecture because results from different
Expand Down
7 changes: 1 addition & 6 deletions scripts/convert-heliodor-bench.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function convertPartial() {
if (row.runner.endsWith("-tiered")) {
const total = ns(row, "reported_elapsed_ns");
if (compile + execute > total) throw new Error(`${key}: startup and execution exceed total`);
return [milliseconds(`${base}_startup`, compile), milliseconds(`${base}_execution`, execute), milliseconds(`${base}_end_to_end`, total)];
return [milliseconds(`${base}_end_to_end`, total)];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update the partial-publication test for total-only tiered metrics

The existing publishes each successful backend without requiring comparison partners test in scripts/publish-heliodor-bench.test.mjs still expects three metrics for each tiered runner and unconditionally reads its _execution metric. Returning only _end_to_end now makes that test fail with 1 !== 3; changing the count alone would subsequently fail on the removed execution metric. I reproduced this with node --test scripts/publish-heliodor-bench.test.mjs. Because .github/workflows/ci.yml runs node --test scripts/*.test.mjs in the repository-script check, this blocks CI. Update that consumer test to assert the tiered total's name and value while retaining the synchronous assertions.

Useful? React with 👍 / 👎.

}
const metrics = [milliseconds(`${base}_compilation`, compile), milliseconds(`${base}_execution`, execute)];
if (row.runner === "celox" && arch === "x86_64") {
Expand Down Expand Up @@ -216,11 +216,6 @@ function convertResults(rows, arm64Rows) {
}
results.push(
milliseconds(`heliodor-${platform}/heliodor_linux_boot_end_to_end`, total),
milliseconds(`heliodor-${platform}/heliodor_linux_boot_startup`, startup),
milliseconds(
`heliodor-${platform}/heliodor_linux_boot_execution`,
execution,
),
);
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-collection-bench.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function metrics(report) {
testbench: result.testbench, testbenchSha256: result.testbenchSha256, workUnits: result.workUnits,
stateModel: result.stateModel, optimization: result.optimization, threads: result.threads };
const id = createHash("sha256").update(JSON.stringify(contract)).digest("hex").slice(0, 12);
return [["compilation", "compileNs"], ["execution", "executeNs"], ["total", "processNs"]].map(([phase, field]) => {
return [["total", "processNs"]].map(([phase, field]) => {
const values = result.samples.map(s => s[field]).sort((a, b) => a - b);
return { name: `collection-${result.runner}/collection_${result.circuit}_${id}_${report.host.arch}_${phase}`,
unit: "ns", value: values[1], range: `${values[0]}–${values[2]}`,
Expand Down
5 changes: 3 additions & 2 deletions scripts/publish-collection-bench.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ function report() {
test("publish medians only and separate every measurement contract", () => {
const input = report();
const benches = metrics(input);
assert.deepEqual(benches.map(b => b.value), [20, 40, 80, 20, 40, 80]);
assert.deepEqual(benches.map(b => b.value), [80, 80]);
assert.equal(benches[0].unit, "ns");
assert.ok(benches.every(b => b.name.endsWith("_total")));
assert.equal(JSON.parse(benches[0].extra).frontend, "veryl");
input.results.forEach(r => r.testbenchSha256 = "c".repeat(64));
assert.notEqual(metrics(input)[0].name, benches[0].name);
input.host.arch = "arm64";
assert.match(metrics(input)[0].name, /_arm64_compilation$/);
assert.match(metrics(input)[0].name, /_arm64_total$/);
});

test("qualification, failures, partial samples and altered runner contracts cannot publish", () => {
Expand Down
24 changes: 17 additions & 7 deletions scripts/publish-heliodor-bench.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,27 @@ test("publishes each successful backend without requiring comparison partners",
for (const [runner, platform, count] of [
["celox", `native-${arch}`, arch === "x86_64" ? 3 : 2],
["veryl-cc-sync", `veryl-cc-${arch}`, 2],
["celox-tiered", arch === "x86_64" ? "celox-tiered" : "celox-tiered-aarch64", 3],
["veryl-cc-tiered", `veryl-tiered-${arch}`, 3],
["celox-tiered", arch === "x86_64" ? "celox-tiered" : "celox-tiered-aarch64", 1],
["veryl-cc-tiered", `veryl-tiered-${arch}`, 1],
["celox-parallel", `native-parallel-${arch}`, 2],
]) {
const result = convert(row(runner), arch);
assert.equal(result.length, count);
assert.equal(
result.find((x) => x.name === `heliodor-${platform}/heliodor_suite_linux_boot_execution`)
.value,
2,
);
if (runner.endsWith("-tiered")) {
assert.equal(result[0].name, `heliodor-${platform}/heliodor_suite_linux_boot_end_to_end`);
assert.equal(result[0].value, 4);
} else {
assert.equal(
result.find((x) => x.name === `heliodor-${platform}/heliodor_suite_linux_boot_execution`)
.value,
2,
);
assert.equal(
result.find((x) => x.name === `heliodor-${platform}/heliodor_suite_linux_boot_compilation`)
.value,
1,
);
}
assert.deepEqual(convert(row(runner, { success: false }), arch), []);
}
}
Expand Down
13 changes: 3 additions & 10 deletions scripts/tests/convert-heliodor-bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ if (values["heliodor-celox-jit/heliodor_suite_linux_boot_execution"] !== 2) proc
if (values["heliodor-celox-total/heliodor_suite_linux_boot_execution"] !== 2.5) process.exit(1);
if (values["heliodor-veryl/heliodor_suite_linux_boot_execution"] !== 4) process.exit(1);
if (values["heliodor-celox-tiered/heliodor_suite_linux_boot_end_to_end"] !== 5.5) process.exit(1);
if (values["heliodor-celox-tiered/heliodor_suite_linux_boot_startup"] !== 0.5) process.exit(1);
if (values["heliodor-celox-tiered/heliodor_suite_linux_boot_execution"] !== 5) process.exit(1);
' "$TMP/results.json"

node -e '
Expand All @@ -61,16 +59,11 @@ if (values.some((entry) => entry.name.includes("celox-tiered"))) process.exit(1)
node -e '
const fs = require("fs");
const values = Object.fromEntries(JSON.parse(fs.readFileSync(process.argv[1], "utf8")).map((x) => [x.name, x.value]));
if (Object.keys(values).length !== 25) process.exit(1);
if (Object.keys(values).length !== 17) process.exit(1);
if (Object.keys(values).some(name => name.includes("tiered") && !name.endsWith("_end_to_end"))) process.exit(1);
const expected = {
"heliodor-veryl-tiered-x86_64/heliodor_suite_linux_boot_startup": 1.5,
"heliodor-veryl-tiered-x86_64/heliodor_suite_linux_boot_execution": 8,
"heliodor-veryl-tiered-x86_64/heliodor_suite_linux_boot_end_to_end": 9.5,
"heliodor-celox-tiered-aarch64/heliodor_suite_linux_boot_startup": 3.5,
"heliodor-celox-tiered-aarch64/heliodor_suite_linux_boot_execution": 13,
"heliodor-celox-tiered-aarch64/heliodor_suite_linux_boot_end_to_end": 16.5,
"heliodor-veryl-tiered-aarch64/heliodor_suite_linux_boot_startup": 4.5,
"heliodor-veryl-tiered-aarch64/heliodor_suite_linux_boot_execution": 16,
"heliodor-veryl-tiered-aarch64/heliodor_suite_linux_boot_end_to_end": 20.5,
"heliodor-native-x86_64/heliodor_suite_linux_boot_compilation": 1,
"heliodor-native-x86_64/heliodor_suite_linux_boot_execution": 2.5,
Expand Down Expand Up @@ -130,7 +123,7 @@ node "$ROOT/scripts/convert-heliodor-bench.mjs" "$TMP/suite-results.tsv" "$TMP/s
node - "$TMP/suite.json" <<'JS'
const assert = require("node:assert/strict");
const rows = require(process.argv[2]);
assert.equal(rows.length, 25 * 4);
assert.equal(rows.length, 17 * 4);
assert.equal(new Set(rows.map(row => row.name)).size, rows.length);
assert.equal(rows.find(row => row.name === "heliodor-native-aarch64/heliodor_suite_71_smp_linux_boot_4hart_execution").value, 8);
JS
Expand Down
Loading