Skip to content

Commit c85673c

Browse files
bottlerfacebook-github-bot
authored andcommitted
PyTorch 1.11.0
Summary: Add builds for PyTorch 1.11.0. Reviewed By: nikhilaravi Differential Revision: D34861021 fbshipit-source-id: 1a1c46fac48719bc66c81872e65531a48ff538ed
1 parent 3de3c13 commit c85673c

File tree

5 files changed

+222
-19
lines changed

5 files changed

+222
-19
lines changed

.circleci/config.yml

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,51 @@ workflows:
314314
name: linux_conda_py37_cu113_pyt1101
315315
python_version: '3.7'
316316
pytorch_version: 1.10.1
317+
- binary_linux_conda:
318+
context: DOCKERHUB_TOKEN
319+
cu_version: cu102
320+
name: linux_conda_py37_cu102_pyt1102
321+
python_version: '3.7'
322+
pytorch_version: 1.10.2
323+
- binary_linux_conda:
324+
context: DOCKERHUB_TOKEN
325+
cu_version: cu111
326+
name: linux_conda_py37_cu111_pyt1102
327+
python_version: '3.7'
328+
pytorch_version: 1.10.2
329+
- binary_linux_conda:
330+
conda_docker_image: pytorch/conda-builder:cuda113
331+
context: DOCKERHUB_TOKEN
332+
cu_version: cu113
333+
name: linux_conda_py37_cu113_pyt1102
334+
python_version: '3.7'
335+
pytorch_version: 1.10.2
336+
- binary_linux_conda:
337+
context: DOCKERHUB_TOKEN
338+
cu_version: cu102
339+
name: linux_conda_py37_cu102_pyt1110
340+
python_version: '3.7'
341+
pytorch_version: 1.11.0
342+
- binary_linux_conda:
343+
context: DOCKERHUB_TOKEN
344+
cu_version: cu111
345+
name: linux_conda_py37_cu111_pyt1110
346+
python_version: '3.7'
347+
pytorch_version: 1.11.0
348+
- binary_linux_conda:
349+
conda_docker_image: pytorch/conda-builder:cuda113
350+
context: DOCKERHUB_TOKEN
351+
cu_version: cu113
352+
name: linux_conda_py37_cu113_pyt1110
353+
python_version: '3.7'
354+
pytorch_version: 1.11.0
355+
- binary_linux_conda:
356+
conda_docker_image: pytorch/conda-builder:cuda115
357+
context: DOCKERHUB_TOKEN
358+
cu_version: cu115
359+
name: linux_conda_py37_cu115_pyt1110
360+
python_version: '3.7'
361+
pytorch_version: 1.11.0
317362
- binary_linux_conda:
318363
context: DOCKERHUB_TOKEN
319364
cu_version: cu101
@@ -448,6 +493,51 @@ workflows:
448493
name: linux_conda_py38_cu113_pyt1101
449494
python_version: '3.8'
450495
pytorch_version: 1.10.1
496+
- binary_linux_conda:
497+
context: DOCKERHUB_TOKEN
498+
cu_version: cu102
499+
name: linux_conda_py38_cu102_pyt1102
500+
python_version: '3.8'
501+
pytorch_version: 1.10.2
502+
- binary_linux_conda:
503+
context: DOCKERHUB_TOKEN
504+
cu_version: cu111
505+
name: linux_conda_py38_cu111_pyt1102
506+
python_version: '3.8'
507+
pytorch_version: 1.10.2
508+
- binary_linux_conda:
509+
conda_docker_image: pytorch/conda-builder:cuda113
510+
context: DOCKERHUB_TOKEN
511+
cu_version: cu113
512+
name: linux_conda_py38_cu113_pyt1102
513+
python_version: '3.8'
514+
pytorch_version: 1.10.2
515+
- binary_linux_conda:
516+
context: DOCKERHUB_TOKEN
517+
cu_version: cu102
518+
name: linux_conda_py38_cu102_pyt1110
519+
python_version: '3.8'
520+
pytorch_version: 1.11.0
521+
- binary_linux_conda:
522+
context: DOCKERHUB_TOKEN
523+
cu_version: cu111
524+
name: linux_conda_py38_cu111_pyt1110
525+
python_version: '3.8'
526+
pytorch_version: 1.11.0
527+
- binary_linux_conda:
528+
conda_docker_image: pytorch/conda-builder:cuda113
529+
context: DOCKERHUB_TOKEN
530+
cu_version: cu113
531+
name: linux_conda_py38_cu113_pyt1110
532+
python_version: '3.8'
533+
pytorch_version: 1.11.0
534+
- binary_linux_conda:
535+
conda_docker_image: pytorch/conda-builder:cuda115
536+
context: DOCKERHUB_TOKEN
537+
cu_version: cu115
538+
name: linux_conda_py38_cu115_pyt1110
539+
python_version: '3.8'
540+
pytorch_version: 1.11.0
451541
- binary_linux_conda:
452542
context: DOCKERHUB_TOKEN
453543
cu_version: cu101
@@ -564,6 +654,77 @@ workflows:
564654
name: linux_conda_py39_cu113_pyt1101
565655
python_version: '3.9'
566656
pytorch_version: 1.10.1
657+
- binary_linux_conda:
658+
context: DOCKERHUB_TOKEN
659+
cu_version: cu102
660+
name: linux_conda_py39_cu102_pyt1102
661+
python_version: '3.9'
662+
pytorch_version: 1.10.2
663+
- binary_linux_conda:
664+
context: DOCKERHUB_TOKEN
665+
cu_version: cu111
666+
name: linux_conda_py39_cu111_pyt1102
667+
python_version: '3.9'
668+
pytorch_version: 1.10.2
669+
- binary_linux_conda:
670+
conda_docker_image: pytorch/conda-builder:cuda113
671+
context: DOCKERHUB_TOKEN
672+
cu_version: cu113
673+
name: linux_conda_py39_cu113_pyt1102
674+
python_version: '3.9'
675+
pytorch_version: 1.10.2
676+
- binary_linux_conda:
677+
context: DOCKERHUB_TOKEN
678+
cu_version: cu102
679+
name: linux_conda_py39_cu102_pyt1110
680+
python_version: '3.9'
681+
pytorch_version: 1.11.0
682+
- binary_linux_conda:
683+
context: DOCKERHUB_TOKEN
684+
cu_version: cu111
685+
name: linux_conda_py39_cu111_pyt1110
686+
python_version: '3.9'
687+
pytorch_version: 1.11.0
688+
- binary_linux_conda:
689+
conda_docker_image: pytorch/conda-builder:cuda113
690+
context: DOCKERHUB_TOKEN
691+
cu_version: cu113
692+
name: linux_conda_py39_cu113_pyt1110
693+
python_version: '3.9'
694+
pytorch_version: 1.11.0
695+
- binary_linux_conda:
696+
conda_docker_image: pytorch/conda-builder:cuda115
697+
context: DOCKERHUB_TOKEN
698+
cu_version: cu115
699+
name: linux_conda_py39_cu115_pyt1110
700+
python_version: '3.9'
701+
pytorch_version: 1.11.0
702+
- binary_linux_conda:
703+
context: DOCKERHUB_TOKEN
704+
cu_version: cu102
705+
name: linux_conda_py310_cu102_pyt1110
706+
python_version: '3.10'
707+
pytorch_version: 1.11.0
708+
- binary_linux_conda:
709+
context: DOCKERHUB_TOKEN
710+
cu_version: cu111
711+
name: linux_conda_py310_cu111_pyt1110
712+
python_version: '3.10'
713+
pytorch_version: 1.11.0
714+
- binary_linux_conda:
715+
conda_docker_image: pytorch/conda-builder:cuda113
716+
context: DOCKERHUB_TOKEN
717+
cu_version: cu113
718+
name: linux_conda_py310_cu113_pyt1110
719+
python_version: '3.10'
720+
pytorch_version: 1.11.0
721+
- binary_linux_conda:
722+
conda_docker_image: pytorch/conda-builder:cuda115
723+
context: DOCKERHUB_TOKEN
724+
cu_version: cu115
725+
name: linux_conda_py310_cu115_pyt1110
726+
python_version: '3.10'
727+
pytorch_version: 1.11.0
567728
- binary_linux_conda_cuda:
568729
name: testrun_conda_cuda_py37_cu102_pyt170
569730
context: DOCKERHUB_TOKEN

