diff options
author | Paul Jesse Hellemn <jesse.hellemn@gmail.com> | 2018-04-26 15:43:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-26 15:43:24 -0700 |
commit | 902579602bc8ec8e884fe6501205008d3da629a4 (patch) | |
tree | fae5b351dc27ebc1a64351593c4ab76c99c994d9 /conda | |
parent | 19cb5a0436736d36cd39f206e1fe4a904c8ab735 (diff) | |
download | pytorch-902579602bc8ec8e884fe6501205008d3da629a4.tar.gz pytorch-902579602bc8ec8e884fe6501205008d3da629a4.tar.bz2 pytorch-902579602bc8ec8e884fe6501205008d3da629a4.zip |
[wip] [Caffe2] Changes to integrated binaries (#6997)
* Changes to integrated binaries
* Changes for cpu version of integrated binary
* Disabling static linking of CUDA for pytorch for integrated builds
Diffstat (limited to 'conda')
-rw-r--r-- | conda/caffe2/meta.yaml (renamed from conda/caffe2/normal/meta.yaml) | 1 | ||||
-rwxr-xr-x | conda/integrated/build.sh | 22 |
2 files changed, 15 insertions, 8 deletions
diff --git a/conda/caffe2/normal/meta.yaml b/conda/caffe2/meta.yaml index cb857b5940..8fac4204c7 100644 --- a/conda/caffe2/normal/meta.yaml +++ b/conda/caffe2/meta.yaml @@ -13,6 +13,7 @@ build: script_env: - CONDA_CAFFE2_CMAKE_ARGS - PACKAGE_CUDA_LIBS + - BUILD_WITH_CUDA # features section here requirements: diff --git a/conda/integrated/build.sh b/conda/integrated/build.sh index b7432428cb..a2e3aba183 100755 --- a/conda/integrated/build.sh +++ b/conda/integrated/build.sh @@ -24,17 +24,23 @@ set -ex # Pytorch environment variables needed during the build export CMAKE_LIBRARY_PATH=$PREFIX/lib:$PREFIX/include:$CMAKE_LIBRARY_PATH export CMAKE_PREFIX_PATH=$PREFIX -# compile for Kepler, Kepler+Tesla, Maxwell, Pascal, Volta -export TORCH_CUDA_ARCH_LIST="3.5;5.2+PTX;6.0;6.1;7.0" -export TORCH_NVCC_FLAGS="-Xfatbin -compress-all" export PYTORCH_BINARY_BUILD=1 export TH_BINARY_BUILD=1 export PYTORCH_BUILD_VERSION=$PKG_VERSION export PYTORCH_BUILD_NUMBER=$PKG_BUILDNUM -export NCCL_ROOT_DIR=/usr/local/cuda -export USE_STATIC_CUDNN=1 -export USE_STATIC_NCCL=1 -export ATEN_STATIC_CUDA=1 + +# Pytorch CUDA flags +if [[ -n $BUILD_WITH_CUDA ]]; then #TODO + # compile for Kepler, Kepler+Tesla, Maxwell, Pascal, Volta + export TORCH_CUDA_ARCH_LIST="3.5;5.2+PTX;6.0;6.1;7.0" + export TORCH_NVCC_FLAGS="-Xfatbin -compress-all" + export NCCL_ROOT_DIR=/usr/local/cuda + #export USE_STATIC_CUDNN=1 + #export USE_STATIC_NCCL=1 + #export ATEN_STATIC_CUDA=1 +else + export NO_CUDA=1 +fi ########################################################### @@ -74,7 +80,7 @@ python setup.py install ######################################################################### # Copies libnvrtc and libnvToolsExt to the site-packages/torch/lib/ directory # All other CUDA libraries should be statically linked -if [[ -z $PACKAGE_CUDA_LIBS ]]; then +if [[ -z $BUILD_WITH_CUDA || -z $PACKAGE_CUDA_LIBS ]]; then exit 0 fi |