Skip to content

Commit ebadce7

Browse files
committed
Containerize pytorch-bisect.yaml mt- (OSDC) path in a CUDA devel container
The mt- runner is an ephemeral OSDC pod with no host CUDA toolchain, so build PyTorch inside pytorch/pytorch:2.12.0-cuda13.0-cudnn9-devel (--gpus all) when the mt- runner is selected; linux.dgx.b200 keeps the existing bare-host path (conditional container via fromJSON('null')). CUDA_HOME points at the image's /usr/local/cuda on the container path (run.sh requires it non-empty). Add a git safe.directory step for the root-owned in-container checkout.
1 parent 7ba08d6 commit ebadce7

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/pytorch-bisect.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ jobs:
4848
bisect:
4949
name: Run PyTorch Bisect
5050
runs-on: ${{ inputs.runner }}
51+
# mt- runners are ephemeral OSDC pods with no host CUDA toolchain, so build
52+
# PyTorch inside a CUDA devel container. linux.dgx.b200 is a DGX host and
53+
# keeps the bare-host path (fromJSON('null') => no container).
54+
container: ${{ startsWith(inputs.runner, 'mt-') && fromJSON('{"image":"pytorch/pytorch:2.12.0-cuda13.0-cudnn9-devel","options":"--gpus all"}') || fromJSON('null') }}
5155
env:
5256
USE_UV: '1'
5357
WORKSPACE_DIR: ${{ github.workspace }}
@@ -57,12 +61,18 @@ jobs:
5761
REGRESSION_THRESHOLD: ${{ inputs.regression_threshold }}
5862
PYTORCH_REPO: pytorch/pytorch
5963
FUNCTIONAL: ${{ inputs.type == 'functional' && '1' || '0' }}
60-
CUDA_HOME: ${{ github.workspace }}/torch-benchmarks/cuda
64+
# Inside the OSDC CUDA devel container CUDA lives at /usr/local/cuda; on the
65+
# bare-host b200 path keep the workspace-local toolchain. run.sh requires
66+
# CUDA_HOME to be non-empty.
67+
CUDA_HOME: ${{ startsWith(inputs.runner, 'mt-') && '/usr/local/cuda' || format('{0}/torch-benchmarks/cuda', github.workspace) }}
6168
CUDA_VERSION: "13.0"
6269
permissions:
6370
id-token: write
6471
contents: read
6572
steps:
73+
- name: Configure git safe.directory
74+
run: git config --global --add safe.directory '*' || true
75+
6676
- name: Checkout repository
6777
uses: actions/checkout@v4
6878

0 commit comments

Comments
 (0)