Skip to content

[OSDC] Migrate pull.yml to support OSDC ARC routing - #177992

Closed
huydhn wants to merge 61 commits into
gh/huydhn/12/basefrom
gh/huydhn/12/head
Closed

huydhn wants to merge 61 commits into
gh/huydhn/12/basefrom
gh/huydhn/12/head

Conversation

@huydhn

@huydhn huydhn commented Mar 20, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

When the runner-determinator sets use-arc == 'true', Linux build/test jobs now route to OSDC ARC runners via _linux-build-osdc.yml and _linux-test-osdc.yml. When use-arc != 'true', the existing EC2 code path continues to be used. Each routable job group gets a parallel -osdc variant gated on the use-arc output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:

  • linux-jammy-py3.10-gcc11 (build + test)
  • linux-jammy-py3.14t-clang15 (build + test)
  • linux-jammy-py3.10-gcc11-no-ops (build only)
  • linux-jammy-py3.10-clang18-asan (build + test)
  • linux-jammy-py3.10-clang15 (build + test)
  • linux-jammy-py3.14-clang15 (build + test)
  • linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
  • dynamo-cpython (build + test)

CUDA jobs:

  • linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
  • linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged for now, and to be migrated next:

  • linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)
  • linux-jammy-py3.10-clang15-onnx (build + test)
  • linux-jammy-rocm-py3.10 (ROCm partner hardware)
  • linux-jammy-xpu-n-py3.10 (XPU partner hardware)
  • linux-docs (uses _docs.yml)

EC2-to-ARC runner mapping (from .github/arc.yaml):

  • linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64
  • linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-128

Signed-off-by: Huy Do [email protected]

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo @Lucaskabela

[ghstack-poisoned]
@huydhn
huydhn requested a review from a team as a code owner March 20, 2026 19:28
@pytorch-bot

pytorch-bot Bot commented Mar 20, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/177992

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures, 32 Pending, 5 Unrelated Failures

As of commit a0cdbb3 with merge base 8c23f31 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Mar 20, 2026
huydhn added a commit that referenced this pull request Mar 20, 2026
When the runner-determinator sets `use-arc == 'true'`, Linux build/test
jobs now route to OSDC ARC runners via `_linux-build-osdc.yml` and
`_linux-test-osdc.yml`. When `use-arc != 'true'`, the existing EC2 code
path continues to be used. Each routable job group gets a parallel
`-osdc` variant gated on the `use-arc` output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:
- linux-jammy-py3.10-gcc11 (build + test)
- linux-jammy-py3.14t-clang15 (build + test)
- linux-jammy-py3.10-gcc11-no-ops (build only)
- linux-jammy-py3.10-clang18-asan (build + test)
- linux-jammy-py3.10-clang15-onnx (build + test)
- linux-jammy-py3.10-clang15 (build + test)
- linux-jammy-py3.14-clang15 (build + test)
- linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
- dynamo-cpython (build + test)
- linux-jammy-rocm-py3.10 (ROCm partner hardware)
- linux-jammy-xpu-n-py3.10 (XPU partner hardware)

CUDA jobs:
- linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
- linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged (no OSDC alternative):
- linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)

linux-docs is gated to EC2-only (`use-arc != 'true'`) for now and will
be updated for OSDC support later.

OSDC jobs use pinned test-infra base images:
- CPU: ghcr.io/pytorch/test-infra:cpu-x86_64-a235b1b
- CUDA: ghcr.io/pytorch/test-infra:cuda-x86_64-a235b1b

EC2-to-ARC runner mapping (from .github/arc.yaml):
- linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64 (more memory, fix OOM)
- linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-32
- linux.g4dn.metal.nvidia.gpu -> l-bx86iavx512-94-384-t4-8

Signed-off-by: Huy Do <[email protected]>
ghstack-source-id: ac50dfc
Pull-Request: #177992
huydhn added a commit that referenced this pull request Mar 20, 2026
When the runner-determinator sets `use-arc == 'true'`, Linux build/test
jobs now route to OSDC ARC runners via `_linux-build-osdc.yml` and
`_linux-test-osdc.yml`. When `use-arc != 'true'`, the existing EC2 code
path continues to be used. Each routable job group gets a parallel
`-osdc` variant gated on the `use-arc` output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:
- linux-jammy-py3.10-gcc11 (build + test)
- linux-jammy-py3.14t-clang15 (build + test)
- linux-jammy-py3.10-gcc11-no-ops (build only)
- linux-jammy-py3.10-clang18-asan (build + test)
- linux-jammy-py3.10-clang15-onnx (build + test)
- linux-jammy-py3.10-clang15 (build + test)
- linux-jammy-py3.14-clang15 (build + test)
- linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
- dynamo-cpython (build + test)
- linux-jammy-rocm-py3.10 (ROCm partner hardware)
- linux-jammy-xpu-n-py3.10 (XPU partner hardware)

CUDA jobs:
- linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
- linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged (no OSDC alternative):
- linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)

linux-docs is gated to EC2-only (`use-arc != 'true'`) for now and will
be updated for OSDC support later.

OSDC jobs use pinned test-infra base images:
- CPU: ghcr.io/pytorch/test-infra:cpu-x86_64-a235b1b
- CUDA: ghcr.io/pytorch/test-infra:cuda-x86_64-a235b1b

EC2-to-ARC runner mapping (from .github/arc.yaml):
- linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64 (more memory, fix OOM)
- linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-32
- linux.g4dn.metal.nvidia.gpu -> l-bx86iavx512-94-384-t4-8

Signed-off-by: Huy Do <[email protected]>
ghstack-source-id: ac50dfc
Pull-Request: #177992
huydhn added a commit that referenced this pull request Mar 20, 2026
When the runner-determinator sets `use-arc == 'true'`, Linux build/test
jobs now route to OSDC ARC runners via `_linux-build-osdc.yml` and
`_linux-test-osdc.yml`. When `use-arc != 'true'`, the existing EC2 code
path continues to be used. Each routable job group gets a parallel
`-osdc` variant gated on the `use-arc` output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:
- linux-jammy-py3.10-gcc11 (build + test)
- linux-jammy-py3.14t-clang15 (build + test)
- linux-jammy-py3.10-gcc11-no-ops (build only)
- linux-jammy-py3.10-clang18-asan (build + test)
- linux-jammy-py3.10-clang15-onnx (build + test)
- linux-jammy-py3.10-clang15 (build + test)
- linux-jammy-py3.14-clang15 (build + test)
- linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
- dynamo-cpython (build + test)
- linux-jammy-rocm-py3.10 (ROCm partner hardware)
- linux-jammy-xpu-n-py3.10 (XPU partner hardware)

CUDA jobs:
- linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
- linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged (no OSDC alternative):
- linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)

linux-docs is gated to EC2-only (`use-arc != 'true'`) for now and will
be updated for OSDC support later.

OSDC jobs use pinned test-infra base images:
- CPU: ghcr.io/pytorch/test-infra:cpu-x86_64-a235b1b
- CUDA: ghcr.io/pytorch/test-infra:cuda-x86_64-a235b1b

EC2-to-ARC runner mapping (from .github/arc.yaml):
- linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64 (more memory, fix OOM)
- linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-32
- linux.g4dn.metal.nvidia.gpu -> l-bx86iavx512-94-384-t4-8

Signed-off-by: Huy Do <[email protected]>
ghstack-source-id: ac50dfc
Pull-Request: #177992
[ghstack-poisoned]
huydhn added a commit that referenced this pull request Mar 20, 2026
When the runner-determinator sets `use-arc == 'true'`, Linux build/test
jobs now route to OSDC ARC runners via `_linux-build-osdc.yml` and
`_linux-test-osdc.yml`. When `use-arc != 'true'`, the existing EC2 code
path continues to be used. Each routable job group gets a parallel
`-osdc` variant gated on the `use-arc` output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:
- linux-jammy-py3.10-gcc11 (build + test)
- linux-jammy-py3.14t-clang15 (build + test)
- linux-jammy-py3.10-gcc11-no-ops (build only)
- linux-jammy-py3.10-clang18-asan (build + test)
- linux-jammy-py3.10-clang15-onnx (build + test)
- linux-jammy-py3.10-clang15 (build + test)
- linux-jammy-py3.14-clang15 (build + test)
- linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
- dynamo-cpython (build + test)
- linux-jammy-rocm-py3.10 (ROCm partner hardware)
- linux-jammy-xpu-n-py3.10 (XPU partner hardware)