.circleci/regenerate.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import jinja2
1515
import yaml
16+
from packaging import version
1617

1718

1819
# The CUDA versions which have pytorch conda packages available for linux for each
@@ -27,26 +28,40 @@
2728
"1.9.1": ["cu102", "cu111"],
2829
"1.10.0": ["cu102", "cu111", "cu113"],
2930
"1.10.1": ["cu102", "cu111", "cu113"],
31+
"1.10.2": ["cu102", "cu111", "cu113"],
32+
"1.11.0": ["cu102", "cu111", "cu113", "cu115"],
3033
}
3134

3235

3336
def conda_docker_image_for_cuda(cuda_version):
3437
if cuda_version == "cu113":
3538
return "pytorch/conda-builder:cuda113"
39+
if cuda_version == "cu115":
40+
return "pytorch/conda-builder:cuda115"
3641
return None
3742

3843

3944
def pytorch_versions_for_python(python_version):
40-
if python_version in ["3.6", "3.7", "3.8"]:
45+
if python_version in ["3.7", "3.8"]:
4146
return list(CONDA_CUDA_VERSIONS)
42-
pytorch_without_py39 = ["1.4", "1.5.0", "1.5.1", "1.6.0", "1.7.0"]
43-
return [i for i in CONDA_CUDA_VERSIONS if i not in pytorch_without_py39]
47+
if python_version == "3.9":
48+
return [
49+
i
50+
for i in CONDA_CUDA_VERSIONS
51+
if version.Version(i) > version.Version("1.7.0")
52+
]
53+
if python_version == "3.10":
54+
return [
55+
i
56+
for i in CONDA_CUDA_VERSIONS
57+
if version.Version(i) >= version.Version("1.11.0")
58+
]
4459

