Unverified Commit d45a77d4 authored by Eli Uriegas's avatar Eli Uriegas Committed by GitHub
Browse files

ci: Add cu102 to CI and packaging, remove cu100 (#1980)



* ci: Add cu102 to CI and packaging

Adds cu102 to our testing matrix as well as change the default manywheel
version to be cu102.

Also adds a function to get manylinux images instead of it being a
conditional block.
Signed-off-by: default avatarEli Uriegas <eliuriegas@fb.com>

* .circleci: Remove cu100, no longer built

We removed the build for cu100 in upstream pytorch as well since we have
begun to support cu102
Signed-off-by: default avatarEli Uriegas <eliuriegas@fb.com>

* Fix lint

* More lint fixes
Co-authored-by: default avatarFrancisco Massa <fvsmassa@gmail.com>
parent cc43e0a9
This diff is collapsed.
......@@ -299,10 +299,6 @@ workflows:
jobs:
- circleci_consistency
{{ workflows() }}
- binary_linux_conda_cuda:
name: torchvision_linux_py3.7_cu100
python_version: "3.7"
cu_version: "cu100"
- binary_win_conda:
name: torchvision_win_py3.6_cpu
python_version: "3.6"
......
......@@ -24,7 +24,7 @@ def workflows(prefix='', filter_branch=None, upload=False, indentation=6):
for btype in ["wheel", "conda"]:
for os_type in ["linux", "macos"]:
for python_version in ["3.5", "3.6", "3.7", "3.8"]:
for cu_version in (["cpu", "cu92", "cu100", "cu101"] if os_type == "linux" else ["cpu"]):
for cu_version in (["cpu", "cu92", "cu101", "cu102"] if os_type == "linux" else ["cpu"]):
for unicode in ([False, True] if btype == "wheel" and python_version == "2.7" else [False]):
w += workflow_pair(
btype, os_type, python_version, cu_version,
......@@ -49,6 +49,20 @@ def workflow_pair(btype, os_type, python_version, cu_version, unicode, prefix=''
return w
manylinux_images = {
"cu92": "pytorch/manylinux-cuda92",
"cu101": "pytorch/manylinux-cuda101",
"cu102": "pytorch/manylinux-cuda102",
}
def get_manylinux_image(cu_version):
cu_suffix = "102"
if cu_version.startswith('cu'):
cu_suffix = cu_version[len('cu'):]
return f"pytorch/manylinux-cuda{cu_suffix}"
def generate_base_workflow(base_workflow_name, python_version, cu_version,
unicode, os_type, btype, *, filter_branch=None):
......@@ -61,10 +75,7 @@ def generate_base_workflow(base_workflow_name, python_version, cu_version,
if unicode:
d["unicode_abi"] = '1'
if cu_version == "cu92":
d["wheel_docker_image"] = "pytorch/manylinux-cuda92"
elif cu_version == "cu100":
d["wheel_docker_image"] = "pytorch/manylinux-cuda100"
d["wheel_docker_image"] = get_manylinux_image(cu_version)
if filter_branch is not None:
d["filters"] = {"branches": {"only": filter_branch}}
......
......@@ -36,7 +36,7 @@ setup_cuda() {
# Wheel builds need suffixes (but not if they're on OS X, which never has suffix)
if [[ "$BUILD_TYPE" == "wheel" ]] && [[ "$(uname)" != Darwin ]]; then
# The default CUDA has no suffix
if [[ "$CU_VERSION" != "cu101" ]]; then
if [[ "$CU_VERSION" != "cu102" ]]; then
export PYTORCH_VERSION_SUFFIX="+$CU_VERSION"
fi
# Match the suffix scheme of pytorch, unless this package does not have
......@@ -49,6 +49,17 @@ setup_cuda() {
# Now work out the CUDA settings
case "$CU_VERSION" in
cu102)
if [[ "$OSTYPE" == "msys" ]]; then
export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2"
else
export CUDA_HOME=/usr/local/cuda-10.2/
fi
export FORCE_CUDA=1
# Hard-coding gencode flags is temporary situation until
# https://github.com/pytorch/pytorch/pull/23408 lands
export NVCC_FLAGS="-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_50,code=compute_50"
;;
cu101)
if [[ "$OSTYPE" == "msys" ]]; then
export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1"
......@@ -240,6 +251,9 @@ setup_conda_cudatoolkit_constraint() {
export CONDA_CUDATOOLKIT_CONSTRAINT=""
else
case "$CU_VERSION" in
cu102)
export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=10.2,<10.3 # [not osx]"
;;
cu101)
export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=10.1,<10.2 # [not osx]"
;;
......
......@@ -6,9 +6,9 @@ if [ "$#" -ne 1 ]; then
echo "CUDA version should be cu92, cu100 or cpu"
exit 1
fi
export CUVER="$1" # cu92 cu100 cpu
export CUVER="$1" # cu[0-9]* cpu
if [[ "$CUVER" == "cu101" ]]; then
if [[ "$CUVER" == "cu102" ]]; then
cu_suffix=""
else
cu_suffix="+$CUVER"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment