Skip to content

[CI] harden aiter-whl download (digest-mismatch fallback) + raise fd limit for ATOM editable build - #1660

Merged
gyohuangxin merged 5 commits into
mainfrom
fix/ci-aiter-wheel-download-and-ulimit
Jul 22, 2026
Merged

gyohuangxin merged 5 commits into
mainfrom
fix/ci-aiter-wheel-download-and-ulimit

Conversation

@sunway513

Copy link
Copy Markdown
Collaborator

What

Harden two intermittent, PR-agnostic failures in the atom-sglang-test accuracy jobs (.github/workflows/atom-sglang-test.yaml):

  1. Download aiter wheel flakiness. actions/download-artifact@v8 intermittently fails the ~600 MB aiter-whl transfer with a digest-mismatch after its 5 internal retries (observed on DeepSeek-R1-FP4-V2 TP8 MTP3, ~37 min then hard fail). The step is now continue-on-error, followed by a resilient fallback that re-fetches the same run-scoped aiter-whl artifact via the REST API with 5 backoff retries. A flaky artifact transfer no longer red-lights the accuracy job.

  2. ATOM editable build fd exhaustion. pip install -e . (which builds the Rust extension via cargo) fails with cargo build ... Too many open files (os error 24) when the runner's default nofile soft limit is low. Raise it in the same shell before the build.

Why

