Repository navigation
57 lines (51 loc) · 1.67 KB
/
Copy pathtest-linux-examples.yml
File metadata and controls
57 lines (51 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Examples Tests on Linux
on:
pull_request:
push:
branches:
- nightly
- main
- release/*
workflow_dispatch:
workflow_call:
concurrency:
group: test-linux-examples-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
jobs:
tests:
strategy:
matrix:
python_version: ["3.12"]
cuda_arch_version: ["13.0"]
shard: ["1", "2"]
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main
with:
runner: mt-l-x86aavx2-11-41-a10g
repository: pytorch/rl
docker-image: "ghcr.io/pytorch/test-infra/osdc-cuda:cuda13.0.3-cudnn-devel-ubuntu24.04"
gpu-arch-type: cuda
gpu-arch-version: ${{ matrix.cuda_arch_version }}
timeout: 120
upload-artifact: test-results-examples-shard-${{ matrix.shard }}
script: |
export PYTHON_VERSION=${{ matrix.python_version }}
export CUDA_ARCH_VERSION=${{ matrix.cuda_arch_version }}
export CU_VERSION="cu${CUDA_ARCH_VERSION:0:2}${CUDA_ARCH_VERSION:3:1}"
export EXAMPLES_SHARD=${{ matrix.shard }}
export EXAMPLES_NUM_SHARDS=2
ref_name="${GITHUB_BASE_REF:-${GITHUB_REF_NAME:-}}"
if [[ -z "${ref_name}" && -n "${GITHUB_REF:-}" ]]; then
ref_name="${GITHUB_REF#refs/heads/}"
fi
if [[ "${ref_name}" == release/* ]]; then
export RELEASE=1
export TORCH_VERSION=stable
else
export RELEASE=0
export TORCH_VERSION=nightly
fi
bash .github/unittest/examples/scripts/run_all.sh