Skip to content

Commit

Permalink
fix CircleCI tests
Browse files Browse the repository at this point in the history
Summary:
add tests for pytorch1.9

Pull Request resolved: facebookresearch#3177

Reviewed By: vaibhava0

Differential Revision: D29350407

Pulled By: ppwwyyxx

fbshipit-source-id: e2ab109c74c752fcc35fcd0d8c2f80b3ff1642d9
  • Loading branch information
ppwwyyxx authored and facebook-github-bot committed Jul 2, 2021
1 parent 38344fd commit a17b768
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 25 deletions.
42 changes: 24 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ cpu: &cpu

gpu: &gpu
machine:
image: ubuntu-1604-cuda-10.1:201909-23
#image: ubuntu-1604-cuda-10.2:202012-01
#image: ubuntu-1604-cuda-10.1:201909-23
image: ubuntu-1604-cuda-10.2:202012-01
resource_class: gpu.small

windows-cpu: &windows_cpu
Expand All @@ -32,14 +32,18 @@ pytorch_parameters: &pytorch_parameters
parameters:
pytorch_version:
type: string
default: "1.8"
torchvision_version:
type: string
default: "0.9"
pytorch_index:
type: string
# use test wheels index to have access to RC wheels
# https://download.pytorch.org/whl/test/torch_test.html
default: "https://download.pytorch.org/whl/torch_stable.html"

environment:
PYTORCH_VERSION: << parameters.pytorch_version >>
TORCHVISION_VERSION: << parameters.torchvision_version >>
PYTORCH_INDEX: << parameters.pytorch_index >>

# -------------------------------------------------------------------------------------
# Re-usable commands
Expand Down Expand Up @@ -102,12 +106,11 @@ install_linux_dep: &install_linux_dep
pip install --progress-bar off -U 'git+https://github.com/facebookresearch/iopath'
pip install --progress-bar off -U 'git+https://github.com/facebookresearch/fvcore'
pip install --progress-bar off ninja opencv-python-headless pytest-xdist tensorboard pycocotools
# install from pytorch's test wheels index to have access to RC wheels
pip install --progress-bar off torch==$PYTORCH_VERSION -f https://download.pytorch.org/whl/test/torch_test.html
pip install --progress-bar off torch==$PYTORCH_VERSION -f $PYTORCH_INDEX
if [[ "$TORCHVISION_VERSION" == "master" ]]; then
pip install git+https://github.com/pytorch/vision.git
else
pip install --progress-bar off torchvision==$TORCHVISION_VERSION -f https://download.pytorch.org/whl/test/torch_test.html
pip install --progress-bar off torchvision==$TORCHVISION_VERSION -f $PYTORCH_INDEX
fi
python -c 'import torch; print("CUDA:", torch.cuda.is_available())'
Expand Down Expand Up @@ -202,7 +205,7 @@ jobs:
pip install opencv-python-headless pytest-xdist pycocotools tensorboard
pip install -U git+https://github.com/facebookresearch/iopath
pip install -U git+https://github.com/facebookresearch/fvcore
pip install torch==$env:PYTORCH_VERSION torchvision==$env:TORCHVISION_VERSION -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install torch==$env:PYTORCH_VERSION torchvision==$env:TORCHVISION_VERSION -f $env:PYTORCH_INDEX
- save_cache:
paths:
Expand All @@ -224,15 +227,18 @@ workflows:
- DOCKERHUB_TOKEN
- linux_gpu_tests:
name: linux_gpu_tests_pytorch1.7
pytorch_version: '1.7.1+cu101'
torchvision_version: '0.8.1+cu101'
pytorch_version: '1.7.0'
torchvision_version: '0.8.1'
# 1.7 wheels don't have +cu102 suffix, so use a cu102 specific index
pytorch_index: 'https://download.pytorch.org/whl/cu102/torch_stable.html'
- linux_gpu_tests:
name: linux_gpu_tests_pytorch1.8
pytorch_version: '1.8.1+cu101'
torchvision_version: '0.9.1+cu101'
# TODO fix it
#- linux_gpu_tests:
#name: linux_gpu_tests_pytorch1.9
#pytorch_version: '1.9+cu102'
#torchvision_version: '0.10+cu102'
- windows_cpu_build
pytorch_version: '1.8.1+cu102'
torchvision_version: '0.9.1+cu102'
- linux_gpu_tests:
name: linux_gpu_tests_pytorch1.9
pytorch_version: '1.9+cu102'
torchvision_version: '0.10+cu102'
- windows_cpu_build:
pytorch_version: '1.9+cpu'
torchvision_version: '0.10+cpu'
20 changes: 15 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Click each issue for its solutions:

<details>
<summary>
Undefined symbols that contains TH,aten,torch,caffe2; Missing torch dynamic libraries; Segmentation fault immediately when using detectron2.
Undefined symbols that contains TH,aten,torch,caffe2.
</summary>
<br/>

Expand All @@ -93,7 +93,15 @@ If the above instructions do not resolve this problem, please provide an environ

<details>
<summary>
Undefined C++ symbols (e.g. `GLIBCXX`) or C++ symbols not found.
Missing torch dynamic libraries, OR segmentation fault immediately when using detectron2.
</summary>
This usually happens when detectron2 or torchvision is not
compiled with the version of PyTorch you're running. See the previous common issue for the solution.
</details>

<details>
<summary>
Undefined C++ symbols (e.g. GLIBCXX) or C++ symbols not found.
</summary>
<br/>
Usually it's because the library is compiled with a newer C++ compiler but run with an old C++ runtime.
Expand Down Expand Up @@ -179,9 +187,9 @@ to match your local CUDA installation, or install a different version of CUDA to

<details>
<summary>
C++ compilation errors from NVCC / NVRTC; "Unsupported gpu architecture"
C++ compilation errors from NVCC / NVRTC, or "Unsupported gpu architecture"
</summary>

<br/>
A few possibilities:

1. Local CUDA/NVCC version has to match the CUDA version of your PyTorch. Both can be found in `python collect_env.py`.
Expand Down Expand Up @@ -243,7 +251,9 @@ whose version is closer to what's used by PyTorch (available in `torch.__config_
"library not found for -lstdc++" on older version of MacOS
</summary>
<br/>
See [this stackoverflow answer](https://stackoverflow.com/questions/56083725/macos-build-issues-lstdc-not-found-while-building-python-package).
See
[this stackoverflow answer](https://stackoverflow.com/questions/56083725/macos-build-issues-lstdc-not-found-while-building-python-package).

</details>


Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ def get_model_zoo_configs() -> List[str]:
"future", # used by caffe2
"pydot", # used to save caffe2 SVGs
"dataclasses; python_version<'3.7'",
"omegaconf>=2.1.0rc1",
"hydra-core>=1.1.0rc1",
"omegaconf>=2.1",
"hydra-core>=1.1",
"black==21.4b2",
# If a new dependency is required at import time (in addition to runtime), it
# probably needs to exist in docs/requirements.txt, or as a mock in docs/conf.py
Expand Down

0 comments on commit a17b768

Please sign in to comment.