Skip to content
Open
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
39 changes: 34 additions & 5 deletions .github/workflows/parity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ jobs:

if [ -n "${{ inputs.sha }}" ]; then
ARGS="$ARGS --sha1 ${{ inputs.sha }}"
fi
if [ -n "${{ inputs.pr_id }}" ]; then
elif [ -n "${{ inputs.pr_id }}" ]; then
ARGS="$ARGS --pr_id ${{ inputs.pr_id }}"
fi
if [ "${{ inputs.exclude_distributed }}" = "true" ]; then
Expand Down Expand Up @@ -188,6 +187,7 @@ jobs:
echo "folder=$FOLDER" >> "$GITHUB_OUTPUT"
SHA=$(echo "$FOLDER" | grep -oP '[0-9a-f]{40}')
echo "sha=$SHA" >> "$GITHUB_OUTPUT"
printf '%s\n' "$SHA" > "$FOLDER/hud_sha.txt"
DATE=$(TZ='America/Los_Angeles' date '+%Y%m%d')
echo "date=$DATE" >> "$GITHUB_OUTPUT"
mv download_${{ matrix.arch }}.log "$FOLDER/" 2>/dev/null || true
Expand Down Expand Up @@ -261,6 +261,7 @@ jobs:
run: |
FOLDER=".automation_scripts/pytorch-unit-test-scripts/${{ steps.folder.outputs.folder }}"
PATHS="${FOLDER}/*.csv
${FOLDER}/hud_sha.txt
${FOLDER}/*.log
${FOLDER}/*.txt
${FOLDER}/inductor_periodic_rocm_dir/
Expand Down Expand Up @@ -332,6 +333,35 @@ jobs:
ARCH_ARGS+=("$ARCH")
done

HUD_SHA="$SHA"
if [ -z "$HUD_SHA" ]; then
HUD_SHA_FILE=$(find ../../artifacts/ -name hud_sha.txt -print -quit)
if [ -n "$HUD_SHA_FILE" ]; then
HUD_SHA=$(cat "$HUD_SHA_FILE" | head -1)
fi
fi
if [ -z "$HUD_SHA" ]; then
HUD_SHA=$(find ../../artifacts/ -name '*.csv' | grep -oE '[0-9a-f]{40}' | head -1 || true)
fi
HUD_URL=""
if [ -n "$PR_ID" ]; then
if [ -n "$HUD_SHA" ]; then
HUD_URL="https://hud.pytorch.org/pytorch/pytorch/pull/${PR_ID}?sha=${HUD_SHA}"
else
echo "::warning::Unable to determine exact SHA for PR HUD link"
fi
elif [ -n "$HUD_SHA" ]; then
HUD_URL="https://hud.pytorch.org/pytorch/pytorch/commit/${HUD_SHA}"
fi
if [ -n "$HUD_URL" ]; then
{
echo "### HUD"
echo ""
echo "[HUD LINK]($HUD_URL)"
echo ""
} >> "$GITHUB_STEP_SUMMARY"
fi

if [ ${#CSV_ARGS[@]} -eq 0 ]; then
echo "::warning::No CSVs found for any architecture — some or all generate-parity jobs may have failed"
echo "## ⚠ No CSVs produced" >> "$GITHUB_STEP_SUMMARY"
Expand All @@ -345,9 +375,8 @@ jobs:
if [ -n "$SHA" ]; then
ARGS+=(--sha "$SHA")
else
DETECTED_SHA=$(basename "$(find ../../artifacts/ -name '*.csv' | head -1)" | grep -oP '[0-9a-f]{40}' || true)
if [ -n "$DETECTED_SHA" ]; then
ARGS+=(--sha "$DETECTED_SHA")
if [ -n "$HUD_SHA" ]; then
ARGS+=(--sha "$HUD_SHA")
fi
fi
if [ -n "$PR_ID" ]; then
Expand Down
Loading