From faf0885811c71812a21be042fd398832bff7ef92 Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein Date: Wed, 22 Apr 2020 09:07:27 -0700 Subject: [PATCH] Cuda 10.2 for builds Summary: cuda 10.2 location on linux. Also remove unused conda test dependencies. Reviewed By: nikhilaravi Differential Revision: D21176409 fbshipit-source-id: dd3f339a92233ff16877ba76506ddf8f4418715d --- packaging/pkg_helpers.bash | 18 ++++++++++++++++-- packaging/pytorch3d/meta.yaml | 5 ----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index cd4fd6f0..b67bf407 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -7,7 +7,7 @@ # Setup CUDA environment variables, based on CU_VERSION # # Inputs: -# CU_VERSION (cu92, cu100, cu101) +# CU_VERSION (cu92, cu100, cu101, cu102) # NO_CUDA_PACKAGE (bool) # BUILD_TYPE (conda, wheel) # @@ -38,7 +38,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 @@ -51,6 +51,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" @@ -233,6 +244,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]" ;; diff --git a/packaging/pytorch3d/meta.yaml b/packaging/pytorch3d/meta.yaml index 2856815f..0c818c45 100644 --- a/packaging/pytorch3d/meta.yaml +++ b/packaging/pytorch3d/meta.yaml @@ -41,12 +41,7 @@ test: - tests - docs requires: - - pytest - - scipy - - mock - - av - ca-certificates - - typing commands: #pytest . python -m unittest discover -v -s tests