Skip to content

[CI] Limit PyTorch testing to a single Python version #7731

Description

@ScottTodd

We currently run PyTorch tests nightly across the full matrix of

  • GPUs we have test runners for: [gfx942, gfx950, gfx110X, gfx1151, gfx120X, gfx90a, gfx103X, etc.]
  • Operating systems: [windows, linux]
  • PyTorch release versions: [release/2.12, release/2.13, release/2.14, nightly]
  • Python versions: [3.10, 3.11, 3.12, 3.13, 3.14]

For example: https://github.com/ROCm/rockrel/actions/runs/32806241769

Some of this test coverage is redundant and puts excess pressure on runners that are in limited supply.

Upstream PyTorch only tests on python 3.12 at the moment, so we can limit to that also to cut our runner load in 5 (separately we can also drop support for python 3.10 now).

cc @HereThereBeDragons @Melantha-S @pragupta @jithunnair-amd @ethanwee1 @pruthvistony

Keeping some coverage

We should still run wheel sanity checks on CPU builders and possibly GPU sanity checks, at least running import torch and perhaps https://github.com/ROCm/TheRock/blob/main/external-builds/pytorch/smoke-tests/pytorch_smoke_test.py instead of the 20+ minutes of pytorch unit tests that we run normally. For smoketests we probably also don't need to checkout pytorch source code or install full test requirements.

Potential savings

Metrics and analysis compiled with assistance from an agent

How much does this save within PyTorch nightly CI?

The example PyTorch run consumed 70.80 GPU runner-hours across 180 jobs. Limiting the full tests to Python 3.12 would have retained 36 jobs and consumed 14.31 GPU runner-hours, avoiding 56.49 GPU runner-hours (79.8%) in this run.

The ROCm artifact tests column puts each PyTorch number next to a representative daily Linux artifact-test run on the same family-specific runner pool.

Linux gfx family PyTorch: all 5 Python versions PyTorch: Python 3.12 only PyTorch time avoided ROCm artifact tests
gfx103X-all 2.28 h 0.04 h 2.24 h 1.97 h
gfx110X-all 14.61 h 3.17 h 11.44 h 11.47 h
gfx1150 7.32 h 1.46 h 5.86 h 16.33 h
gfx1151 4.18 h 0.84 h 3.34 h 10.43 h
gfx1153 1.50 h 0.10 h 1.41 h 33.64 h
gfx120X-all 5.71 h 1.13 h 4.58 h 13.73 h
gfx90a 2.08 h 0.41 h 1.67 h not in August 28 dispatch
gfx94X-dcgpu 17.82 h 3.50 h 14.31 h 31.55 h
gfx950-dcgpu 15.30 h 3.65 h 11.65 h not in August 28 dispatch
Total 70.80 h 14.31 h 56.49 h 119.13 h across 7 families

How much does this save within overall nightly CI?

For the measured Linux GPU scope in the table, PyTorch and ROCm artifact tests currently consume 189.92 runner-hours per nightly cycle:

  • PyTorch tests: 70.80 hours (37.3%)
  • ROCm artifact tests: 119.13 hours (62.7%) across seven families

Running full PyTorch tests only on Python 3.12 and moving the other wheel checks to CPU/scalable runners saves 56.49 GPU runner-hours. That is 79.8% of the PyTorch test load and 29.7% of this measured overall Linux nightly GPU load. Retaining GPU sanity jobs lowers the overall saving to 26.6%-27.0%.

Metadata

Metadata

Assignees

Labels

CICDRelated to CI/CD Infraecosystem: PyTorchIssue pertains to PyTorch and related libraries

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions