mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 22:10:44 +00:00
feat: add correctness-gated benchmark harness and a second interpreter
Add a manifest-driven benchmark binary that verifies each fixture against the independent reference and the GPU before timing it, reports per-stage CPU and GPU durations with medians and quartiles, and writes metadata, raw JSON and a markdown report. Extend the Metal backend with a profiled execution path that reads command-buffer GPU start and end times. Add a structurally independent second interpreter for the demo subset in the semantic-review suite. It imports neither the decoder, ISA nor reference and re-derives the encodings from the RDNA 2 field layout. A differential test compares both interpreters across all three fixtures on boundary-dense and pseudorandom inputs. Signed-off-by: Ranveer Soni <git@ranveersoni.me>
This commit is contained in:
15 files changed
+1378
-4
No files matched your search
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Timing runs must be on an idle machine with validation off.
|
||||
export MTL_DEBUG_LAYER=${MTL_DEBUG_LAYER:-0}
|
||||
export MTL_SHADER_VALIDATION=${MTL_SHADER_VALIDATION:-0}
|
||||
export CARGO_BUILD_JOBS=${CARGO_BUILD_JOBS:-4}
|
||||
|
||||
cargo build --locked --release -p xenora-benchmarks
|
||||
exec ./target/release/xenora-bench "$@"
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Source mutation campaign for the critical Phase 01 modules.
|
||||
# R2 owns execution and survivor triage; this script only reproduces the run.
|
||||
# Tests run for the mutated package only (cargo-mutants default), so this stays
|
||||
# CPU-only and never dispatches GPU work.
|
||||
out=${1:-artifacts/mutation/campaign-$(date +%Y%m%d-%H%M%S)}
|
||||
mkdir -p "$out"
|
||||
export CARGO_BUILD_JOBS=${CARGO_BUILD_JOBS:-2}
|
||||
|
||||
cargo mutants --workspace \
|
||||
--file 'crates/decoder/src/**' \
|
||||
--file 'crates/shader/src/**' \
|
||||
--file 'crates/ref/src/**' \
|
||||
--jobs 2 \
|
||||
--timeout 60 \
|
||||
--output "$out"
|
||||
Reference in new issue
Block a user