From a53a2d37317c4748931fdc90e6456bfda5cf5c67 Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein Date: Tue, 21 Apr 2020 12:12:24 -0700 Subject: [PATCH] Builds with pytorch 1.5 Summary: Add conda packages for pytorch 1.5. Make wheels be only pytorch 1.5. Note that pytorch 1.4 has conda packages for cuda 9.2, 10.0 and 10.1, whilst pytorch 1.5 has packages for cuda 9.2, 10.1 and 10.2. We mirror these choices. Reviewed By: nikhilaravi Differential Revision: D21157392 fbshipit-source-id: 2f7311e6a83774a6d6c8afb8110b8bd9f37f1454 --- .circleci/config.in.yml | 19 ++++-- .circleci/config.yml | 140 ++++++++++++++++++++++++++-------------- .circleci/regenerate.py | 58 +++++++++++------ INSTALL.md | 6 +- 4 files changed, 147 insertions(+), 76 deletions(-) diff --git a/.circleci/config.in.yml b/.circleci/config.in.yml index b6baeeb9..5cc750d1 100644 --- a/.circleci/config.in.yml +++ b/.circleci/config.in.yml @@ -207,22 +207,27 @@ workflows: - main {{workflows()}} - binary_linux_conda_cuda: - name: testrun_conda_cuda_py3.7_cu100 + name: testrun_conda_cuda_py37_cu100_pyt14 python_version: "3.7" pytorch_version: "1.4" cu_version: "cu100" + - binary_linux_conda_cuda: + name: testrun_conda_cuda_py37_cu102_pyt15 + python_version: "3.7" + pytorch_version: "1.5" + cu_version: "cu102" - binary_macos_wheel: cu_version: cpu - name: macos_wheel_py3.6_cpu + name: macos_wheel_py36_cpu python_version: '3.6' - pytorch_version: '1.4' + pytorch_version: '1.5' - binary_macos_wheel: cu_version: cpu - name: macos_wheel_py3.7_cpu + name: macos_wheel_py37_cpu python_version: '3.7' - pytorch_version: '1.4' + pytorch_version: '1.5' - binary_macos_wheel: cu_version: cpu - name: macos_wheel_py3.8_cpu + name: macos_wheel_py38_cpu python_version: '3.8' - pytorch_version: '1.4' + pytorch_version: '1.5' diff --git a/.circleci/config.yml b/.circleci/config.yml index 2e9c2c30..fbe94001 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -207,87 +207,131 @@ workflows: - main - binary_linux_conda: cu_version: cu92 - name: binary_linux_conda_py3.6_cu92 + name: linux_conda_py36_cu92_pyt14 python_version: '3.6' pytorch_version: '1.4' - wheel_docker_image: pytorch/manylinux-cuda92 - binary_linux_conda: cu_version: cu100 - name: binary_linux_conda_py3.6_cu100 + name: linux_conda_py36_cu100_pyt14 python_version: '3.6' pytorch_version: '1.4' - wheel_docker_image: pytorch/manylinux-cuda100 - binary_linux_conda: cu_version: cu101 - name: binary_linux_conda_py3.6_cu101 + name: linux_conda_py36_cu101_pyt14 python_version: '3.6' pytorch_version: '1.4' - binary_linux_conda: cu_version: cu92 - name: binary_linux_conda_py3.7_cu92 - python_version: '3.7' - pytorch_version: '1.4' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_conda: - cu_version: cu100 - name: binary_linux_conda_py3.7_cu100 - python_version: '3.7' - pytorch_version: '1.4' - wheel_docker_image: pytorch/manylinux-cuda100 + name: linux_conda_py36_cu92_pyt15 + python_version: '3.6' + pytorch_version: '1.5' - binary_linux_conda: cu_version: cu101 - name: binary_linux_conda_py3.7_cu101 + name: linux_conda_py36_cu101_pyt15 + python_version: '3.6' + pytorch_version: '1.5' + - binary_linux_conda: + cu_version: cu102 + name: linux_conda_py36_cu102_pyt15 + python_version: '3.6' + pytorch_version: '1.5' + - binary_linux_conda: + cu_version: cu92 + name: linux_conda_py37_cu92_pyt14 + python_version: '3.7' + pytorch_version: '1.4' + - binary_linux_conda: + cu_version: cu100 + name: linux_conda_py37_cu100_pyt14 + python_version: '3.7' + pytorch_version: '1.4' + - binary_linux_conda: + cu_version: cu101 + name: linux_conda_py37_cu101_pyt14 python_version: '3.7' pytorch_version: '1.4' - binary_linux_conda: cu_version: cu92 - name: binary_linux_conda_py3.8_cu92 - python_version: '3.8' - pytorch_version: '1.4' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_conda: - cu_version: cu100 - name: binary_linux_conda_py3.8_cu100 - python_version: '3.8' - pytorch_version: '1.4' - wheel_docker_image: pytorch/manylinux-cuda100 + name: linux_conda_py37_cu92_pyt15 + python_version: '3.7' + pytorch_version: '1.5' - binary_linux_conda: cu_version: cu101 - name: binary_linux_conda_py3.8_cu101 - python_version: '3.8' - pytorch_version: '1.4' - - binary_linux_wheel: - cu_version: cpu - name: binary_linux_wheel_py3.6_cpu - python_version: '3.6' - pytorch_version: '1.4' - - binary_linux_wheel: - cu_version: cpu - name: binary_linux_wheel_py3.7_cpu + name: linux_conda_py37_cu101_pyt15 python_version: '3.7' - pytorch_version: '1.4' - - binary_linux_wheel: - cu_version: cpu - name: binary_linux_wheel_py3.8_cpu + pytorch_version: '1.5' + - binary_linux_conda: + cu_version: cu102 + name: linux_conda_py37_cu102_pyt15 + python_version: '3.7' + pytorch_version: '1.5' + - binary_linux_conda: + cu_version: cu92 + name: linux_conda_py38_cu92_pyt14 python_version: '3.8' pytorch_version: '1.4' + - binary_linux_conda: + cu_version: cu100 + name: linux_conda_py38_cu100_pyt14 + python_version: '3.8' + pytorch_version: '1.4' + - binary_linux_conda: + cu_version: cu101 + name: linux_conda_py38_cu101_pyt14 + python_version: '3.8' + pytorch_version: '1.4' + - binary_linux_conda: + cu_version: cu92 + name: linux_conda_py38_cu92_pyt15 + python_version: '3.8' + pytorch_version: '1.5' + - binary_linux_conda: + cu_version: cu101 + name: linux_conda_py38_cu101_pyt15 + python_version: '3.8' + pytorch_version: '1.5' + - binary_linux_conda: + cu_version: cu102 + name: linux_conda_py38_cu102_pyt15 + python_version: '3.8' + pytorch_version: '1.5' + - binary_linux_wheel: + cu_version: cpu + name: linux_wheel_py36_cpu_pyt15 + python_version: '3.6' + pytorch_version: '1.5' + - binary_linux_wheel: + cu_version: cpu + name: linux_wheel_py37_cpu_pyt15 + python_version: '3.7' + pytorch_version: '1.5' + - binary_linux_wheel: + cu_version: cpu + name: linux_wheel_py38_cpu_pyt15 + python_version: '3.8' + pytorch_version: '1.5' - binary_linux_conda_cuda: - name: testrun_conda_cuda_py3.7_cu100 + name: testrun_conda_cuda_py37_cu100_pyt14 python_version: "3.7" pytorch_version: "1.4" cu_version: "cu100" + - binary_linux_conda_cuda: + name: testrun_conda_cuda_py37_cu102_pyt15 + python_version: "3.7" + pytorch_version: "1.5" + cu_version: "cu102" - binary_macos_wheel: cu_version: cpu - name: macos_wheel_py3.6_cpu + name: macos_wheel_py36_cpu python_version: '3.6' - pytorch_version: '1.4' + pytorch_version: '1.5' - binary_macos_wheel: cu_version: cpu - name: macos_wheel_py3.7_cpu + name: macos_wheel_py37_cpu python_version: '3.7' - pytorch_version: '1.4' + pytorch_version: '1.5' - binary_macos_wheel: cu_version: cpu - name: macos_wheel_py3.8_cpu + name: macos_wheel_py38_cpu python_version: '3.8' - pytorch_version: '1.4' + pytorch_version: '1.5' diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 3cb534e6..a7378504 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -11,25 +11,36 @@ import jinja2 import yaml +# The CUDA versions which have pytorch conda packages available for linux for each +# version of pytorch. +CONDA_CUDA_VERSIONS = { + "1.4": ["cu92", "cu100", "cu101"], + "1.5": ["cu92", "cu101", "cu102"], +} + + def workflows(prefix="", filter_branch=None, upload=False, indentation=6): w = [] for btype in ["conda"]: for python_version in ["3.6", "3.7", "3.8"]: - for cu_version in ["cu92", "cu100", "cu101"]: - w += workflow_pair( - btype=btype, - python_version=python_version, - cu_version=cu_version, - prefix=prefix, - upload=upload, - filter_branch=filter_branch, - ) + for pytorch_version in ["1.4", "1.5"]: + for cu_version in CONDA_CUDA_VERSIONS[pytorch_version]: + w += workflow_pair( + btype=btype, + python_version=python_version, + pytorch_version=pytorch_version, + cu_version=cu_version, + prefix=prefix, + upload=upload, + filter_branch=filter_branch, + ) for btype in ["wheel"]: for python_version in ["3.6", "3.7", "3.8"]: for cu_version in ["cpu"]: w += workflow_pair( btype=btype, python_version=python_version, + pytorch_version="1.5", cu_version=cu_version, prefix=prefix, upload=upload, @@ -40,16 +51,26 @@ def workflows(prefix="", filter_branch=None, upload=False, indentation=6): def workflow_pair( - *, btype, python_version, cu_version, prefix="", upload=False, filter_branch + *, + btype, + python_version, + pytorch_version, + cu_version, + prefix="", + upload=False, + filter_branch, ): w = [] - base_workflow_name = f"{prefix}binary_linux_{btype}_py{python_version}_{cu_version}" + py = python_version.replace(".", "") + pyt = pytorch_version.replace(".", "") + base_workflow_name = f"{prefix}linux_{btype}_py{py}_{cu_version}_pyt{pyt}" w.append( generate_base_workflow( base_workflow_name=base_workflow_name, python_version=python_version, + pytorch_version=pytorch_version, cu_version=cu_version, btype=btype, filter_branch=filter_branch, @@ -70,21 +91,22 @@ def workflow_pair( def generate_base_workflow( - *, base_workflow_name, python_version, cu_version, btype, filter_branch=None + *, + base_workflow_name, + python_version, + cu_version, + pytorch_version, + btype, + filter_branch=None, ): d = { "name": base_workflow_name, "python_version": python_version, "cu_version": cu_version, - "pytorch_version": "1.4", + "pytorch_version": pytorch_version, } - if cu_version == "cu92": - d["wheel_docker_image"] = "pytorch/manylinux-cuda92" - elif cu_version == "cu100": - d["wheel_docker_image"] = "pytorch/manylinux-cuda100" - if filter_branch is not None: d["filters"] = {"branches": {"only": filter_branch}} diff --git a/INSTALL.md b/INSTALL.md index f6993b88..784b3e28 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -9,17 +9,17 @@ The core library is written in PyTorch. Several components have underlying imple - Linux or macOS or Windows - Python ≥ 3.6 -- PyTorch 1.4 +- PyTorch 1.4 or 1.5 - torchvision that matches the PyTorch installation. You can install them together at pytorch.org to make sure of this. - gcc & g++ ≥ 4.9 -- CUDA 9.2 or 10.0 or 10.1 - [fvcore](https://github.com/facebookresearch/fvcore) +- If CUDA is to be used, use at least version 9.2. These can be installed by running: ``` conda create -n pytorch3d python=3.8 conda activate pytorch3d -conda install -c pytorch pytorch torchvision cudatoolkit=10.0 +conda install -c pytorch pytorch torchvision cudatoolkit=10.2 conda install -c conda-forge -c fvcore fvcore ```