Skip to content

Commit d65d3e7

Browse files
committed
ci: cap parallelism (MAX_JOBS=2), add job timeout + concurrency auto-cancel
1 parent 969a584 commit d65d3e7

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,17 @@ on:
2727
branches: ["feat/pypi-cuda-wheels"]
2828
tags: ["v*"]
2929

30+
# A new push to the same ref cancels the in-flight run — prevents pile-ups
31+
# (and auto-kills a wedged run instead of waiting out the 6 h job limit).
32+
concurrency:
33+
group: wheels-${{ github.ref }}
34+
cancel-in-progress: true
35+
3036
jobs:
3137
build_wheels:
3238
name: cp${{ matrix.python }} CUDA wheel
3339
runs-on: ubuntu-latest
40+
timeout-minutes: 60 # bound any compile hang (no more 6 h wedges)
3441
strategy:
3542
fail-fast: false
3643
matrix:
@@ -63,9 +70,13 @@ jobs:
6370
# NB: quote the arch list — cibuildwheel parses CIBW_ENVIRONMENT with
6471
# bashlex, so unquoted ';' would be read as a command separator and
6572
# error out ("Malformed environment") before any build starts.
73+
# MAX_JOBS=2 caps ninja file-parallelism: the default (all 4 vCPUs ×
74+
# nvcc --threads across 6 arches) oversubscribed RAM and wedged the
75+
# runner. 2 files in flight keeps peak memory well under 16 GB.
6676
CIBW_ENVIRONMENT_LINUX: >
6777
SWEEP_BUILD_CUDA=1
6878
TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6;8.9;9.0"
79+
MAX_JOBS=2
6980
CUDA_HOME=/usr/local/cuda
7081
PATH=/usr/local/cuda/bin:$PATH
7182
# Build against the exact torch users resolve at install time.

0 commit comments

Comments
 (0)