diff --git a/INSTALL.md b/INSTALL.md index fcc00ff7b7..9f8293dc9f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -28,35 +28,32 @@ old build first. You often need to rebuild detectron2 after reinstalling PyTorch ### Install Pre-Built Detectron2 (Linux only) -Choose from this table to install [v0.5 (Jul 2021)](https://github.com/facebookresearch/detectron2/releases): +Choose from this table to install [v0.6 (Oct 2021)](https://github.com/facebookresearch/detectron2/releases): -
CUDA torch 1.9torch 1.8torch 1.7
11.1
install
python -m pip install detectron2 -f \
+
CUDA torch 1.10torch 1.9torch 1.8
11.3
install
python -m pip install detectron2 -f \
+  https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html
+
11.1
install
python -m pip install detectron2 -f \
+  https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.10/index.html
+
install
python -m pip install detectron2 -f \
   https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.9/index.html
 
install
python -m pip install detectron2 -f \
   https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.8/index.html
-
11.0
install
python -m pip install detectron2 -f \
-  https://dl.fbaipublicfiles.com/detectron2/wheels/cu110/torch1.7/index.html
 
10.2
install
python -m pip install detectron2 -f \
+  https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.10/index.html
+
install
python -m pip install detectron2 -f \
   https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html
 
install
python -m pip install detectron2 -f \
   https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.8/index.html
-
install
python -m pip install detectron2 -f \
-  https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.7/index.html
-
10.1
install
python -m pip install detectron2 -f \
+
10.1
install
python -m pip install detectron2 -f \
   https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.html
-
install
python -m pip install detectron2 -f \
-  https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.7/index.html
-
9.2
install
python -m pip install detectron2 -f \
-  https://dl.fbaipublicfiles.com/detectron2/wheels/cu92/torch1.7/index.html
 
cpu
install
python -m pip install detectron2 -f \
+  https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.10/index.html
+
install
python -m pip install detectron2 -f \
   https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.9/index.html
 
install
python -m pip install detectron2 -f \
   https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.8/index.html
-
install
python -m pip install detectron2 -f \
-  https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.7/index.html
 