4560

4661
def workflows(prefix="", filter_branch=None, upload=False, indentation=6):
4762
w = []
4863
for btype in ["conda"]:
49-
for python_version in ["3.7", "3.8", "3.9"]:
64+
for python_version in ["3.7", "3.8", "3.9", "3.10"]:
5065
for pytorch_version in pytorch_versions_for_python(python_version):
5166
for cu_version in CONDA_CUDA_VERSIONS[pytorch_version]:
5267
w += workflow_pair(

packaging/linux_wheels/go.sh

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

88
sudo docker run --rm -v "$PWD/../../:/inside" pytorch/conda-cuda bash inside/packaging/linux_wheels/inside.sh
99
sudo docker run --rm -v "$PWD/../../:/inside" -e SELECTED_CUDA=cu113 pytorch/conda-builder:cuda113 bash inside/packaging/linux_wheels/inside.sh
10+
sudo docker run --rm -v "$PWD/../../:/inside" -e SELECTED_CUDA=cu115 pytorch/conda-builder:cuda115 bash inside/packaging/linux_wheels/inside.sh

packaging/linux_wheels/inside.sh

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,13 @@ echo "CUB_HOME is now $CUB_HOME"
2626
# As a rule, we want to build for any combination of dependencies which is supported by
2727
# PyTorch3D and not older than the current Google Colab set up.
2828

29-
PYTHON_VERSIONS="3.7 3.8 3.9"
29+
PYTHON_VERSIONS="3.7 3.8 3.9 3.10"
3030
# the keys are pytorch versions
3131
declare -A CONDA_CUDA_VERSIONS=(
32-
# ["1.4.0"]="cu101"
33-
# ["1.5.0"]="cu101 cu102"
34-
# ["1.5.1"]="cu101 cu102"
35-
# ["1.6.0"]="cu101 cu102"
36-
# ["1.7.0"]="cu101 cu102 cu110"
37-
# ["1.7.1"]="cu101 cu102 cu110"
38-
# ["1.8.0"]="cu101 cu102 cu111"
39-
# ["1.8.1"]="cu101 cu102 cu111"
40-
# ["1.9.0"]="cu102 cu111"
41-
# ["1.9.1"]="cu102 cu111"
42-
["1.10.0"]="cu102 cu111 cu113"
43-
["1.10.1"]="cu102 cu111 cu113"
32+
["1.10.1"]="cu111 cu113"
33+
["1.10.2"]="cu111 cu113"
34+
["1.10.0"]="cu111 cu113"
35+
["1.11.0"]="cu111 cu113 cu115"
4436
)
4537

4638

@@ -49,24 +41,44 @@ for python_version in $PYTHON_VERSIONS
4941
do
5042
for pytorch_version in "${!CONDA_CUDA_VERSIONS[@]}"
5143
do
52-
if [[ "3.6 3.7 3.8" != *$python_version* ]] && [[ "1.4.0 1.5.0 1.5.1 1.6.0 1.7.0" == *$pytorch_version* ]]
44+
if [[ "3.7 3.8" != *$python_version* ]] && [[ "1.7.0" == *$pytorch_version* ]]
5345
then
5446
#python 3.9 and later not supported by pytorch 1.7.0 and before
5547
continue
5648
fi
49+
if [[ "3.7 3.8 3.9" != *$python_version* ]] && [[ "1.7.0 1.7.1 1.8.0 1.8.1 1.9.0 1.9.1 1.10.0 1.10.1 1.10.2" == *$pytorch_version* ]]
50+
then
51+
#python 3.10 and later not supported by pytorch 1.10.2 and before
52+
continue
53+
fi
5754

5855
extra_channel="-c conda-forge"
56+
if [[ "1.11.0" == "$pytorch_version" ]]
57+
then
58+
extra_channel=""
59+
fi
5960

6061
for cu_version in ${CONDA_CUDA_VERSIONS[$pytorch_version]}
6162
do
62-
if [[ "cu113" == *$cu_version* ]] && [[ $SELECTED_CUDA != "$cu_version" ]]
63+
if [[ "cu113 cu115" == *$cu_version* ]]
6364
# ^^^ CUDA versions listed here have to be built
6465
# in their own containers.
66+
then
67+
if [[ $SELECTED_CUDA != "$cu_version" ]]
68+
then
69+
continue
70+
fi
71+
elif [[ $SELECTED_CUDA != "" ]]
6572
then
6673
continue
6774
fi
6875

6976
case "$cu_version" in
77+
cu115)
78+
export CUDA_HOME=/usr/local/cuda-11.5/
79+
export CUDA_TAG=11.5
80+
export NVCC_FLAGS="-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_50,code=compute_50"
81+
;;
7082
cu113)
7183
export CUDA_HOME=/usr/local/cuda-11.3/
7284
export CUDA_TAG=11.3

packaging/pkg_helpers.bash

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ setup_cuda() {
5555

5656
# Now work out the CUDA settings
5757
case "$CU_VERSION" in
58+
cu115)
59+
if [[ "$OSTYPE" == "msys" ]]; then
60+
export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.5"
61+
else
62+
export CUDA_HOME=/usr/local/cuda-11.5/
63+
fi
64+
export FORCE_CUDA=1
65+
# Hard-coding gencode flags is temporary situation until
66+
# https://github.com/pytorch/pytorch/pull/23408 lands
67+
export NVCC_FLAGS="-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_50,code=compute_50"
68+
;;
5869
cu113)
5970
if [[ "$OSTYPE" == "msys" ]]; then
6071
export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.3"
@@ -293,6 +304,9 @@ setup_conda_cudatoolkit_constraint() {
293304
export CONDA_CUDATOOLKIT_CONSTRAINT=""
294305
else
295306
case "$CU_VERSION" in
307+
cu115)
308+
export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.5,<11.6 # [not osx]"
309+
;;
296310
cu113)
297311
export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.3,<11.4 # [not osx]"
298312
;;

0 commit comments

Comments
 (0)