-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[proto][ci] Try add GPU ci for prototype transforms #6919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ad9ee3a
Try add GPU ci for prototype transforms
vfdev-5 e4bc4e7
Merge branch 'main' into prototype-test-linux-gpu
vfdev-5 8678fa9
Update prototype-transforms-tests-linux-gpu.yml
vfdev-5 a477c9b
Update prototype-transforms-tests-linux-gpu.yml
vfdev-5 c7d83fb
Update prototype-transforms-tests-linux-gpu.yml
vfdev-5 62f4c94
Update prototype-transforms-tests-linux-gpu.yml
vfdev-5 639c598
Update prototype-transforms-tests-linux-gpu.yml
vfdev-5 0e05e11
add small tolerance for adjust_contrast on CUDA
pmeier 7183d03
[skip-ci] update
vfdev-5 9d7f3cf
Merge branch 'main' into prototype-test-linux-gpu
vfdev-5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
.github/workflows/prototype-transforms-tests-linux-gpu.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Prototype transforms 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.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 torchdata "${CUDATOOLKIT}" | ||
|
||
python3 -c "import torch; exit(not torch.cuda.is_available())" | ||
|
||
python3 setup.py develop | ||
python3 -m pip install pytest pytest-mock pytest-cov | ||
|
||
# Run Tests | ||
python3 -m torch.utils.collect_env | ||
python3 -m pytest \ | ||
--durations=20 \ | ||
--cov=torchvision/prototype/transforms \ | ||
--cov-report=term-missing \ | ||
test/test_prototype_transforms*.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.