- Note that: 1. The pre-built packages have to be used with corresponding version of CUDA and the official package of PyTorch. Otherwise, please build detectron2 from source. diff --git a/detectron2/__init__.py b/detectron2/__init__.py index 89714dab72..bdd994b492 100644 --- a/detectron2/__init__.py +++ b/detectron2/__init__.py @@ -7,4 +7,4 @@ # This line will be programatically read/write by setup.py. # Leave them at the bottom of this file and don't touch them. -__version__ = "0.5" +__version__ = "0.6" diff --git a/dev/packaging/build_all_wheels.sh b/dev/packaging/build_all_wheels.sh index 40f2782516..98b5e44448 100755 --- a/dev/packaging/build_all_wheels.sh +++ b/dev/packaging/build_all_wheels.sh @@ -26,10 +26,7 @@ build_one() { echo "Launching container $container_name ..." container_id="$container_name"_"$cu"_"$pytorch_ver" - py_versions=(3.6 3.7 3.8) - if [[ $pytorch_ver != "1.7" ]]; then - py_versions+=(3.9) - fi + py_versions=(3.6 3.7 3.8 3.9) for py in "${py_versions[@]}"; do docker run -itd \ @@ -52,6 +49,11 @@ EOF if [[ -n "$1" ]] && [[ -n "$2" ]]; then build_one "$1" "$2" else + build_one cu113 1.10 + build_one cu111 1.10 + build_one cu102 1.10 + build_one cpu 1.10 + build_one cu111 1.9 build_one cu102 1.9 build_one cpu 1.9 @@ -60,10 +62,4 @@ else build_one cu102 1.8 build_one cu101 1.8 build_one cpu 1.8 - - build_one cu110 1.7 - build_one cu102 1.7 - build_one cu101 1.7 - build_one cu92 1.7 - build_one cpu 1.7 fi diff --git a/dev/packaging/gen_install_table.py b/dev/packaging/gen_install_table.py index 5233ef6027..b4c852dc53 100755 --- a/dev/packaging/gen_install_table.py +++ b/dev/packaging/gen_install_table.py @@ -9,6 +9,7 @@ https://dl.fbaipublicfiles.com/detectron2/wheels/{cuda}/torch{torch}/index.html
""" CUDA_SUFFIX = { + "11.3": "cu113", "11.1": "cu111", "11.0": "cu110", "10.2": "cu102", @@ -35,12 +36,14 @@ def gen_header(torch_versions): d2_version = f"=={args.d2_version}" if args.d2_version else "" all_versions = ( - [("1.7", k) for k in ["11.0", "10.2", "10.1", "9.2", "cpu"]] - + [("1.8", k) for k in ["11.1", "10.2", "10.1", "cpu"]] + [("1.8", k) for k in ["11.1", "10.2", "10.1", "cpu"]] + [("1.9", k) for k in ["11.1", "10.2", "cpu"]] + + [("1.10", k) for k in ["11.3", "11.1", "10.2", "cpu"]] ) - torch_versions = sorted({k[0] for k in all_versions}, key=float, reverse=True) + torch_versions = sorted( + {k[0] for k in all_versions}, key=lambda x: int(x.split(".")[1]), reverse=True + ) cuda_versions = sorted( {k[1] for k in all_versions}, key=lambda x: float(x) if x != "cpu" else 0, reverse=True ) diff --git a/dev/packaging/gen_wheel_index.sh b/dev/packaging/gen_wheel_index.sh index a5bb0dd990..ec96a27d80 100755 --- a/dev/packaging/gen_wheel_index.sh +++ b/dev/packaging/gen_wheel_index.sh @@ -2,9 +2,9 @@ # Copyright (c) Facebook, Inc. and its affiliates. -root=$1 +root=$(readlink -f $1) if [[ -z "$root" ]]; then - echo "Usage: ./gen_wheel_index.sh /path/to/wheels" + echo "Usage: ./gen_wheel_index.sh /absolute/path/to/wheels" exit fi @@ -14,7 +14,8 @@ export LC_ALL=C # reproducible sort index=$root/index.html cd "$root" -for cu in cpu cu92 cu100 cu101 cu102 cu110 cu111; do +for cu in cpu cu92 cu100 cu101 cu102 cu110 cu111 cu113; do + mkdir -p "$root/$cu" cd "$root/$cu" echo "Creating $PWD/index.html ..." # First sort by torch version, then stable sort by d2 version with unique. diff --git a/dev/packaging/pkg_helpers.bash b/dev/packaging/pkg_helpers.bash index 65c6114ae6..ed9acb00ae 100755 --- a/dev/packaging/pkg_helpers.bash +++ b/dev/packaging/pkg_helpers.bash @@ -14,9 +14,14 @@ pip_install() { setup_cuda() { # Now work out the CUDA settings # Like other torch domain libraries, we choose common GPU architectures only. - # See more details at https://github.com/pytorch/pytorch/blob/master/torch/utils/cpp_extension.py#L1363 + # See https://github.com/pytorch/pytorch/blob/master/torch/utils/cpp_extension.py + # and https://github.com/pytorch/vision/blob/main/packaging/pkg_helpers.bash for reference. export FORCE_CUDA=1 case "$CU_VERSION" in + cu113) + export CUDA_HOME=/usr/local/cuda-11.3/ + export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0;6.1+PTX;7.0;7.5+PTX;8.0;8.6+PTX" + ;; cu112) export CUDA_HOME=/usr/local/cuda-11.2/ export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0;6.1+PTX;7.0;7.5+PTX;8.0;8.6+PTX" diff --git a/tests/layers/test_deformable.py b/tests/layers/test_deformable.py index 4c1543ed5e..4aa319fc7e 100644 --- a/tests/layers/test_deformable.py +++ b/tests/layers/test_deformable.py @@ -4,8 +4,13 @@ import torch from detectron2.layers import DeformConv, ModulatedDeformConv +from detectron2.utils.env import TORCH_VERSION +@unittest.skipIf( + TORCH_VERSION == (1, 8) and torch.cuda.is_available(), + "This test fails under cuda11 + torch1.8.", +) class DeformableTest(unittest.TestCase): @unittest.skipIf(not torch.cuda.is_available(), "Deformable not supported for cpu") def test_forward_output(self):