Both failures are unrelated to any model/PR change and reproduce on main:

  • unified_kv_rope / cudagraph and download failures on in-flight PRs (e.g. adding profiling context #477) trace to these infra issues, not the PR content.
  • The cargo fd failure hit main's Install ATOM and dependencies step directly.

Not covered here (needs infra / image owner)

The DeepSeek-V4-Pro accuracy job separately fails with 'DeepseekV4Attention' object has no attribute 'unified_kv_rope' during SGLang cudagraph capture. unified_kv_rope is set in atom/model_ops/attentions/deepseek_v4_attn.py and read in atom/models/deepseek_v4.py — both consistent on current main, so this is a stale/mismatched ATOM in the SGLang base image. The fix is to rebuild the SGLang base image from current main and pin the base-image + aiter-wheel to a coherent set (rather than "latest main"). Tracked alongside ROCm/aiter#4304.

Test plan

Re-run the atom-sglang-test accuracy matrix; the aiter-whl download should survive a digest-mismatch via the fallback, and the ATOM editable build should no longer hit the fd limit. (CI validation needs a maintainer run.)

Copilot AI review requested due to automatic review settings July 21, 2026 21:27
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every eligible PR before approval:

  • ✅ Pre Checkin: Black, Ruff, catalog schema validation, non-GPU unit tests

Heavy model tests:

  • ✅ Run after the PR is approved and Pre Checkin passes
  • ✅ Run immediately when an approval review is submitted
  • ✅ Can be requested before approval with labels
Label Tests
ci:full Run all heavy PR model tests: native ATOM, vLLM, and SGLang
ci:atom Run native ATOM model accuracy tests
ci:vllm Run ATOM vLLM OOT model accuracy tests
ci:sglang Run ATOM SGLang model accuracy tests

Heavy jobs are skipped when the PR is not approved and no matching ci:* label is present.
Add labels via the sidebar or gh pr edit 1660 --add-label <label>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the atom-sglang-test accuracy workflow by making the aiter-whl artifact download resilient to intermittent digest-mismatch failures, and by raising the open-file descriptor limit before the editable ATOM build (cargo) inside the SGLang overlay image build.

Changes:

  • Make actions/download-artifact@v8 for aiter-whl non-fatal and add a retrying REST/API-based fallback downloader.
  • Increase nofile soft limit (ulimit -n) before pip install -e . during the Docker build to avoid Too many open files (os error 24).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/atom-sglang-test.yaml Outdated
Comment on lines +279 to +300
set -uo pipefail
# actions/download-artifact@v8 intermittently fails the aiter-whl
# (~600 MB) transfer with a digest-mismatch after 5 internal retries.
# If the primary download did not land the wheel, re-fetch the same
# run-scoped artifact directly via the API with backoff.
if ls aiter-whl/amd_aiter*.whl >/dev/null 2>&1; then
echo "aiter wheel present from primary download"; exit 0
fi
echo "Primary download-artifact failed or empty; falling back to direct API download"
mkdir -p aiter-whl
aid=$(gh api "repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts" \
--jq '.artifacts[] | select(.name=="aiter-whl") | .id' | head -1)
if [ -z "${aid:-}" ]; then echo "ERROR: no aiter-whl artifact found for run ${GITHUB_RUN_ID}"; exit 1; fi
for i in 1 2 3 4 5; do
if gh api "repos/${GITHUB_REPOSITORY}/actions/artifacts/${aid}/zip" > aiter-whl.zip 2>/dev/null \
&& unzip -o -q aiter-whl.zip -d aiter-whl \
&& ls aiter-whl/amd_aiter*.whl >/dev/null 2>&1; then
echo "Fallback download succeeded on attempt ${i}"; rm -f aiter-whl.zip; exit 0
fi
echo "Fallback attempt ${i} failed; retrying in $((i*20))s"; sleep $((i*20))
done
echo "ERROR: aiter wheel download failed after primary + 5 fallback retries"; exit 1
Copilot AI review requested due to automatic review settings July 21, 2026 21:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/atom-sglang-test.yaml Outdated
Comment on lines +267 to +270
- name: Download aiter wheel
id: dl_aiter
uses: actions/download-artifact@v8
continue-on-error: true
@sunway513

Copy link
Copy Markdown
Collaborator Author

@okakarpa please review before merge. This hardens two PR-agnostic CI failures in atom-sglang-test (both reproduce on main and other PRs, see the linked analysis):

  1. aiter-whl download — download-artifact@v8 digest-mismatch on the ~600MB wheel after its 5 internal retries; added continue-on-error + a run-scoped API re-download with backoff (curl+python3, since gh CLI isn't on the self-hosted GPU runner).
  2. ATOM editable build — cargo ... Too many open files (os error 24); raise nofile ulimit before pip install -e ..

Static checks are green (Black/Ruff/actionlint/unit). The GPU accuracy jobs are path-skipped on this workflow-only PR, so the download-fallback/ulimit are exercised only on a full accuracy re-run. Cross-PR evidence + root causes: https://amd.atlassian.net/wiki/spaces/~pensun/pages/1809672378

@sunway513
sunway513 requested a review from okakarpa July 21, 2026 23:29
@gyohuangxin

Copy link
Copy Markdown
Member

@sunway513 Thanks for the enhancement. This is very helpful. We already have a unified script for handling aiter wheel downloads, and I am optimizing it in this commit: 0fd8cb7. I think I can adopt your optimization in that script after this lands, so we only need to maintain the logic in one place.

@gyohuangxin
gyohuangxin force-pushed the fix/ci-aiter-wheel-download-and-ulimit branch from faef936 to 6d5701b Compare July 22, 2026 08:48
Copilot AI review requested due to automatic review settings July 22, 2026 08:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/atom-sglang-test.yaml Outdated
Comment thread .github/workflows/atom-sglang-test.yaml Outdated
git clone "${GITHUB_REPO_URL}" /app/ATOM && \
cd /app/ATOM && \
git checkout "${GITHUB_COMMIT_SHA}" && \
ulimit -n 1048576 || true && \
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 22, 2026 09:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +311 to +313
echo "=== nofile BEFORE: soft=$(ulimit -Sn) hard=$(ulimit -Hn)" && \
(ulimit -n 1048576 2>/dev/null || ulimit -n 65536 2>/dev/null || true) && \
echo "=== nofile AFTER: soft=$(ulimit -Sn) hard=$(ulimit -Hn)" && \
@gyohuangxin
gyohuangxin merged commit ae3a7fe into main Jul 22, 2026
32 of 43 checks passed
@gyohuangxin
gyohuangxin deleted the fix/ci-aiter-wheel-download-and-ulimit branch July 22, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants