Skip to content

Commit 4317aa7

Browse files
authored
[WIP] Linux GPU unit test workflow using GitHub Actions (#885)
2 parents 0a8f86d + 3464209 commit 4317aa7

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/test-linux-gpu.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Unit-tests on Linux GPU
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- nightly
8+
- main
9+
- release/*
10+
workflow_dispatch:
11+
12+
env:
13+
CHANNEL: "nightly"
14+
15+
jobs:
16+
tests:
17+
strategy:
18+
matrix:
19+
python_version: ["3.8"] # "3.8", "3.9", "3.10", "3.11"
20+
cuda_arch_version: ["11.6"] # "11.6", "11.7"
21+
fail-fast: false
22+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
23+
with:
24+
runner: linux.g5.4xlarge.nvidia.gpu
25+
repository: pytorch/rl
26+
gpu-arch-type: cuda
27+
gpu-arch-version: ${{ matrix.cuda_arch_version }}
28+
timeout: 90
29+
script: |
30+
# Set env vars from matrix
31+
export PYTHON_VERSION=${{ matrix.python_version }}
32+
# Commenting these out for now because the GPU test are not working inside docker
33+
export CUDA_ARCH_VERSION=${{ matrix.cuda_arch_version }}
34+
export CU_VERSION="cu${CUDA_ARCH_VERSION:0:2}${CUDA_ARCH_VERSION:3:1}"
35+
# Remove the following line when the GPU tests are working inside docker, and uncomment the above lines
36+
#export CU_VERSION="cpu"
37+
38+
echo "PYTHON_VERSION: $PYTHON_VERSION"
39+
echo "CU_VERSION: $CU_VERSION"
40+
41+
cd /work
42+
43+
## setup_env.sh
44+
./.circleci/unittest/linux/scripts/setup_env.sh
45+
46+
## install.sh
47+
./.circleci/unittest/linux/scripts/install.sh
48+
49+
## run_test.sh
50+
./.circleci/unittest/linux/scripts/run_test.sh
51+
52+
## post_process.sh
53+
./.circleci/unittest/linux/scripts/post_process.sh
54+
55+
56+

0 commit comments

Comments
 (0)