Skip to content

Commit

Permalink
add PTX to highest supported arch per conda-forge/pytorch-cpu-feedsto…
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemhenry committed Jun 8, 2022
1 parent 38cf28c commit 4cf205e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
set -euxo pipefail

if [[ ${cuda_compiler_version} != "None" && "$target_platform" == linux-64 ]]; then
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX"
export TORCH_CUDA_ARCH_LIST="3.5;5.0"
export FORCE_CUDA="1"
export CC="$GCC"
if [[ ${cuda_compiler_version} == 9.0* ]]; then
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;7.0"
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;7.0+PTX"
elif [[ ${cuda_compiler_version} == 9.2* ]]; then
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0"
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0+PTX"
elif [[ ${cuda_compiler_version} == 10.* ]]; then
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5"
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5+PTX"
elif [[ ${cuda_compiler_version} == 11.0* ]]; then
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0"
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0+PTX"
elif [[ ${cuda_compiler_version} == 11.1 ]]; then
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0;8.6"
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0;8.6+PTX"
elif [[ ${cuda_compiler_version} == 11.2 ]]; then
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0;8.6"
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0;8.6+PTX"
else
echo "unsupported cuda version. edit build_pytorch.sh"
exit 1
Expand Down

0 comments on commit 4cf205e

Please sign in to comment.