Skip to content

Commit 4aca4bd

Browse files
ppwwyyxxfacebook-github-bot
authored andcommitted
v0.4 release
Summary: Pull Request resolved: fairinternal/detectron2#517 Reviewed By: alexander-kirillov Differential Revision: D27029723 Pulled By: ppwwyyxx fbshipit-source-id: 4dccf454612e468ba88f73360aff8c7ecee2819d
1 parent 10e97e4 commit 4aca4bd

File tree

6 files changed

+32
-28
lines changed

6 files changed

+32
-28
lines changed

INSTALL.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,34 @@ old build first. You often need to rebuild detectron2 after reinstalling PyTorch
2828

2929
### Install Pre-Built Detectron2 (Linux only)
3030

31-
Choose from this table to install [v0.3 (Nov 2020)](https://github.com/facebookresearch/detectron2/releases):
31+
Choose from this table to install [v0.4 (Mar 2021)](https://github.com/facebookresearch/detectron2/releases):
3232

33-
<table class="docutils"><tbody><th width="80"> CUDA </th><th valign="bottom" align="left" width="100">torch 1.7</th><th valign="bottom" align="left" width="100">torch 1.6</th><th valign="bottom" align="left" width="100">torch 1.5</th> <tr><td align="left">11.0</td><td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
33+
<table class="docutils"><tbody><th width="80"> CUDA </th><th valign="bottom" align="left" width="100">torch 1.8</th><th valign="bottom" align="left" width="100">torch 1.7</th><th valign="bottom" align="left" width="100">torch 1.6</th> <tr><td align="left">11.1</td><td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
34+
https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.8/index.html
35+
</code></pre> </details> </td> <td align="left"> </td> <td align="left"> </td> </tr> <tr><td align="left">11.0</td><td align="left"> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
3436
https://dl.fbaipublicfiles.com/detectron2/wheels/cu110/torch1.7/index.html
35-
</code></pre> </details> </td> <td align="left"> </td> <td align="left"> </td> </tr> <tr><td align="left">10.2</td><td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
37+
</code></pre> </details> </td> <td align="left"> </td> </tr> <tr><td align="left">10.2</td><td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
38+
https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.8/index.html
39+
</code></pre> </details> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
3640
https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.7/index.html
3741
</code></pre> </details> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
3842
https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.6/index.html
39-
</code></pre> </details> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
40-
https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.5/index.html
4143
</code></pre> </details> </td> </tr> <tr><td align="left">10.1</td><td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
44+
https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.html
45+
</code></pre> </details> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
4246
https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.7/index.html
4347
</code></pre> </details> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
4448
https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.6/index.html
45-
</code></pre> </details> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
46-
https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.5/index.html
47-
</code></pre> </details> </td> </tr> <tr><td align="left">9.2</td><td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
49+
</code></pre> </details> </td> </tr> <tr><td align="left">9.2</td><td align="left"> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
4850
https://dl.fbaipublicfiles.com/detectron2/wheels/cu92/torch1.7/index.html
4951
</code></pre> </details> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
5052
https://dl.fbaipublicfiles.com/detectron2/wheels/cu92/torch1.6/index.html
51-
</code></pre> </details> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
52-
https://dl.fbaipublicfiles.com/detectron2/wheels/cu92/torch1.5/index.html
5353
</code></pre> </details> </td> </tr> <tr><td align="left">cpu</td><td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
54+
https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.8/index.html
55+
</code></pre> </details> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
5456
https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.7/index.html
5557
</code></pre> </details> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
5658
https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.6/index.html
57-
</code></pre> </details> </td> <td align="left"><details><summary> install </summary><pre><code>python -m pip install detectron2 -f \
58-
https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.5/index.html
5959
</code></pre> </details> </td> </tr></tbody></table>
6060

6161

@@ -183,14 +183,16 @@ to match your local CUDA installation, or install a different version of CUDA to
183183
C++ compilation errors from NVCC / NVRTC; "Unsupported gpu architecture"
184184
</summary>
185185

186+
A few possibilities:
187+
186188
1. Local CUDA/NVCC version has to match the CUDA version of your PyTorch. Both can be found in `python collect_env.py`.
187189
When they are inconsistent, you need to either install a different build of PyTorch (or build by yourself)
188190
to match your local CUDA installation, or install a different version of CUDA to match PyTorch.
189191

190192
2. Local CUDA/NVCC version shall support the SM architecture (a.k.a. compute capability) of your GPU.
191193
The capability of your GPU can be found at [developer.nvidia.com/cuda-gpus](https://developer.nvidia.com/cuda-gpus).
192194
The capability supported by NVCC is listed at [here](https://gist.github.com/ax3l/9489132).
193-
If your NVCC version is too old, this can be workaround a lower capability.environment variable
195+
If your NVCC version is too old, this can be workaround by setting environment variable
194196
`TORCH_CUDA_ARCH_LIST` to a lower, supported capability.
195197

196198
3. The combination of NVCC and GCC you use is incompatible. You need to change one of their versions.

detectron2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
# This line will be programatically read/write by setup.py.
99
# Leave them at the bottom of this file and don't touch them.
10-
__version__ = "0.3"
10+
__version__ = "0.4"

dev/packaging/build_all_wheels.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ build_one() {
2424
esac
2525

2626
echo "Launching container $container_name ..."
27+
container_id="$container_name"_"$cu"_"$pytorch_ver"
2728

2829
py_versions=(3.6 3.7 3.8)
2930
if [[ $pytorch_ver == "1.8" ]]; then
@@ -32,18 +33,18 @@ build_one() {
3233

3334
for py in "${py_versions[@]}"; do
3435
docker run -itd \
35-
--name $container_name \
36+
--name "$container_id" \
3637
--mount type=bind,source="$(pwd)",target=/detectron2 \
3738
pytorch/$container_name
3839

39-
cat <<EOF | docker exec -i $container_name sh
40+
cat <<EOF | docker exec -i $container_id sh
4041
export CU_VERSION=$cu D2_VERSION_SUFFIX=+$cu PYTHON_VERSION=$py
4142
export PYTORCH_VERSION=$pytorch_ver
4243
cd /detectron2 && ./dev/packaging/build_wheel.sh
4344
EOF
4445

45-
docker container stop $container_name
46-
docker container rm $container_name
46+
docker container stop $container_id
47+
docker container rm $container_id
4748
done
4849
}
4950

dev/packaging/gen_install_table.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
https://dl.fbaipublicfiles.com/detectron2/wheels/{cuda}/torch{torch}/index.html
1010
</code></pre> </details>"""
1111
CUDA_SUFFIX = {
12+
"11.1": "cu111",
1213
"11.0": "cu110",
1314
"10.2": "cu102",
1415
"10.1": "cu101",
@@ -34,9 +35,9 @@ def gen_header(torch_versions):
3435
d2_version = f"=={args.d2_version}" if args.d2_version else ""
3536

3637
all_versions = (
37-
[("1.5", k) for k in ["10.2", "10.1", "9.2", "cpu"]]
38-
+ [("1.6", k) for k in ["10.2", "10.1", "9.2", "cpu"]]
38+
[("1.6", k) for k in ["10.2", "10.1", "9.2", "cpu"]]
3939
+ [("1.7", k) for k in ["11.0", "10.2", "10.1", "9.2", "cpu"]]
40+
+ [("1.8", k) for k in ["11.1", "10.2", "10.1", "cpu"]]
4041
)
4142

4243
torch_versions = sorted({k[0] for k in all_versions}, key=float, reverse=True)

dev/packaging/gen_wheel_index.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export LC_ALL=C # reproducible sort
1414
index=$root/index.html
1515

1616
cd "$root"
17-
for cu in cpu cu92 cu100 cu101 cu102 cu110; do
17+
for cu in cpu cu92 cu100 cu101 cu102 cu110 cu111; do
1818
cd "$root/$cu"
1919
echo "Creating $PWD/index.html ..."
2020
# First sort by torch version, then stable sort by d2 version with unique.

dev/packaging/pkg_helpers.bash

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,31 @@ setup_cuda() {
1919
case "$CU_VERSION" in
2020
cu112)
2121
export CUDA_HOME=/usr/local/cuda-11.2/
22-
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0+PTX;6.1+PTX;7.0+PTX;7.5+PTX;8.0+PTX;8.6+PTX"
22+
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"
2323
;;
2424
cu111)
2525
export CUDA_HOME=/usr/local/cuda-11.1/
26-
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0+PTX;6.1+PTX;7.0+PTX;7.5+PTX;8.0+PTX;8.6+PTX"
26+
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"
2727
;;
2828
cu110)
2929
export CUDA_HOME=/usr/local/cuda-11.0/
30-
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0+PTX;6.1+PTX;7.0+PTX;7.5+PTX;8.0+PTX"
30+
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0;6.1+PTX;7.0;7.5+PTX;8.0+PTX"
3131
;;
3232
cu102)
3333
export CUDA_HOME=/usr/local/cuda-10.2/
34-
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0+PTX;6.1+PTX;7.0+PTX;7.5+PTX"
34+
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0;6.1+PTX;7.0;7.5+PTX"
3535
;;
3636
cu101)
3737
export CUDA_HOME=/usr/local/cuda-10.1/
38-
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0+PTX;6.1+PTX;7.0+PTX;7.5+PTX"
38+
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0;6.1+PTX;7.0;7.5+PTX"
3939
;;
4040
cu100)
4141
export CUDA_HOME=/usr/local/cuda-10.0/
42-
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0+PTX;6.1+PTX;7.0+PTX;7.5+PTX"
42+
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0;6.1+PTX;7.0;7.5+PTX"
4343
;;
4444
cu92)
4545
export CUDA_HOME=/usr/local/cuda-9.2/
46-
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0+PTX;6.1+PTX;7.0+PTX"
46+
export TORCH_CUDA_ARCH_LIST="3.7;5.0;5.2;6.0;6.1+PTX;7.0+PTX"
4747
;;
4848
cpu)
4949
unset FORCE_CUDA

0 commit comments

Comments
 (0)