Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/tests/dagsim/run_cli.sh # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / tests / dagsim / run_cli.sh` 87 lines · 5938 bytes Raw Blame History 1 #!/bin/sh 2 # run_cli.sh DAGSIM_BIN [OUT_DIR] 3 # Reproducible CLI example for omega-mv#583: pinned fixtures in, JSON and a 4 # Pareto table out, byte-identical on a second run, no GPU touched. 5 set -u 6 BIN=${1:?dagsim binary} 7 OUT=${2:-/tmp/dagsim-cli-$$} 8 F=tests/dagsim/fixtures 9 ASOF=2026-10-20 10 mkdir -p "$OUT" 11 fail=0 12 say() { echo "run_cli: $*"; } 13 check() { if [ "$1" -ne 0 ]; then say "FAIL $2"; fail=1; else say "ok $2"; fi; } 14 15 "$BIN" eval $F/m1_spark_subset.oev --asof $ASOF > "$OUT/subset.json"; rc=$? 16 check $rc "eval exits 0 on the pinned M1 subset" 17 grep -q '"status": "OK"' "$OUT/subset.json"; check $? "status OK" 18 grep -q '"makespan_ns": {"nominal": `151756700`,' "$OUT/subset.json"; check $? "serial makespan 20000 + `40736700` + `111000000` ns" 19 grep -q '"makespan_ge_bounds": true' "$OUT/subset.json"; check $? "makespan is above its bounds" 20 grep -q '"status": "UNMEASURED"' "$OUT/subset.json"; check $? "energy UNMEASURED without an instrument" 21 grep -q '"gpu_executed": false' "$OUT/subset.json"; check $? "offline: no GPU execution" 22 grep -q '"provenance": \["measured", "specified"\]' "$OUT/subset.json"; check $? "provenance list names measured and specified only" 23 "$BIN" eval $F/m1_spark_subset.oev --asof $ASOF > "$OUT/subset2.json" 24 cmp -s "$OUT/subset.json" "$OUT/subset2.json"; check $? "second run byte-identical" 25 26 "$BIN" eval $F/needs_arch244_trace.oev --asof $ASOF > "$OUT/unknown.json"; rc=$? 27 [ $rc -eq 1 ] ; check $? "unknown-trace fixture exits 1" 28 grep -q '"status": "REFUSED_UNKNOWN"' "$OUT/unknown.json"; check $? "unknown stays unknown (REFUSED_UNKNOWN)" 29 grep -q 'makespan' "$OUT/unknown.json"; [ $? -ne 0 ]; check $? "no makespan printed on refusal" 30 31 "$BIN" eval $F/m1_spark_subset.oev --asof 2026-12-01 > "$OUT/stale.json" 32 grep -q '"status": "REFUSED_STALE"' "$OUT/stale.json"; check $? "30-day calibration refused at 43 days" 33 34 "$BIN" eval $F/m1_synthetic_power.oev --asof $ASOF > "$OUT/syn.json" 35 grep -q '"status": "SYNTHETIC_SENSITIVITY_ONLY"' "$OUT/syn.json"; check $? "synthetic power is labelled, not ranked" 36 grep -q '"ranking_valid": false' "$OUT/syn.json"; check $? "energy ranking invalid on synthetic power" 37 38 "$BIN" eval $F/m1_spark_overlap.oev --asof $ASOF > "$OUT/overlap.json" 39 grep -q '"status": "OK"' "$OUT/overlap.json"; check $? "overlap fixture evaluates" 40 # two halves sharing a 65.4 GB/s pipe: 2 GB of traffic is 30.58 ms, each half's own busy 41 # time is 55.5 ms, so busy time binds and both halves end together at 40.7567 + 55.5 ms. 42 grep -q '"makespan_ns": {"nominal": `96256700`,' "$OUT/overlap.json"; check $? "split copy: busy time binds, `40756700` + `55500000` ns" 43 44 "$BIN" pareto $F/m1_spark_subset.oev $F/m1_spark_overlap.oev $F/m1_synthetic_power.oev $F/needs_arch244_trace.oev --asof $ASOF > "$OUT/pareto.txt"; rc=$? 45 check $rc "pareto exits 0" 46 grep -q 'needs_arch244_trace.oev *REFUSED_UNKNOWN' "$OUT/pareto.txt"; check $? "refused candidate shown as refused in the table" 47 grep -q 'm1_spark_overlap.oev *OK .* yes$' "$OUT/pareto.txt"; check $? "faster candidate is on the front" 48 grep -q 'm1_spark_subset.oev *OK .* no$' "$OUT/pareto.txt"; check $? "dominated candidate is off the front" 49 grep -q 'Energy not measured on every row' "$OUT/pareto.txt"; check $? "pareto says energy is not ranked" 50 51 "$BIN" diff $F/mw_baseline.oev $F/mw_reuse.oev --asof $ASOF > "$OUT/diff_reuse.json"; rc=$? 52 check $rc "reuse diff OK" 53 grep -q '"reused": 200' "$OUT/diff_reuse.json"; check $? "200 ns of search moved to the reused ledger" 54 "$BIN" diff $F/mw_baseline.oev $F/mw_bad_elimination.oev --asof $ASOF > "$OUT/diff_bad.json"; rc=$? 55 [ $rc -eq 1 ]; check $? "unproven elimination exits 1" 56 grep -q '"status": "REFUSED_REMOVED_REQUIRED"' "$OUT/diff_bad.json"; check $? "unproven elimination refused" 57 "$BIN" diff $F/mw_baseline.oev $F/mw_baseline.oev --asof $ASOF > "$OUT/diff_same.json" 58 grep -q '"kept": 4, "added": 0, "removed": 0' "$OUT/diff_same.json"; check $? "no-change fixture adds no nodes" 59 60 # omega-mv#705: inverted lifetime must not come back as an OK capacity certificate. 61 "$BIN" eval $F/inverted_masks_overflow.oev --asof 2026-10-24 > "$OUT/inverted.json"; rc=$? 62 [ $rc -eq 1 ]; check $? "inverted lifetime exits 1" 63 grep -q '"status": "REFUSED_LIFETIME"' "$OUT/inverted.json"; check $? "inverted lifetime status" 64 grep -q 'first=C' "$OUT/inverted.json"; check $? "inverted reason names first=C" 65 grep -q 'last=A' "$OUT/inverted.json"; check $? "inverted reason names last=A" 66 grep -q 'makespan' "$OUT/inverted.json"; [ $? -ne 0 ]; check $? "no makespan on inverted refusal" 67 "$BIN" eval $F/inverted_lone.oev --asof 2026-10-24 > "$OUT/inverted_lone.json"; rc=$? 68 [ $rc -eq 1 ]; check $? "lone inverted lifetime exits 1" 69 grep -q '"status": "REFUSED_LIFETIME"' "$OUT/inverted_lone.json"; check $? "lone inverted is not peak 0" 70 "$BIN" eval $F/capacity_two_80.oev --asof 2026-10-24 > "$OUT/cap80.json"; rc=$? 71 [ $rc -eq 1 ]; check $? "two overlapping 80 B buffers exit 1" 72 grep -q '"status": "REFUSED_CAPACITY"' "$OUT/cap80.json"; check $? "overlap is REFUSED_CAPACITY" 73 "$BIN" eval $F/valid_disjoint_80.oev --asof 2026-10-24 > "$OUT/disjoint80.json"; rc=$? 74 check $rc "disjoint 80 B pair exits 0" 75 grep -q '"status": "OK"' "$OUT/disjoint80.json"; check $? "disjoint pair OK" 76 grep -q '"bytes": 80' "$OUT/disjoint80.json"; check $? "disjoint peak 80" 77 "$BIN" eval $F/valid_tie_80.oev --asof 2026-10-24 > "$OUT/tie80.json"; rc=$? 78 check $rc "completion/allocation tie exits 0" 79 grep -q '"status": "OK"' "$OUT/tie80.json"; check $? "tie OK" 80 grep -q '"bytes": 80' "$OUT/tie80.json"; check $? "tie peak 80" 81 "$BIN" pareto $F/inverted_masks_overflow.oev $F/valid_disjoint_80.oev --asof 2026-10-24 > "$OUT/pareto_life.txt"; rc=$? 82 check $rc "pareto with a refused lifetime exits 0" 83 grep -q 'inverted_masks_overflow.oev *REFUSED_LIFETIME' "$OUT/pareto_life.txt"; check $? "inverted row is refused, not ranked OK" 84 grep -q 'valid_disjoint_80.oev *OK' "$OUT/pareto_life.txt"; check $? "valid row still ranked" 85 86 say "outputs in $OUT" 87 exit $fail