Skip to content

Commit 0fecb2d

Browse files
bottlerfacebook-github-bot
authored andcommitted
pytorch version in package name
Summary: Pytorch 1.5 is coming soon. I imagine we will want the ability to upload conda packages for pytorch3d to anaconda cloud for each of pytorch 1.4 and pytorch 1.5. This change adds the dependent pytorch version to the name of the conda package to make that feasible. As an example, a built package after this change will have a name like `linux-64/pytorch3d-0.1.1-py38_cu100_pyt14.tar.bz2`, instead of simply `linux-64/pytorch3d-0.1.1-py38_cu100.tar.bz2`. Also some tiny cleanup of circleci config. Other alternatives: (1) forcing users to update pytorch and pytorch3d together, (2) trying to get away with one build for multiple pytorch versions. Reviewed By: nikhilaravi Differential Revision: D20599039 fbshipit-source-id: 20164eda4a5141afed47b3596e559950d796ffc9
1 parent 01b5f7b commit 0fecb2d

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

.circleci/config.in.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -213,16 +213,16 @@ workflows:
213213
cu_version: "cu100"
214214
- binary_macos_wheel:
215215
cu_version: cpu
216-
name: binary_linux_wheel_py3.6_cpu
216+
name: macos_wheel_py3.6_cpu
217217
python_version: '3.6'
218218
pytorch_version: '1.4'
219219
- binary_macos_wheel:
220220
cu_version: cpu
221-
name: binary_linux_wheel_py3.7_cpu
221+
name: macos_wheel_py3.7_cpu
222222
python_version: '3.7'
223223
pytorch_version: '1.4'
224224
- binary_macos_wheel:
225225
cu_version: cpu
226-
name: binary_linux_wheel_py3.8_cpu
226+
name: macos_wheel_py3.8_cpu
227227
python_version: '3.8'
228228
pytorch_version: '1.4'

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,16 @@ workflows:
278278
cu_version: "cu100"
279279
- binary_macos_wheel:
280280
cu_version: cpu
281-
name: binary_linux_wheel_py3.6_cpu
281+
name: macos_wheel_py3.6_cpu
282282
python_version: '3.6'
283283
pytorch_version: '1.4'
284284
- binary_macos_wheel:
285285
cu_version: cpu
286-
name: binary_linux_wheel_py3.7_cpu
286+
name: macos_wheel_py3.7_cpu
287287
python_version: '3.7'
288288
pytorch_version: '1.4'
289289
- binary_macos_wheel:
290290
cu_version: cpu
291-
name: binary_linux_wheel_py3.8_cpu
291+
name: macos_wheel_py3.8_cpu
292292
python_version: '3.8'
293293
pytorch_version: '1.4'

.circleci/regenerate.py

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
"""
55
This script is adapted from the torchvision one.
6-
There is no python2.7 nor macos.
7-
TODO: python 3.8 when pytorch 1.4.
86
"""
97

108
import os.path

packaging/conda/build_pytorch3d.sh

+2
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ else
139139
export CONDA_PYTORCH_CONSTRAINT="- pytorch==${PYTORCH_VERSION}"
140140
fi
141141

142+
export PYTORCH_VERSION_NODOT=${PYTORCH_VERSION//./}
143+
142144
# Loop through all Python versions to build a package for each
143145
for py_ver in "${DESIRED_PYTHON[@]}"; do
144146
build_string="py${py_ver}_${build_string_suffix}"

packaging/pkg_helpers.bash

+1
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ setup_conda_pytorch_constraint() {
223223
export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==${PYTORCH_VERSION}${PYTORCH_VERSION_SUFFIX}"
224224
export CONDA_PYTORCH_CONSTRAINT="- pytorch==${PYTORCH_VERSION}${PYTORCH_VERSION_SUFFIX}"
225225
fi
226+
export PYTORCH_VERSION_NODOT=${PYTORCH_VERSION//./}
226227
}
227228

228229
# Translate CUDA_VERSION into CUDA_CUDATOOLKIT_CONSTRAINT

packaging/pytorch3d/meta.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ requirements:
2626
{{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }}
2727

2828
build:
29-
string: py{{py}}_{{ environ['CU_VERSION'] }}
29+
string: py{{py}}_{{ environ['CU_VERSION'] }}_pyt{{ environ['PYTORCH_VERSION_NODOT']}}
3030
script: python setup.py install --single-version-externally-managed --record=record.txt # [not win]
3131
script_env:
3232
- CUDA_HOME

0 commit comments

Comments
 (0)