CUDA jobs:
- linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
- linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged (no OSDC alternative):
- linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)

linux-docs is gated to EC2-only (`use-arc != 'true'`) for now and will
be updated for OSDC support later.

OSDC jobs use pinned test-infra base images:
- CPU: ghcr.io/pytorch/test-infra:cpu-x86_64-a235b1b
- CUDA: ghcr.io/pytorch/test-infra:cuda-x86_64-a235b1b

EC2-to-ARC runner mapping (from .github/arc.yaml):
- linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64 (more memory, fix OOM)
- linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-32
- linux.g4dn.metal.nvidia.gpu -> l-bx86iavx512-94-384-t4-8

Signed-off-by: Huy Do <[email protected]>
ghstack-source-id: 1d649b4
Pull-Request: #177992
Signed-off-by: Huy Do <[email protected]>

Update pull

Signed-off-by: Huy Do <[email protected]>
[ghstack-poisoned]
huydhn added a commit that referenced this pull request Mar 21, 2026
When the runner-determinator sets `use-arc == 'true'`, Linux build/test
jobs now route to OSDC ARC runners via `_linux-build-osdc.yml` and
`_linux-test-osdc.yml`. When `use-arc != 'true'`, the existing EC2 code
path continues to be used. Each routable job group gets a parallel
`-osdc` variant gated on the `use-arc` output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:
- linux-jammy-py3.10-gcc11 (build + test)
- linux-jammy-py3.14t-clang15 (build + test)
- linux-jammy-py3.10-gcc11-no-ops (build only)
- linux-jammy-py3.10-clang18-asan (build + test)
- linux-jammy-py3.10-clang15-onnx (build + test)
- linux-jammy-py3.10-clang15 (build + test)
- linux-jammy-py3.14-clang15 (build + test)
- linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
- dynamo-cpython (build + test)
- linux-jammy-rocm-py3.10 (ROCm partner hardware)
- linux-jammy-xpu-n-py3.10 (XPU partner hardware)

CUDA jobs:
- linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
- linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged (no OSDC alternative):
- linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)

linux-docs is gated to EC2-only (`use-arc != 'true'`) for now and will
be updated for OSDC support later.

OSDC jobs use pinned test-infra base images:
- CPU: ghcr.io/pytorch/test-infra:cpu-x86_64-a235b1b
- CUDA: ghcr.io/pytorch/test-infra:cuda-x86_64-a235b1b

EC2-to-ARC runner mapping (from .github/arc.yaml):
- linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64 (more memory, fix OOM)
- linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-32
- linux.g4dn.metal.nvidia.gpu -> l-bx86iavx512-94-384-t4-8

Signed-off-by: Huy Do <[email protected]>
ghstack-source-id: 50fee65
Pull-Request: #177992
Signed-off-by: Huy Do <[email protected]>
[ghstack-poisoned]
@huydhn
huydhn requested a review from jeffdaily as a code owner March 22, 2026 01:26
huydhn added a commit that referenced this pull request Mar 22, 2026
When the runner-determinator sets `use-arc == 'true'`, Linux build/test
jobs now route to OSDC ARC runners via `_linux-build-osdc.yml` and
`_linux-test-osdc.yml`. When `use-arc != 'true'`, the existing EC2 code
path continues to be used. Each routable job group gets a parallel
`-osdc` variant gated on the `use-arc` output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:
- linux-jammy-py3.10-gcc11 (build + test)
- linux-jammy-py3.14t-clang15 (build + test)
- linux-jammy-py3.10-gcc11-no-ops (build only)
- linux-jammy-py3.10-clang18-asan (build + test)
- linux-jammy-py3.10-clang15-onnx (build + test)
- linux-jammy-py3.10-clang15 (build + test)
- linux-jammy-py3.14-clang15 (build + test)
- linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
- dynamo-cpython (build + test)
- linux-jammy-rocm-py3.10 (ROCm partner hardware)
- linux-jammy-xpu-n-py3.10 (XPU partner hardware)

CUDA jobs:
- linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
- linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged (no OSDC alternative):
- linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)

linux-docs is gated to EC2-only (`use-arc != 'true'`) for now and will
be updated for OSDC support later.

