mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-01 03:12:49 +08:00
pytorch 2.1, drop mac builds
Summary: Build updates for PyTorch 2.1 Reviewed By: MichaelRamamonjisoa Differential Revision: D50345762 fbshipit-source-id: 89bf4edf1c21566aa86a3abca9b4df7c4d1d17a2
This commit is contained in:
parent
eaf0709d6a
commit
28f914bf3b
@ -156,24 +156,6 @@ jobs:
|
||||
|
||||
docker run --gpus all --ipc=host -v $(pwd):/remote -w /remote ${VARS_TO_PASS} ${TESTRUN_DOCKER_IMAGE} python3 ./packaging/build_conda.py
|
||||
|
||||
binary_macos_wheel:
|
||||
<<: *binary_common
|
||||
macos:
|
||||
xcode: "13.4.1"
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
# Cannot easily deduplicate this as source'ing activate
|
||||
# will set environment variables which we need to propagate
|
||||
# to build_wheel.sh
|
||||
command: |
|
||||
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
|
||||
sh conda.sh -b
|
||||
source $HOME/miniconda3/bin/activate
|
||||
packaging/build_wheel.sh
|
||||
- store_artifacts:
|
||||
path: dist
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build_and_test:
|
||||
@ -187,18 +169,3 @@ workflows:
|
||||
python_version: "3.8"
|
||||
pytorch_version: '1.9.0'
|
||||
cu_version: "cu102"
|
||||
- binary_macos_wheel:
|
||||
cu_version: cpu
|
||||
name: macos_wheel_py3.8_cpu
|
||||
python_version: '3.8'
|
||||
pytorch_version: '1.13.0'
|
||||
- binary_macos_wheel:
|
||||
cu_version: cpu
|
||||
name: macos_wheel_py3.9_cpu
|
||||
python_version: '3.9'
|
||||
pytorch_version: '1.13.0'
|
||||
- binary_macos_wheel:
|
||||
cu_version: cpu
|
||||
name: macos_wheel_py3.10_cpu
|
||||
python_version: '3.10'
|
||||
pytorch_version: '1.13.0'
|
||||
|
@ -156,113 +156,12 @@ jobs:
|
||||
|
||||
docker run --gpus all --ipc=host -v $(pwd):/remote -w /remote ${VARS_TO_PASS} ${TESTRUN_DOCKER_IMAGE} python3 ./packaging/build_conda.py
|
||||
|
||||
binary_macos_wheel:
|
||||
<<: *binary_common
|
||||
macos:
|
||||
xcode: "13.4.1"
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
# Cannot easily deduplicate this as source'ing activate
|
||||
# will set environment variables which we need to propagate
|
||||
# to build_wheel.sh
|
||||
command: |
|
||||
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
|
||||
sh conda.sh -b
|
||||
source $HOME/miniconda3/bin/activate
|
||||
packaging/build_wheel.sh
|
||||
- store_artifacts:
|
||||
path: dist
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build_and_test:
|
||||
jobs:
|
||||
# - main:
|
||||
# context: DOCKERHUB_TOKEN
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
name: linux_conda_py38_cu102_pyt1100
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.10.0
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu111
|
||||
name: linux_conda_py38_cu111_pyt1100
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.10.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda113
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu113
|
||||
name: linux_conda_py38_cu113_pyt1100
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.10.0
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
name: linux_conda_py38_cu102_pyt1101
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.10.1
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu111
|
||||
name: linux_conda_py38_cu111_pyt1101
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.10.1
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda113
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu113
|
||||
name: linux_conda_py38_cu113_pyt1101
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.10.1
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
name: linux_conda_py38_cu102_pyt1102
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.10.2
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu111
|
||||
name: linux_conda_py38_cu111_pyt1102
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.10.2
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda113
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu113
|
||||
name: linux_conda_py38_cu113_pyt1102
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.10.2
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
name: linux_conda_py38_cu102_pyt1110
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.11.0
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu111
|
||||
name: linux_conda_py38_cu111_pyt1110
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.11.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda113
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu113
|
||||
name: linux_conda_py38_cu113_pyt1110
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.11.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda115
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu115
|
||||
name: linux_conda_py38_cu115_pyt1110
|
||||
python_version: '3.8'
|
||||
pytorch_version: 1.11.0
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
@ -360,88 +259,19 @@ workflows:
|
||||
python_version: '3.8'
|
||||
pytorch_version: 2.0.1
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda118
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
name: linux_conda_py39_cu102_pyt1100
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.10.0
|
||||
cu_version: cu118
|
||||
name: linux_conda_py38_cu118_pyt210
|
||||
python_version: '3.8'
|
||||
pytorch_version: 2.1.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda121
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu111
|
||||
name: linux_conda_py39_cu111_pyt1100
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.10.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda113
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu113
|
||||
name: linux_conda_py39_cu113_pyt1100
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.10.0
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
name: linux_conda_py39_cu102_pyt1101
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.10.1
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu111
|
||||
name: linux_conda_py39_cu111_pyt1101
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.10.1
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda113
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu113
|
||||
name: linux_conda_py39_cu113_pyt1101
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.10.1
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
name: linux_conda_py39_cu102_pyt1102
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.10.2
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu111
|
||||
name: linux_conda_py39_cu111_pyt1102
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.10.2
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda113
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu113
|
||||
name: linux_conda_py39_cu113_pyt1102
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.10.2
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
name: linux_conda_py39_cu102_pyt1110
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.11.0
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu111
|
||||
name: linux_conda_py39_cu111_pyt1110
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.11.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda113
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu113
|
||||
name: linux_conda_py39_cu113_pyt1110
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.11.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda115
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu115
|
||||
name: linux_conda_py39_cu115_pyt1110
|
||||
python_version: '3.9'
|
||||
pytorch_version: 1.11.0
|
||||
cu_version: cu121
|
||||
name: linux_conda_py38_cu121_pyt210
|
||||
python_version: '3.8'
|
||||
pytorch_version: 2.1.0
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
@ -539,31 +369,19 @@ workflows:
|
||||
python_version: '3.9'
|
||||
pytorch_version: 2.0.1
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda118
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
name: linux_conda_py310_cu102_pyt1110
|
||||
python_version: '3.10'
|
||||
pytorch_version: 1.11.0
|
||||
cu_version: cu118
|
||||
name: linux_conda_py39_cu118_pyt210
|
||||
python_version: '3.9'
|
||||
pytorch_version: 2.1.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda121
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu111
|
||||
name: linux_conda_py310_cu111_pyt1110
|
||||
python_version: '3.10'
|
||||
pytorch_version: 1.11.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda113
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu113
|
||||
name: linux_conda_py310_cu113_pyt1110
|
||||
python_version: '3.10'
|
||||
pytorch_version: 1.11.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda115
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu115
|
||||
name: linux_conda_py310_cu115_pyt1110
|
||||
python_version: '3.10'
|
||||
pytorch_version: 1.11.0
|
||||
cu_version: cu121
|
||||
name: linux_conda_py39_cu121_pyt210
|
||||
python_version: '3.9'
|
||||
pytorch_version: 2.1.0
|
||||
- binary_linux_conda:
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu102
|
||||
@ -660,24 +478,37 @@ workflows:
|
||||
name: linux_conda_py310_cu118_pyt201
|
||||
python_version: '3.10'
|
||||
pytorch_version: 2.0.1
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda118
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu118
|
||||
name: linux_conda_py310_cu118_pyt210
|
||||
python_version: '3.10'
|
||||
pytorch_version: 2.1.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda121
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu121
|
||||
name: linux_conda_py310_cu121_pyt210
|
||||
python_version: '3.10'
|
||||
pytorch_version: 2.1.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda118
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu118
|
||||
name: linux_conda_py311_cu118_pyt210
|
||||
python_version: '3.11'
|
||||
pytorch_version: 2.1.0
|
||||
- binary_linux_conda:
|
||||
conda_docker_image: pytorch/conda-builder:cuda121
|
||||
context: DOCKERHUB_TOKEN
|
||||
cu_version: cu121
|
||||
name: linux_conda_py311_cu121_pyt210
|
||||
python_version: '3.11'
|
||||
pytorch_version: 2.1.0
|
||||
- binary_linux_conda_cuda:
|
||||
name: testrun_conda_cuda_py38_cu102_pyt190
|
||||
context: DOCKERHUB_TOKEN
|
||||
python_version: "3.8"
|
||||
pytorch_version: '1.9.0'
|
||||
cu_version: "cu102"
|
||||
- binary_macos_wheel:
|
||||
cu_version: cpu
|
||||
name: macos_wheel_py3.8_cpu
|
||||
python_version: '3.8'
|
||||
pytorch_version: '1.13.0'
|
||||
- binary_macos_wheel:
|
||||
cu_version: cpu
|
||||
name: macos_wheel_py3.9_cpu
|
||||
python_version: '3.9'
|
||||
pytorch_version: '1.13.0'
|
||||
- binary_macos_wheel:
|
||||
cu_version: cpu
|
||||
name: macos_wheel_py3.10_cpu
|
||||
python_version: '3.10'
|
||||
pytorch_version: '1.13.0'
|
||||
|
@ -20,16 +20,13 @@ from packaging import version
|
||||
# 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.10.0": ["cu102", "cu111", "cu113"],
|
||||
"1.10.1": ["cu102", "cu111", "cu113"],
|
||||
"1.10.2": ["cu102", "cu111", "cu113"],
|
||||
"1.11.0": ["cu102", "cu111", "cu113", "cu115"],
|
||||
"1.12.0": ["cu102", "cu113", "cu116"],
|
||||
"1.12.1": ["cu102", "cu113", "cu116"],
|
||||
"1.13.0": ["cu116", "cu117"],
|
||||
"1.13.1": ["cu116", "cu117"],
|
||||
"2.0.0": ["cu117", "cu118"],
|
||||
"2.0.1": ["cu117", "cu118"],
|
||||
"2.1.0": ["cu118", "cu121"],
|
||||
}
|
||||
|
||||
|
||||
@ -50,12 +47,18 @@ def pytorch_versions_for_python(python_version):
|
||||
for i in CONDA_CUDA_VERSIONS
|
||||
if version.Version(i) >= version.Version("1.11.0")
|
||||
]
|
||||
if python_version == "3.11":
|
||||
return [
|
||||
i
|
||||
for i in CONDA_CUDA_VERSIONS
|
||||
if version.Version(i) >= version.Version("2.1.0")
|
||||
]
|
||||
|
||||
|
||||
def workflows(prefix="", filter_branch=None, upload=False, indentation=6):
|
||||
w = []
|
||||
for btype in ["conda"]:
|
||||
for python_version in ["3.8", "3.9", "3.10"]:
|
||||
for python_version in ["3.8", "3.9", "3.10", "3.11"]:
|
||||
for pytorch_version in pytorch_versions_for_python(python_version):
|
||||
for cu_version in CONDA_CUDA_VERSIONS[pytorch_version]:
|
||||
w += workflow_pair(
|
||||
|
@ -9,7 +9,7 @@ The core library is written in PyTorch. Several components have underlying imple
|
||||
|
||||
- Linux or macOS or Windows
|
||||
- Python 3.8, 3.9 or 3.10
|
||||
- PyTorch 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.12.0, 1.12.1, 1.13.0, 2.0.0 or 2.0.1.
|
||||
- PyTorch 1.12.0, 1.12.1, 1.13.0, 2.0.0, 2.0.1 or 2.1.0.
|
||||
- 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)
|
||||
@ -77,13 +77,8 @@ Or, to install a nightly (non-official, alpha) build:
|
||||
# Anaconda Cloud
|
||||
conda install pytorch3d -c pytorch3d-nightly
|
||||
```
|
||||
### 2. Install from PyPI, on Mac only.
|
||||
This works with pytorch 1.13.0 only. The build is CPU only.
|
||||
```
|
||||
pip install pytorch3d
|
||||
```
|
||||
|
||||
### 3. Install wheels for Linux
|
||||
### 2. Install wheels for Linux
|
||||
We have prebuilt wheels with CUDA for Linux for PyTorch 1.11.0, for each of the supported CUDA versions,
|
||||
for Python 3.8 and 3.9. This is for ease of use on Google Colab.
|
||||
These are installed in a special way.
|
||||
|
@ -59,12 +59,17 @@ def setup_cuda():
|
||||
)
|
||||
if CU_VERSION == "cu102":
|
||||
nvcc_flags = basic_nvcc_flags
|
||||
elif CU_VERSION == "cu110":
|
||||
nvcc_flags = "-gencode=arch=compute_80,code=sm_80 " + basic_nvcc_flags
|
||||
elif CU_VERSION < ("cu118"):
|
||||
nvcc_flags = (
|
||||
"-gencode=arch=compute_80,code=sm_80 "
|
||||
+ "-gencode=arch=compute_86,code=sm_86 "
|
||||
+ basic_nvcc_flags
|
||||
)
|
||||
else:
|
||||
nvcc_flags = (
|
||||
"-gencode=arch=compute_80,code=sm_80 "
|
||||
+ "-gencode=arch=compute_86,code=sm_86 "
|
||||
+ "-gencode=arch=compute_90,code=sm_90 "
|
||||
+ basic_nvcc_flags
|
||||
)
|
||||
|
||||
|
4
setup.py
4
setup.py
@ -49,7 +49,7 @@ def get_extensions():
|
||||
source_cuda = glob.glob(os.path.join(extensions_dir, "**", "*.cu"), recursive=True)
|
||||
extension = CppExtension
|
||||
|
||||
extra_compile_args = {"cxx": ["-std=c++14"]}
|
||||
extra_compile_args = {"cxx": ["-std=c++17"]}
|
||||
define_macros = []
|
||||
include_dirs = [extensions_dir]
|
||||
|
||||
@ -74,7 +74,7 @@ def get_extensions():
|
||||
"-D__CUDA_NO_HALF2_OPERATORS__",
|
||||
]
|
||||
if os.name != "nt":
|
||||
nvcc_args.append("-std=c++14")
|
||||
nvcc_args.append("-std=c++17")
|
||||
if cub_home is None:
|
||||
prefix = os.environ.get("CONDA_PREFIX", None)
|
||||
if prefix is not None and os.path.isdir(prefix + "/include/cub"):
|
||||
|
Loading…
x
Reference in New Issue
Block a user