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
This commit is contained in:
Jeremy Reizenstein 2020-04-22 09:07:27 -07:00 committed by Facebook GitHub Bot
parent 4bf30593ff
commit faf0885811
2 changed files with 16 additions and 7 deletions

View File

@ -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]"
;;

View File

@ -41,12 +41,7 @@ test:
- tests
- docs
requires:
- pytest
- scipy
- mock
- av
- ca-certificates
- typing
commands:
#pytest .
python -m unittest discover -v -s tests