OSDC jobs use pinned test-infra base images:
- CPU: ghcr.io/pytorch/test-infra:cpu-x86_64-a235b1b
- CUDA: ghcr.io/pytorch/test-infra:cuda-x86_64-a235b1b

EC2-to-ARC runner mapping (from .github/arc.yaml):
- linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64 (more memory, fix OOM)
- linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-32
- linux.g4dn.metal.nvidia.gpu -> l-bx86iavx512-94-384-t4-8

Signed-off-by: Huy Do <[email protected]>
ghstack-source-id: 7978148
Pull-Request: #177992
Signed-off-by: Huy Do <[email protected]>
[ghstack-poisoned]
huydhn added a commit that referenced this pull request Mar 22, 2026
When the runner-determinator sets `use-arc == 'true'`, Linux build/test
jobs now route to OSDC ARC runners via `_linux-build-osdc.yml` and
`_linux-test-osdc.yml`. When `use-arc != 'true'`, the existing EC2 code
path continues to be used. Each routable job group gets a parallel
`-osdc` variant gated on the `use-arc` output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:
- linux-jammy-py3.10-gcc11 (build + test)
- linux-jammy-py3.14t-clang15 (build + test)
- linux-jammy-py3.10-gcc11-no-ops (build only)
- linux-jammy-py3.10-clang18-asan (build + test)
- linux-jammy-py3.10-clang15-onnx (build + test)
- linux-jammy-py3.10-clang15 (build + test)
- linux-jammy-py3.14-clang15 (build + test)
- linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
- dynamo-cpython (build + test)
- linux-jammy-rocm-py3.10 (ROCm partner hardware)
- linux-jammy-xpu-n-py3.10 (XPU partner hardware)

CUDA jobs:
- linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
- linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged (no OSDC alternative):
- linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)

linux-docs is gated to EC2-only (`use-arc != 'true'`) for now and will
be updated for OSDC support later.

OSDC jobs use pinned test-infra base images:
- CPU: ghcr.io/pytorch/test-infra:cpu-x86_64-a235b1b
- CUDA: ghcr.io/pytorch/test-infra:cuda-x86_64-a235b1b

EC2-to-ARC runner mapping (from .github/arc.yaml):
- linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64 (more memory, fix OOM)
- linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-32
- linux.g4dn.metal.nvidia.gpu -> l-bx86iavx512-94-384-t4-8

Signed-off-by: Huy Do <[email protected]>
ghstack-source-id: 4e415a1
Pull-Request: #177992
Signed-off-by: Huy Do <[email protected]>
[ghstack-poisoned]
huydhn added a commit that referenced this pull request Mar 22, 2026
When the runner-determinator sets `use-arc == 'true'`, Linux build/test
jobs now route to OSDC ARC runners via `_linux-build-osdc.yml` and
`_linux-test-osdc.yml`. When `use-arc != 'true'`, the existing EC2 code
path continues to be used. Each routable job group gets a parallel
`-osdc` variant gated on the `use-arc` output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:
- linux-jammy-py3.10-gcc11 (build + test)
- linux-jammy-py3.14t-clang15 (build + test)
- linux-jammy-py3.10-gcc11-no-ops (build only)
- linux-jammy-py3.10-clang18-asan (build + test)
- linux-jammy-py3.10-clang15-onnx (build + test)
- linux-jammy-py3.10-clang15 (build + test)
- linux-jammy-py3.14-clang15 (build + test)
- linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
- dynamo-cpython (build + test)
- linux-jammy-rocm-py3.10 (ROCm partner hardware)
- linux-jammy-xpu-n-py3.10 (XPU partner hardware)

CUDA jobs:
- linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
- linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged (no OSDC alternative):
- linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)

linux-docs is gated to EC2-only (`use-arc != 'true'`) for now and will
be updated for OSDC support later.

OSDC jobs use pinned test-infra base images:
- CPU: ghcr.io/pytorch/test-infra:cpu-x86_64-a235b1b
- CUDA: ghcr.io/pytorch/test-infra:cuda-x86_64-a235b1b

EC2-to-ARC runner mapping (from .github/arc.yaml):
- linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64 (more memory, fix OOM)
- linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-32
- linux.g4dn.metal.nvidia.gpu -> l-bx86iavx512-94-384-t4-8

