Unverified Commit add75968 authored by Omkar Salpekar's avatar Omkar Salpekar Committed by GitHub
Browse files

[Nova] GHA Linux GPU Job (#6804)

* [Nova] GHA Linux GPU Job

* increase timeout since jobs timeout and cancel after 30 mins

* bigger instance and longer timeout

* use instance with more gpu memory and only run py38 and cu116 on PR CI
parent c84dbfad
...@@ -16,7 +16,7 @@ jobs: ...@@ -16,7 +16,7 @@ jobs:
tests: tests:
strategy: strategy:
matrix: matrix:
py_vers: ["3.7", "3.8", "3.9", "3.10"] python_version: ["3.7", "3.8", "3.9", "3.10"]
fail-fast: false fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with: with:
...@@ -27,7 +27,7 @@ jobs: ...@@ -27,7 +27,7 @@ jobs:
git config --global --add safe.directory /__w/vision/vision git config --global --add safe.directory /__w/vision/vision
# Set up Environment Variables # Set up Environment Variables
export PYTHON_VERSION="${{ matrix.py_vers }}" export PYTHON_VERSION="${{ matrix.python_version }}"
export VERSION="cpu" export VERSION="cpu"
export CUDATOOLKIT="cpuonly" export CUDATOOLKIT="cpuonly"
......
name: Unit-tests on Linux GPU
on:
pull_request:
push:
branches:
- nightly
- main
- release/*
workflow_dispatch:
env:
CHANNEL: "nightly"
jobs:
tests:
strategy:
matrix:
python_version: ["3.8"]
cuda_arch_version: ["11.6"]
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
runner: linux.g5.4xlarge.nvidia.gpu
repository: pytorch/vision
gpu-arch-type: cuda
gpu-arch-version: ${{ matrix.cuda_arch_version }}
timeout: 120
script: |
# Mark Build Directory Safe
git config --global --add safe.directory /__w/vision/vision
# Set up Environment Variables
export PYTHON_VERSION="${{ matrix.python_version }}"
export VERSION="${{ matrix.cuda_arch_version }}"
export CUDATOOLKIT="pytorch-cuda=${VERSION}"
# Set CHANNEL
if [[ (${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
export CHANNEL=test
else
export CHANNEL=nightly
fi
# Create Conda Env
conda create -yp ci_env python="${PYTHON_VERSION}" numpy libpng jpeg scipy
conda activate /work/ci_env
# Install PyTorch, Torchvision, and testing libraries
set -ex
conda install \
--yes \
-c "pytorch-${CHANNEL}" \
-c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] \
"${CUDATOOLKIT}"
python3 setup.py develop
python3 -m pip install pytest pytest-mock 'av<10'
# Run Tests
python3 -m torch.utils.collect_env
python3 -m pytest --junitxml=test-results/junit.xml -v --durations 20
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment