mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 22:30:35 +08:00
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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f2b229c1d1
commit
a53a2d3731
@@ -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}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user