Signed-off-by: Huy Do <[email protected]>
ghstack-source-id: 10d54ad
Pull-Request: #177992
Signed-off-by: Huy Do <[email protected]>
[ghstack-poisoned]
huydhn added a commit that referenced this pull request Mar 22, 2026
When the runner-determinator sets `use-arc == 'true'`, Linux build/test
jobs now route to OSDC ARC runners via `_linux-build-osdc.yml` and
`_linux-test-osdc.yml`. When `use-arc != 'true'`, the existing EC2 code
path continues to be used. Each routable job group gets a parallel
`-osdc` variant gated on the `use-arc` output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:
- linux-jammy-py3.10-gcc11 (build + test)
- linux-jammy-py3.14t-clang15 (build + test)
- linux-jammy-py3.10-gcc11-no-ops (build only)
- linux-jammy-py3.10-clang18-asan (build + test)
- linux-jammy-py3.10-clang15-onnx (build + test)
- linux-jammy-py3.10-clang15 (build + test)
- linux-jammy-py3.14-clang15 (build + test)
- linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
- dynamo-cpython (build + test)
- linux-jammy-rocm-py3.10 (ROCm partner hardware)
- linux-jammy-xpu-n-py3.10 (XPU partner hardware)

CUDA jobs:
- linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
- linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged (no OSDC alternative):
- linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)

linux-docs is gated to EC2-only (`use-arc != 'true'`) for now and will
be updated for OSDC support later.

OSDC jobs use pinned test-infra base images:
- CPU: ghcr.io/pytorch/test-infra:cpu-x86_64-a235b1b
- CUDA: ghcr.io/pytorch/test-infra:cuda-x86_64-a235b1b

EC2-to-ARC runner mapping (from .github/arc.yaml):
- linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64 (more memory, fix OOM)
- linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-32
- linux.g4dn.metal.nvidia.gpu -> l-bx86iavx512-94-384-t4-8

Signed-off-by: Huy Do <[email protected]>
ghstack-source-id: 12c00a7
Pull-Request: #177992
Signed-off-by: Huy Do <[email protected]>
[ghstack-poisoned]
huydhn added a commit that referenced this pull request Mar 22, 2026
When the runner-determinator sets `use-arc == 'true'`, Linux build/test
jobs now route to OSDC ARC runners via `_linux-build-osdc.yml` and
`_linux-test-osdc.yml`. When `use-arc != 'true'`, the existing EC2 code
path continues to be used. Each routable job group gets a parallel
`-osdc` variant gated on the `use-arc` output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:
- linux-jammy-py3.10-gcc11 (build + test)
- linux-jammy-py3.14t-clang15 (build + test)
- linux-jammy-py3.10-gcc11-no-ops (build only)
- linux-jammy-py3.10-clang18-asan (build + test)
- linux-jammy-py3.10-clang15-onnx (build + test)
- linux-jammy-py3.10-clang15 (build + test)
- linux-jammy-py3.14-clang15 (build + test)
- linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
- dynamo-cpython (build + test)
- linux-jammy-rocm-py3.10 (ROCm partner hardware)
- linux-jammy-xpu-n-py3.10 (XPU partner hardware)

CUDA jobs:
- linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
- linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged (no OSDC alternative):
- linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)

linux-docs is gated to EC2-only (`use-arc != 'true'`) for now and will
be updated for OSDC support later.

OSDC jobs use pinned test-infra base images:
- CPU: ghcr.io/pytorch/test-infra:cpu-x86_64-a235b1b
- CUDA: ghcr.io/pytorch/test-infra:cuda-x86_64-a235b1b

EC2-to-ARC runner mapping (from .github/arc.yaml):
- linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64 (more memory, fix OOM)
- linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-32
- linux.g4dn.metal.nvidia.gpu -> l-bx86iavx512-94-384-t4-8

Signed-off-by: Huy Do <[email protected]>
ghstack-source-id: 056355d
Pull-Request: #177992
Signed-off-by: Huy Do <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Mar 22, 2026
This composite action consolidates common Linux setup steps for OSDC ARC runners into a single reusable action. It accepts a build-environment string and handles:

