Skip to content

Commit e1ed6c6

Browse files
authored
Merge pull request #279 from FloopCZ/more-capabilities
Extend the list of CUDA_COMPUTE_CAPABILITIES
2 parents 13f5908 + bcf01eb commit e1ed6c6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tensorflow_cc/cmake/build_tensorflow.sh.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ if [ "$cuda_allowed" == true ] && [ "$cuda_available" == true ]; then
5353
echo "CUDA support enabled"
5454
cuda_config_opts="--config=cuda"
5555
export TF_NEED_CUDA=1
56-
export TF_CUDA_COMPUTE_CAPABILITIES=${TF_CUDA_COMPUTE_CAPABILITIES:-"3.5,7.0"} # default from configure.py
56+
# Capabilities are taken from Archlinux tensorflow build.
57+
# https://github.com/tensorflow/tensorflow/blob/1ba2eb7b313c0c5001ee1683a3ec4fbae01105fd/third_party/gpus/cuda_configure.bzl#L411-L446
58+
# according to the above, we should be specifying CUDA compute capabilities as 'sm_XX' or 'compute_XX' from now on
59+
# add latest PTX for future compatibility
60+
export TF_CUDA_COMPUTE_CAPABILITIES=${TF_CUDA_COMPUTE_CAPABILITIES:-"sm_52,sm_53,sm_60,sm_61,sm_62,sm_70,sm_72,sm_75,sm_80,sm_86,compute_86"}
5761
export TF_CUDA_PATHS=${TF_CUDA_PATHS:-"/opt/cuda,/usr/local/cuda,/usr/local,/usr/cuda,/usr"}
5862
export TF_CUDA_VERSION="$(nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p')"
5963
export TF_NCCL_VERSION="$(find /opt /usr -name 'libnccl.so.*' -path '*/cuda*' | tail -n1 | sed -r 's/^.*\.so\.//')"

0 commit comments

Comments
 (0)