Repository navigation
ci: run 8xGPU ROCm integration tests on linux_job_v2 (fix ECR auth) - #3562
Conversation
The 8 GPU H100 integration test ran every matrix entry on linux_job_v3. The ROCm entry failed at the docker pull step with "no basic auth credentials": v3 is handed the full private-ECR image path but does not log the ROCm runner into ECR. The working ROCm workflows (models, features, ...) instead pass the bare image name and let linux_job_v2 resolve and authenticate against ECR. Centralize the reusable-workflow choice in set-matrix.yaml. It now takes a cuda-linux-job-v3 input (default false -> v2) and returns ready-to-use matrix-v2 / matrix-v3 outputs plus has-v2 / has-v3 guards. GitHub Actions forbids expressions in a job's uses: keyword, so the caller still needs two statically-declared jobs, but the policy (ROCm always v2, CUDA on v3 only when opted in) lives in one place. The existing matrix output is unchanged, so the other seven set-matrix callers are unaffected. integration_test_8gpu_h100.yaml now runs CUDA on linux_job_v3 (full ECR path) and ROCm on linux_job_v2 (bare image name), each gated on its has-* output.
|
Warning: Unknown label
Please add the new label to .github/pytorch-probot.yml |
Split the ROCm entry out of integration_test_8gpu_h100.yaml into a new standalone integration_test_8gpu_rocm.yaml that runs on linux_job_v2, matching every other integration_test_*.yaml layout. set-matrix now splits by GPU arch (matrix-cuda / matrix-rocm plus has-cuda / has-rocm) instead of by reusable-workflow version, since each workflow now picks its own linux_job version statically. The combined matrix output is unchanged, so the other set-matrix callers are unaffected. The H100 workflow is now CUDA-only on linux_job_v3.
|
Warning: Unknown label
Please add the new label to .github/pytorch-probot.yml |
Instead of emitting matrix / matrix-cuda / matrix-rocm (plus has-cuda /
has-rocm), set-matrix now takes a single gpu-arch input ('all' default,
'cuda', or 'rocm') and returns one narrowed matrix plus a has-entries
guard. The H100 workflow passes gpu-arch: cuda and the ROCm workflow
passes gpu-arch: rocm; the other callers omit it and get the combined
matrix as before.
With PIP_EXTRA_INDEX_URL cleared, --force-reinstall re-downloads torch's deps (filelock, sympy, ...) from the public PyPI CDN instead of the in-cluster cache, which intermittently fails with connection resets on the H100 runner. torch itself still comes from the nightly --index-url; its deps stay already-satisfied.
Ensures the nightly torch actually installs without --force-reinstall: a torch baked into the image (e.g. pulled transitively) would otherwise be skipped as already-satisfied. pip uninstall -y is a no-op (exit 0) when torch is absent.
Removes the has-entries output from set-matrix and the if-guard from the
H100/ROCm build-test jobs, so an empty {"include":[]} matrix is passed
through directly.
The H100 (CUDA, linux_job_v3) and ROCm (linux_job_v2) workflows ran a near-identical inline script. Move it to scripts/ci/run_8xgpu_integration_tests.sh, which both call with the matrix values passed as env vars (INDEX_URL, GPU_ARCH_TYPE, TORCH_VERSION). The ROCm-only HIPBLASLT step is guarded and a no-op on CUDA. Conda is initialized via the shell hook since the script now runs in its own bash.
Decide CUDA/ROCm eligibility (trigger + gpu-arch input + is-experimental) as booleans and assemble the include list from only the eligible entries, instead of string-splicing a full matrix and filtering it afterward with jq. This also drops the ROCM_MATRIX="" experimental hack, which used to produce invalid JSON ([<cuda>,]) on the main/schedule branch.
|
Warning: Unknown label
Please add the new label to .github/pytorch-probot.yml |
This linux_job_v3 workflow clears PIP_EXTRA_INDEX_URL and force-reinstalls torch, which re-downloads torch's deps from the public PyPI CDN and intermittently fails with connection resets on the H100 runner (same as integration_test_8gpu_h100). Uninstall torch first, then install the nightly without --force-reinstall so the already-present deps are reused. The linux_job_v2 workflows keep --force-reinstall (they don't clear the in-cluster cache, so they don't hit the public CDN).
Keep the original trigger-based include logic untouched and just narrow the matrix to the requested gpu-arch with a jq filter, instead of the boolean-rewrite construction. Smaller, lower-risk change to set-matrix.
The shared script used the H100/v3 path verbatim, which broke the ROCm v2 run two ways: - `mkdir -p $RUNNER_TEMP/...` fails with "Permission denied" because the v2 ROCm container user can't write the host-owned RUNNER_TEMP. Use `sudo mkdir` + `sudo chown` on ROCm (as the other ROCm workflows do); keep plain mkdir for the v3 CUDA runner. - `/install_deepep.sh` (NVSHMEM, set -eux) is CUDA-only; skip it on ROCm.
Per review feedback, relocate run_8xgpu_integration_tests.sh from scripts/ci/ to .github/scripts/ and update both workflow references.
Drop the standalone integration_test_8gpu_rocm.yaml and instead add a second set-matrix (gpu-arch: rocm) + build-test-rocm (linux_job_v2) pair to integration_test_8gpu_h100.yaml, alongside the existing CUDA set-matrix + build-test (linux_job_v3). Both call the shared .github/scripts/run_8xgpu_integration_tests.sh. Avoids a new workflow file while keeping CUDA on v3 and ROCm on v2.
set-matrix returns an empty matrix for the "off" arch of a single-arch trigger (CUDA on a label event, ROCm on a synchronize push), and an empty matrix errors at strategy evaluation rather than skipping. Gate each build-test on a non-empty matrix via an inline fromJSON check (the job-level if is evaluated before matrix expansion), so the job skips cleanly. The matrix != '' guard short-circuits the fromJSON when set-matrix is skipped.
ROCm now runs as a job in integration_test_8gpu_h100.yaml, not the deleted integration_test_8gpu_rocm.yaml.
|
thanks for this fix @huydhn! |
Np, the job is running correctly now, but the test is failing https://github.com/pytorch/torchtitan/actions/runs/27062299168/job/79877062290. I don't have the context on how to fix it, so please help take look there and let me know if additional infra / CI changes are needed |
) fix CI errors on rocm when running `deepseek_v3_fsdp+hybridep+compile` example: https://github.com/pytorch/torchtitan/actions/runs/27108561047/job/80002013308 ``` ImportError: HybridEP requires deep_ep library. Install from: https://github.com/deepseek-ai/DeepEP, branch: hybrid-ep ``` Claude summary: What happened: - #3360 added the deepseek_v3_fsdp+hybridep+compile test to the h100 suite (tests/integration_tests/h100.py:82-95) and installed deep_ep in CUDA CI. That worked fine — at the time only the CUDA H100 job ran the h100 suite. - #3562 made the ROCm runner also execute the same h100 suite via the new shared run_8xgpu_integration_tests.sh. But deep_ep/NVSHMEM is CUDA-only, so the script deliberately skips installing it on ROCm (run_8xgpu_integration_tests.sh:71). The hybridep test still runs on ROCm → ModuleNotFoundError: No module named 'deep_ep'.
Fixes #3552
Fixes pytorch/test-infra#8152
Why
The H100 integration test ran the ROCm entry on
linux_job_v3, which fails at docker pull withno basic auth credentials(run) — v3 gets the full ECR path but doesn't authenticate the ROCm runner.linux_job_v2takes the bare image name and authenticates.What
In
integration_test_8gpu_h100.yaml, run CUDA and ROCm as separate jobs instead of one job on v3:set-matrix(gpu-arch: cuda) →build-testonlinux_job_v3(full ECR path) — the existing CUDA path, unchanged.set-matrix-rocm(gpu-arch: rocm) →build-test-rocmonlinux_job_v2(bare image name).Supporting changes:
set-matrix.yamlgains agpu-archinput (alldefault /cuda/rocm) and filters the returned matrix to that arch.build-test*is gated by an inline non-empty-matrix check (fromJSON(...).include[0] != null), so it skips cleanly when the matrix is empty for that arch on a single-arch trigger (CUDA onlabeled, ROCm onsynchronize) instead of erroring at matrix evaluation..github/scripts/run_8xgpu_integration_tests.sh, called by both jobs. ROCm-specific handling is gated there: artifacts dir created viasudo(the v2 container can't write host-ownedRUNNER_TEMP), and DeepEP/NVSHMEM is skipped (CUDA-only).--force-reinstall(uninstall torch first instead) on thelinux_job_v3workflows (integration_test_8gpu_h100,integration_test_8gpu_graph_trainer_h100): withPIP_EXTRA_INDEX_URLcleared,--force-reinstallre-pulls torch's deps from the public PyPI CDN and intermittently fails with connection resets. Thelinux_job_v2workflows are unchanged.Test
Toggle the
ciflow/h100.8label (remove + re-add) to fire alabeledevent → runsbuild-test-rocmonlinux_job_v2;build-test(CUDA) skips. An ordinary push runs CUDA and skips ROCm; pushes tomain/ the schedule run both. ROCm test bodies (none markedskip_rocm_testyet) are a follow-up.