- Parsing the Python version (e.g. py3.12) and setting up uv with a virtual environment
- Installing CI pip requirements
- Installing MKL (x86_64 only, skipped on aarch64)
- Installing the C++ compiler based on what the build-environment specifies:
    - clang 18: already pre-installed on AlmaLinux 9 from AppStream, no action needed
    - clang 15 (or older): installed from EPEL with versioned packages and registered via update-alternatives
    - gcc<N>: uses system GCC 11 or installs gcc-toolset for newer versions
    - neither: leaves the base image compiler as-is
- Switching to the requested CUDA version (e.g. cuda12.8 parsed from build-environment) by updating the /usr/local/cuda symlink and setting CUDA_HOME, PATH, LD_LIBRARY_PATH, and NCCL paths. All CUDA versions are pre-installed in the base image; the default is CUDA 13.

This GHA will be used to setup Linux build and test jobs on OSDC.  @yangw-dev While this is needed to run on CI for now, let's discuss on how we can move the logic here into blast cli.

### Testing

* EC2 path, signals from this PR
* ARC path, used in pull workflow migration #177992
Pull Request resolved: #177950
Approved by: https://github.com/malfet
[ghstack-poisoned]
huydhn added a commit that referenced this pull request Mar 23, 2026
When the runner-determinator sets `use-arc == 'true'`, Linux build/test
jobs now route to OSDC ARC runners via `_linux-build-osdc.yml` and
`_linux-test-osdc.yml`. When `use-arc != 'true'`, the existing EC2 code
path continues to be used. Each routable job group gets a parallel
`-osdc` variant gated on the `use-arc` output.

11 job groups receive OSDC routing (19 new jobs total):

CPU jobs:
- linux-jammy-py3.10-gcc11 (build + test)
- linux-jammy-py3.14t-clang15 (build + test)
- linux-jammy-py3.10-gcc11-no-ops (build only)
- linux-jammy-py3.10-clang18-asan (build + test)
- linux-jammy-py3.10-clang15-onnx (build + test)
- linux-jammy-py3.10-clang15 (build + test)
- linux-jammy-py3.14-clang15 (build + test)
- linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch (build only)
- dynamo-cpython (build + test)
- linux-jammy-rocm-py3.10 (ROCm partner hardware)
- linux-jammy-xpu-n-py3.10 (XPU partner hardware)

CUDA jobs:
- linux-jammy-cuda12.8-cudnn9-py3.10-clang15 (build only)
- linux-jammy-cuda13.0-py3.10-gcc11-inductor (build + test, GPU T4)

EC2-only jobs left unchanged (no OSDC alternative):
- linux-jammy-cpu-py3.10-gcc11-bazel-test (uses _bazel-build-test.yml)

linux-docs is gated to EC2-only (`use-arc != 'true'`) for now and will
be updated for OSDC support later.

OSDC jobs use pinned test-infra base images:
- CPU: ghcr.io/pytorch/test-infra:cpu-x86_64-a235b1b
- CUDA: ghcr.io/pytorch/test-infra:cuda-x86_64-a235b1b

EC2-to-ARC runner mapping (from .github/arc.yaml):
- linux.2xlarge / linux.c7i.2xlarge -> l-x86iavx512-8-64 (more memory, fix OOM)
- linux.4xlarge / linux.c7i.4xlarge -> l-x86iavx512-16-32
- linux.g4dn.metal.nvidia.gpu -> l-bx86iavx512-94-384-t4-8

Signed-off-by: Huy Do <[email protected]>
ghstack-source-id: bbfbbb5
Pull-Request: #177992
Signed-off-by: Huy Do <[email protected]>
@huydhn huydhn added the ci-no-td Do not run TD on this PR label Mar 23, 2026
@huydhn

huydhn commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 4, 6, linux.rocm.gpu.gfx950.1)

Details for Dev Infra team Raised by workflow job

huydhn added 6 commits April 2, 2026 19:15
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@huydhn

huydhn commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 2, 6, linux.rocm.gpu.gfx950.1)

Details for Dev Infra team Raised by workflow job

@huydhn

huydhn commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -i

@izaitsevfb

Copy link
Copy Markdown
Contributor

@pytorchbot revert -m "Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable" -c autorevert

This PR is attributed to have caused regression in:

