From 53d99671bd150ca47f5710822ddde9589816c163 Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein Date: Mon, 11 Oct 2021 06:12:06 -0700 Subject: [PATCH] remove PyTorch 1.5 builds Summary: PyTorch 1.6.0 came out on 28 Jul 2020. Stop builds for 1.5.0 and 1.5.1. Also update the news section of the README for recent releases. Reviewed By: nikhilaravi Differential Revision: D31442830 fbshipit-source-id: 20bdd8a07090776d0461240e71c6536d874615f6 --- .circleci/config.in.yml | 6 -- .circleci/config.yml | 114 --------------------- .circleci/regenerate.py | 2 - INSTALL.md | 2 +- README.md | 4 + packaging/linux_wheels/inside.sh | 7 +- projects/nerf/nerf/harmonic_embedding.py | 7 +- pytorch3d/renderer/implicit/raysampling.py | 5 +- tests/test_sample_pdf.py | 1 - 9 files changed, 8 insertions(+), 140 deletions(-) diff --git a/.circleci/config.in.yml b/.circleci/config.in.yml index 1e42d0ed4..607baf5da 100644 --- a/.circleci/config.in.yml +++ b/.circleci/config.in.yml @@ -231,12 +231,6 @@ workflows: - main: context: DOCKERHUB_TOKEN {{workflows()}} - - binary_linux_conda_cuda: - name: testrun_conda_cuda_py36_cu101_pyt151 - context: DOCKERHUB_TOKEN - python_version: "3.6" - pytorch_version: "1.5.1" - cu_version: "cu101" - binary_linux_conda_cuda: name: testrun_conda_cuda_py37_cu102_pyt190 context: DOCKERHUB_TOKEN diff --git a/.circleci/config.yml b/.circleci/config.yml index b5dd92ef0..10456672e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -230,42 +230,6 @@ workflows: jobs: - main: context: DOCKERHUB_TOKEN - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu92 - name: linux_conda_py36_cu92_pyt150 - python_version: '3.6' - pytorch_version: 1.5.0 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu101 - name: linux_conda_py36_cu101_pyt150 - python_version: '3.6' - pytorch_version: 1.5.0 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu102 - name: linux_conda_py36_cu102_pyt150 - python_version: '3.6' - pytorch_version: 1.5.0 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu92 - name: linux_conda_py36_cu92_pyt151 - python_version: '3.6' - pytorch_version: 1.5.1 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu101 - name: linux_conda_py36_cu101_pyt151 - python_version: '3.6' - pytorch_version: 1.5.1 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu102 - name: linux_conda_py36_cu102_pyt151 - python_version: '3.6' - pytorch_version: 1.5.1 - binary_linux_conda: context: DOCKERHUB_TOKEN cu_version: cu92 @@ -380,42 +344,6 @@ workflows: name: linux_conda_py36_cu111_pyt191 python_version: '3.6' pytorch_version: 1.9.1 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu92 - name: linux_conda_py37_cu92_pyt150 - python_version: '3.7' - pytorch_version: 1.5.0 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu101 - name: linux_conda_py37_cu101_pyt150 - python_version: '3.7' - pytorch_version: 1.5.0 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu102 - name: linux_conda_py37_cu102_pyt150 - python_version: '3.7' - pytorch_version: 1.5.0 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu92 - name: linux_conda_py37_cu92_pyt151 - python_version: '3.7' - pytorch_version: 1.5.1 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu101 - name: linux_conda_py37_cu101_pyt151 - python_version: '3.7' - pytorch_version: 1.5.1 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu102 - name: linux_conda_py37_cu102_pyt151 - python_version: '3.7' - pytorch_version: 1.5.1 - binary_linux_conda: context: DOCKERHUB_TOKEN cu_version: cu92 @@ -530,42 +458,6 @@ workflows: name: linux_conda_py37_cu111_pyt191 python_version: '3.7' pytorch_version: 1.9.1 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu92 - name: linux_conda_py38_cu92_pyt150 - python_version: '3.8' - pytorch_version: 1.5.0 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu101 - name: linux_conda_py38_cu101_pyt150 - python_version: '3.8' - pytorch_version: 1.5.0 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu102 - name: linux_conda_py38_cu102_pyt150 - python_version: '3.8' - pytorch_version: 1.5.0 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu92 - name: linux_conda_py38_cu92_pyt151 - python_version: '3.8' - pytorch_version: 1.5.1 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu101 - name: linux_conda_py38_cu101_pyt151 - python_version: '3.8' - pytorch_version: 1.5.1 - - binary_linux_conda: - context: DOCKERHUB_TOKEN - cu_version: cu102 - name: linux_conda_py38_cu102_pyt151 - python_version: '3.8' - pytorch_version: 1.5.1 - binary_linux_conda: context: DOCKERHUB_TOKEN cu_version: cu92 @@ -758,12 +650,6 @@ workflows: name: linux_conda_py39_cu111_pyt191 python_version: '3.9' pytorch_version: 1.9.1 - - binary_linux_conda_cuda: - name: testrun_conda_cuda_py36_cu101_pyt151 - context: DOCKERHUB_TOKEN - python_version: "3.6" - pytorch_version: "1.5.1" - cu_version: "cu101" - binary_linux_conda_cuda: name: testrun_conda_cuda_py37_cu102_pyt190 context: DOCKERHUB_TOKEN diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 9457a853f..446ec84cc 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -19,8 +19,6 @@ # version of pytorch. # Pytorch 1.4 also supports cuda 10.0 but we no longer build for cuda 10.0 at all. CONDA_CUDA_VERSIONS = { - "1.5.0": ["cu92", "cu101", "cu102"], - "1.5.1": ["cu92", "cu101", "cu102"], "1.6.0": ["cu92", "cu101", "cu102"], "1.7.0": ["cu101", "cu102", "cu110"], "1.7.1": ["cu101", "cu102", "cu110"], diff --git a/INSTALL.md b/INSTALL.md index fad578581..f238f33c5 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -9,7 +9,7 @@ The core library is written in PyTorch. Several components have underlying imple - Linux or macOS or Windows - Python 3.6, 3.7, 3.8 or 3.9 -- PyTorch 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0 or 1.9.1. +- PyTorch 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0 or 1.9.1. - torchvision that matches the PyTorch installation. You can install them together as explained at pytorch.org to make sure of this. - gcc & g++ ≥ 4.9 - [fvcore](https://github.com/facebookresearch/fvcore) diff --git a/README.md b/README.md index 18ee77e3d..0bc4b68af 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,10 @@ If you are using the pulsar backend for sphere-rendering (the `PulsarPointRender Please see below for a timeline of the codebase updates in reverse chronological order. We are sharing updates on the releases as well as research projects which are built with PyTorch3D. The changelogs for the releases are available under [`Releases`](https://github.com/facebookresearch/pytorch3d/releases), and the builds can be installed using `conda` as per the instructions in [INSTALL.md](INSTALL.md). +**[Oct 6th 2021]:** PyTorch3D [v0.6.0](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.6.0) released + +**[Aug 5th 2021]:** PyTorch3D [v0.5.0](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.5.0) released + **[Feb 9th 2021]:** PyTorch3D [v0.4.0](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.4.0) released with support for implicit functions, volume rendering and a [reimplementation of NeRF](https://github.com/facebookresearch/pytorch3d/tree/main/projects/nerf). **[November 2nd 2020]:** PyTorch3D [v0.3.0](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.3.0) released, integrating the pulsar backend. diff --git a/packaging/linux_wheels/inside.sh b/packaging/linux_wheels/inside.sh index 81533af1e..8d9d25317 100644 --- a/packaging/linux_wheels/inside.sh +++ b/packaging/linux_wheels/inside.sh @@ -53,12 +53,7 @@ do continue fi - if [[ "3.9" == "$python_version" ]] - then - extra_channel="-c conda-forge" - else - extra_channel="" - fi + extra_channel="-c conda-forge" for cu_version in ${CONDA_CUDA_VERSIONS[$pytorch_version]} do diff --git a/projects/nerf/nerf/harmonic_embedding.py b/projects/nerf/nerf/harmonic_embedding.py index ecd11ce1c..4040eed9f 100644 --- a/projects/nerf/nerf/harmonic_embedding.py +++ b/projects/nerf/nerf/harmonic_embedding.py @@ -69,12 +69,7 @@ def __init__( dtype=torch.float32, ) - try: - self.register_buffer("_frequencies", omega0 * frequencies, persistent=False) - except TypeError: - # workaround for pytorch<1.6 - self.register_buffer("_frequencies", omega0 * frequencies) - + self.register_buffer("_frequencies", omega0 * frequencies, persistent=False) self.include_input = include_input def forward(self, x: torch.Tensor) -> torch.Tensor: diff --git a/pytorch3d/renderer/implicit/raysampling.py b/pytorch3d/renderer/implicit/raysampling.py index 0b9d4ea3f..85bf5bf81 100644 --- a/pytorch3d/renderer/implicit/raysampling.py +++ b/pytorch3d/renderer/implicit/raysampling.py @@ -96,10 +96,7 @@ def __init__( ), dim=-1, ) - try: - self.register_buffer("_xy_grid", _xy_grid, persistent=False) - except TypeError: - self.register_buffer("_xy_grid", _xy_grid) # workaround for pytorch<1.6 + self.register_buffer("_xy_grid", _xy_grid, persistent=False) def forward(self, cameras: CamerasBase, **kwargs) -> RayBundle: """ diff --git a/tests/test_sample_pdf.py b/tests/test_sample_pdf.py index c73f0e3df..4d1cf9ac5 100644 --- a/tests/test_sample_pdf.py +++ b/tests/test_sample_pdf.py @@ -12,7 +12,6 @@ from pytorch3d.renderer.implicit.sample_pdf import sample_pdf, sample_pdf_python -@unittest.skipIf(torch.__version__[:4] == "1.5.", "searchsorted needs PyTorch 1.6") class TestSamplePDF(TestCaseMixin, unittest.TestCase): def setUp(self) -> None: super().setUp()