[AMD][CI] Name the ROCm Image That Actually Ran in AMD Job Names (#35686)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Bingxu Chen
2026-08-24 01:07:25 -07:00
committed by GitHub
co-authored by Cursor
parent 5c4622341f
commit 7de80e566c
9 changed files with 327 additions and 88 deletions
+25 -6
View File
@@ -129,26 +129,45 @@ jobs:
- name: Parse workflow files
id: parse
run: |
set -euo pipefail
# Parse the default ROCm 7.2 PR gate (exclude utility jobs)
# Excluded: call-gate, check-changes, finish, cancel, check-all-jobs
# Excluded: call-gate, check-changes, finish, cancel, check-all-jobs,
# plus the stage waits -- they run on ubuntu-latest, so the
# self-hosted-only snapshot has nothing for them. Keep the extra call:
# its delegated GPU jobs use the explicit caller name as their prefix.
# Job ids keep the -rocm720 lane suffix but display names no longer do,
# so strip it to get the prefix query_job_status.py matches against.
pr_jobs=$(yq -r '.jobs | keys | .[]' .github/workflows/pr-test-amd-rocm720.yml | \
grep -v -E '^(call-gate|check-changes|pr-test-amd-rocm720-finish|cancel|check-all-jobs)$' | \
grep -v -E '^(call-gate|check-changes|pr-test-amd-rocm720-finish|cancel|check-all-jobs|wait-for-stage-[ab]-amd-rocm720)$' | \
sed 's/-rocm720$//' | \
jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "pr_jobs=$pr_jobs" >> $GITHUB_OUTPUT
echo "PR jobs: $pr_jobs"
# Parse the default ROCm 7.2 nightly (exclude utility jobs)
# Excluded: check-all-jobs
nightly_jobs=$(yq -r '.jobs | keys | .[]' .github/workflows/nightly-test-amd-rocm720.yml | \
grep -v -E '^(check-all-jobs)$' | \
# One nightly run covers every flavor, so ask for each by its full name:
# a stem-only prefix matches every flavor and merges them into a single
# row, hiding a regression that only reproduces on one image. Nightly
# names carry the runner too, so pair each job id with its runs-on.
# Keep in sync with the rocm_version matrix in the nightly workflow.
rocm_flavors="rocm724 rocm720"
nightly_jobs=$(yq -r '.jobs | to_entries[] | .key + " " + .value."runs-on"' .github/workflows/nightly-test-amd-rocm720.yml | \
grep -v -E '^check-all-jobs ' | \
while read -r id runner; do
stem=${id%-rocm720}
for f in $rocm_flavors; do echo "$stem ($f, $runner)"; done
done | \
jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "nightly_jobs=$nightly_jobs" >> $GITHUB_OUTPUT
echo "Nightly jobs: $nightly_jobs"
# Parse the ROCm 7.0 rollback shadow (exclude utility jobs)
# Excluded: call-gate, check-changes, finish, cancel, check-all-jobs
# Excluded: call-gate, check-changes, finish, and the stage waits.
# Keep the reusable extra caller so its nested GPU jobs remain covered.
pr_rocm700_jobs=$(yq -r '.jobs | keys | .[]' .github/workflows/pr-test-amd.yml | \
grep -v -E '^(call-gate|check-changes|pr-test-amd-finish|cancel|check-all-jobs)$' | \
grep -v -E '^(call-gate|check-changes|pr-test-amd-finish|wait-for-stage-[ab]-amd)$' | \
jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "pr_rocm700_jobs=$pr_rocm700_jobs" >> $GITHUB_OUTPUT
echo "PR ROCm 7.0 shadow jobs: $pr_rocm700_jobs"