Note: This revert was accelerated by the AI advisor: AI advisor: revert (confidence=0.97)

Please investigate and fix the issues.
@claude Can you please read this revert comment, follow the links and read the errors, to then give a brief diagnostics on the cause of the error? If you judge the error to be legitimate reason for a revert, please provide brief guidance on how the author could fix it.

@claude

claude Bot commented Apr 3, 2026 •

Copy link
Copy Markdown

Claude finished @izaitsevfb's task in 14m 27s —— View job


Investigating Revert of PR #177992

  • Read the CI failure logs from the linked job
  • Identify the root cause of the regression
  • Assess if revert is justified
  • Provide fix guidance for the author

Diagnosis

Failed job: inductor-cpu-test / test (inductor_torchbench_cpu_smoketest_perf, 1, 1, linux.24xl.spr-metal) (link)

Error: The llama_v2_7b_16h model performance benchmark regressed below the required threshold:

llama_v2_7b_16h  speedup=1.191x (< 1.22x; -2.4% from target)

Root cause: The change in .ci/pytorch/test.sh at the test_inductor_set_cpu_affinity() function (line ~1198) replaced the previous lscpu-based CPU counting with nproc:

# Use nproc here instead of lscpu because it takes into account cgroups slice
cpus=$(nproc)

On the linux.24xl.spr-metal bare-metal runner (96 logical CPUs / 48 physical cores with HT), this change has an unintended side-effect:

  • nproc returns 24 (limited by a Docker cgroup slice)
  • os.sched_getaffinity(0) returns CPUs 0–95 (full host access)
  • This sets OMP_NUM_THREADS = nproc / thread_per_core = 24 / 2 = 12

Previously, lscpu would have reported the actual hardware topology (48 physical cores), giving OMP_NUM_THREADS = 48. The 4x reduction in OMP threads (from 48 to 12) directly degraded the llama_v2_7b_16h inference speedup from above the 1.22x threshold to only 1.191x.

The taskset -c 0-93 range also shows the inconsistency: the process can actually run on 94 logical CPUs, but OMP only uses 12 threads.

Is the revert justified?

Yes. This is a legitimate performance regression on the inductor CPU smoketest benchmark. The nproc-to-lscpu change was intended for k8s/ARC pod environments but inadvertently affected bare-metal SPR runners where the Docker cgroup limit doesn't match the available hardware.

Fix guidance for @huydhn

The nproc change in test_inductor_set_cpu_affinity() is correct for k8s/ARC environments but wrong for bare-metal EC2 runners like linux.24xl.spr-metal. Two possible approaches:

  1. Conditional logic by environment: Detect whether running in a k8s pod vs. bare-metal EC2 and choose the appropriate CPU counting method:

    if [ -f /var/run/secrets/kubernetes.io/serviceaccount/token ]; then
      cpus=$(nproc)  # k8s: use cgroup-aware count
    else
      cpus=$(lscpu | grep '^CPU(s):' | awk '{print $2}')  # bare-metal: use hardware count
    fi
  2. Use sched_getaffinity consistently: Since os.sched_getaffinity(0) already returns the correct CPU set in both environments, compute the count from it:

    cpus=$(python -c 'import os; print(len(os.sched_getaffinity(0)))')

    This would return 96 on bare-metal (matching the full affinity set) and the pod allocation on k8s.

Option 2 is simpler and avoids environment detection heuristics. The key insight is that nproc reports the cgroup quota while sched_getaffinity reports the actual usable CPU set — and for performance benchmarks, the latter is what matters.


@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@huydhn your PR has been successfully reverted.

[ghstack-poisoned]
@huydhn

huydhn commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 4, 6, linux.rocm.gpu.gfx950.1)

Details for Dev Infra team Raised by workflow job

@huydhn

huydhn commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged while ignoring the following 2 checks: trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 6, 6, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 4, 6, linux.rocm.gpu.gfx950.1)

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10-mi355 / test (default, 2, 6, linux.rocm.gpu.gfx950.1)

Details for Dev Infra team Raised by workflow job

@huydhn

huydhn commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -f 'Reland, inductor smoke tests have passed, trunk ROCm failures are not related'

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@seojin51230 seojin51230 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autorevert: disable Disable autorevert for a specific PR ci-no-td Do not run TD on this PR ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged Reverted topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants