From 267df1aa47984a489576754f6dc015a213530a98 Mon Sep 17 00:00:00 2001 From: Benjamin Ummenhofer Date: Tue, 17 Sep 2024 01:41:59 -0700 Subject: [PATCH] set TORCH_CUDA_ARCH_LIST as workaround for CUDA 12 and Pytorch <2.4 --- docker/Dockerfile.ci | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/Dockerfile.ci b/docker/Dockerfile.ci index d910927c2cb..edca2aedc54 100644 --- a/docker/Dockerfile.ci +++ b/docker/Dockerfile.ci @@ -183,7 +183,10 @@ RUN \ export CMAKE_CXX_COMPILER=g++; \ export CMAKE_C_COMPILER=gcc; \ # TODO: PyTorch still use old CXX ABI, remove this line when PyTorch is updated + # TODO: Using CUDA 12.x and Pytorch <2.4 gives the error "Unknown CUDA Architecture Name 9.0a in CUDA_SELECT_NVCC_ARCH_FLAGS". + # As a workaround we explicitly set TORCH_CUDA_ARCH_LIST if [ "$BUILD_PYTORCH_OPS" = "ON" ]; then \ + export TORCH_CUDA_ARCH_LIST="8.0 8.6 8.9 9.0" \ export GLIBCXX_USE_CXX11_ABI=OFF; \ else \ export GLIBCXX_USE_CXX11_ABI=ON; \