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
25 changes: 21 additions & 4 deletions .github/workflows/heliodor-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@ jobs:
run-id: ${{ inputs.arm64_profile_run_id }}
github-token: ${{ github.token }}

- name: Validate reused ARM64 profiling runner
if: inputs.arm64_profile && inputs.arm64_profile_run_id != ''
shell: bash
run: |
if [[ ! -f target/release/celox ]]; then
echo "::error::This profiling artifact predates the celox run CLI. Leave arm64_profile_run_id empty to build a compatible runner; legacy artifacts remain supported as comparison baselines."
exit 1
fi

- name: Prepare ARM64 profiling
if: inputs.arm64_profile
shell: bash
Expand Down Expand Up @@ -252,7 +261,13 @@ jobs:
source scripts/run-heliodor-bench.sh
trap cleanup_heliodor_fallback EXIT
prepare
baseline_runner="$GITHUB_WORKSPACE/target/heliodor-arm64/baseline-runners/celox-heliodor"
baseline_runner="$GITHUB_WORKSPACE/target/heliodor-arm64/baseline-runners/celox"
baseline_args=(run --report --unlimited --top test_soc_linux_boot)
# Retained comparison artifacts may predate the CLI migration.
if [[ ! -f "$baseline_runner" ]]; then
baseline_runner="$GITHUB_WORKSPACE/target/heliodor-arm64/baseline-runners/celox-heliodor"
baseline_args=(--test test_soc_linux_boot)
fi
veryl_runner="$GITHUB_WORKSPACE/target/heliodor-arm64/baseline-runners/veryl-heliodor"
veryl_cache="$GITHUB_WORKSPACE/target/heliodor-arm64/compare-veryl-cache"
chmod +x "$baseline_runner" "$CELOX_RUNNER_BIN"
Expand Down Expand Up @@ -280,7 +295,9 @@ jobs:
timeout 1200 "$veryl_runner" --project "$HELIODOR_DIR" --test test_soc_linux_boot \
"${args[@]}" > "$log" 2>&1
else
timeout 1200 "$runner" --project "$HELIODOR_DIR" --test test_soc_linux_boot \
cli_args=(run --report --unlimited --top test_soc_linux_boot)
if [[ "$label" == baseline ]]; then cli_args=("${baseline_args[@]}"); fi
timeout 1200 "$runner" "${cli_args[@]}" --project "$HELIODOR_DIR" \
--backend native --opt-level o2 "${args[@]}" > "$log" 2>&1
fi
echo "comparison=$label round=$comparison_round"
Expand All @@ -301,7 +318,7 @@ jobs:
for source in "${sources[@]}"; do args+=(--source-file "$source"); done
cd "$HELIODOR_DIR"
"$PERF_BIN" record -e cpu-clock:u -F 997 -o "$HELIODOR_RESULTS_DIR/perf.data" -- \
timeout 1200 "$CELOX_RUNNER_BIN" --project "$HELIODOR_DIR" --test test_soc_linux_boot \
timeout 1200 "$CELOX_RUNNER_BIN" run --report --unlimited --project "$HELIODOR_DIR" --top test_soc_linux_boot \
--backend native --opt-level o2 "${args[@]}" \
--dump-ir-dir "$HELIODOR_RESULTS_DIR/profile-ir" --dump-ir-and-run \
> "$HELIODOR_RESULTS_DIR/profile-linux.log" 2>&1
Expand All @@ -321,7 +338,7 @@ jobs:
name: heliodor-arm64-profiling-runners
retention-days: 7
path: |
target/release/celox-heliodor
target/release/celox
target/release/veryl-heliodor

- name: Upload nightly ARM64 Linux boot results
Expand Down
10 changes: 7 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions crates/celox-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@ arm64-codegen = ["celox/arm64-codegen"]
x86_64-codegen = ["celox/x86_64-codegen"]

[dependencies]
blake3 = "1.8"
celox = { path = "../celox" }
celox-frontend-veryl = { path = "../celox-frontend-veryl" }
clap = { workspace = true }
fxhash = { workspace = true }
libc = { workspace = true }
object = { version = "0.40", default-features = false, features = ["read_core", "elf", "std"] }
pathdiff = "0.2"
serde = { workspace = true }
serde_json = { workspace = true }
tempfile = { workspace = true }
Expand Down
9 changes: 9 additions & 0 deletions crates/celox-frontend-core/src/symbolic/flattening.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,12 @@ fn collect_inputs_with_window<A: Hash + Eq + Clone + Debug>(
set: &mut crate::HashSet<VarAtomBase<A>>,
visited: &mut HashMap<NodeId, Vec<BitAccess>>,
) {
// IEEE 1800-2023 11.4.12.1: a zero-count replication contributes no
// bits to its enclosing concatenation. There is no dependency window
// to visit, and constructing one would underflow its inclusive MSB.
if get_width(expr, arena) == 0 {
return;
}
let requested = window.unwrap_or_else(|| BitAccess::new(0, get_width(expr, arena) - 1));
let uncovered = claim_uncovered_window(visited.entry(expr).or_default(), requested);

Expand Down Expand Up @@ -596,6 +602,9 @@ fn collect_inputs_with_window<A: Hash + Eq + Clone + Debug>(
// Walk from LSB side to map the requested window to each part.
let mut part_lsb = 0usize;
for (part, width) in parts.iter().rev() {
if *width == 0 {
continue;
}
let part_msb = part_lsb + width - 1;
if win.overlaps(&BitAccess::new(part_lsb, part_msb)) {
let ov_lsb = std::cmp::max(win.lsb, part_lsb);
Expand Down
4 changes: 3 additions & 1 deletion crates/celox-frontend-sv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@ pub use lowering::{
prepare_external_hierarchy_with_foreign_resolver_with_options, schedule_sources_with_options,
};

pub use lowering::schedule_sources_with_force_signals;
pub use lowering::{
schedule_sources_with_force_signals, schedule_sources_with_parameter_expressions,
};
Loading
Loading