Skip to content

Commit cd83966

Browse files
committed
ci: improve gpu failed tests summaries
1 parent db3f7ce commit cd83966

1 file changed

Lines changed: 39 additions & 13 deletions

File tree

.github/workflows/gpu-tests.yml

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ concurrency:
3232
cancel-in-progress: true
3333

3434
env:
35-
# Vast offer search: RTX 5090, >=16 cores, >=64GB RAM (the prover suite proves real ELFs,
35+
# Vast offer search: RTX 5090, >=16 cores, >=96GB RAM (the prover suite proves real ELFs,
3636
# so allow headroom), >=64GB disk, verified + rentable, Blackwell-capable driver, <= cap.
3737
GPU_NAME: RTX_5090
3838
PRICE_CAP: "1"
@@ -90,7 +90,7 @@ jobs:
9090
# 13.1 because the template's nvcc is 13.1 and build.rs JIT-compiles its PTX at load —
9191
# a 13.0 driver rejects 13.1 PTX (CUDA_ERROR_UNSUPPORTED_PTX_VERSION). Bump this in
9292
# lockstep if the base image's CUDA toolkit changes.
93-
QUERY="gpu_name=${GPU_NAME} num_gpus=1 cpu_cores_effective>=16 cpu_ram>=64 disk_space>=64 verified=true rentable=true cuda_max_good>=13.1 dph_total<=${PRICE_CAP}"
93+
QUERY="gpu_name=${GPU_NAME} num_gpus=1 cpu_cores_effective>=16 cpu_ram>=96 disk_space>=64 verified=true rentable=true cuda_max_good>=13.1 dph_total<=${PRICE_CAP}"
9494
echo "Query: $QUERY (+ client-side driver_version major >= $MIN_DRIVER)"
9595
# Keep only offers whose driver major >= MIN_DRIVER, then most expensive first (within
9696
# the cap) — premium hosts have faster disks/network and better reliability; cheapest
@@ -110,7 +110,7 @@ jobs:
110110
sleep "$OFFER_INTERVAL"
111111
done
112112
if [ -z "$OFFER_ID" ]; then
113-
echo "::error::No RTX 5090 offer matched after $OFFER_ATTEMPTS attempts (>=16 cores, >=32GB RAM, >=64GB disk, driver>=${MIN_DRIVER}, <= \$${PRICE_CAP}/hr)"
113+
echo "::error::No RTX 5090 offer matched after $OFFER_ATTEMPTS attempts (>=16 cores, >=96GB RAM, >=64GB disk, driver>=${MIN_DRIVER}, <= \$${PRICE_CAP}/hr)"
114114
exit 1
115115
fi
116116
echo "id=$OFFER_ID" >> "$GITHUB_OUTPUT"
@@ -255,18 +255,44 @@ jobs:
255255
env:
256256
OUTCOME: ${{ steps.tests.outcome }}
257257
run: |
258+
OUT="$RUNNER_TEMP/gpu_test_out.txt"
258259
{
259-
echo "## GPU tests (CUDA-only suite)"
260-
echo "Outcome: **${OUTCOME}**"
261-
# On failure, surface the failing-group markers explicitly, then the log tail.
262-
if [ "$OUTCOME" != "success" ]; then
263-
FAILED=$(grep -F '::error::GPU test group failed:' "$RUNNER_TEMP/gpu_test_out.txt" 2>/dev/null \
264-
| sed 's/.*failed: /- /' || true)
265-
[ -n "$FAILED" ] && { echo; echo "Failed groups:"; echo "$FAILED"; }
260+
echo "## GPU tests (CUDA suite) — ${OUTCOME}"
261+
if [ "$OUTCOME" = "success" ]; then
262+
echo "All GPU test groups passed."
263+
else
264+
# Group the failed tests under the make target that ran them: gpu_test.sh prints
265+
# "=== make <target> ===" before each group, and cargo prints "test <name> ... FAILED".
266+
report=$(awk '
267+
/^=== make / { grp=$3; next }
268+
/ \.\.\. FAILED/ { fails[grp]=fails[grp] "\n - " $2; n[grp]++ }
269+
END { for (g in fails) printf "- **%s** (%d failed):%s\n", g, n[g], fails[g] }
270+
' "$OUT" 2>/dev/null || true)
271+
# Per-test panic/assertion messages: each "thread '…' panicked at …:" block plus
272+
# its following message lines (assertion, left/right), capped per block.
273+
details=$(awk '
274+
/^thread .* panicked at / { cap=1; lines=0; buf=$0; next }
275+
cap {
276+
if ($0 ~ /^note: run with/ || $0 ~ /^----/ || $0 ~ /^test / || $0 ~ /^=== / || $0 ~ /^[[:space:]]*$/) { printf "%s\n\n", buf; cap=0; next }
277+
if (lines < 14) { buf=buf "\n" $0; lines++ } else if (lines==14) { buf=buf "\n ...(truncated)"; lines++ }
278+
}
279+
END { if (cap) printf "%s\n", buf }
280+
' "$OUT" 2>/dev/null || true)
281+
if [ -n "$report" ]; then
282+
echo; echo "### Failed tests by group"; echo "$report"
283+
if [ -n "$details" ]; then
284+
echo; echo "### Failure details"; echo '```'; echo "$details"; echo '```'
285+
fi
286+
else
287+
# No per-test failures parsed (likely a build/infra error) — fall back to the
288+
# failed-group markers plus a short log tail.
289+
grps=$(grep -F '::error::GPU test group failed:' "$OUT" 2>/dev/null | sed 's/.*failed: /- /' | sort -u || true)
290+
[ -n "$grps" ] && { echo; echo "### Failed groups"; echo "$grps"; }
291+
echo; echo "No individual test failures parsed (build/infra error?). Last lines:"
292+
echo '```'; tail -n 40 "$OUT" 2>/dev/null || echo "(no output captured)"; echo '```'
293+
fi
294+
echo; echo "<sub>Full output is in the \"Run GPU tests\" step log.</sub>"
266295
fi
267-
echo '```'
268-
tail -n 80 "$RUNNER_TEMP/gpu_test_out.txt" 2>/dev/null || echo "(no output captured)"
269-
echo '```'
270296
} >> "$GITHUB_STEP_SUMMARY"
271297
272298
# TEMP(debugging): when KEEP_INSTANCE=1, leave the box up and print how to reach it.

0 commit comments

Comments
 (0)