From c5342b5417ea5a4baeb3f5b1e7ef0b7f68e9b9d0 Mon Sep 17 00:00:00 2001 From: paradigm Date: Fri, 21 Aug 2020 00:27:38 +0200 Subject: [PATCH] fixed compilation issue for Jetson Xavier (#4873) The string concatenation of the cuda flags makes compiling impossible due to the missing space (Error: " nvcc fatal: redefinition of keyword 'code' ") . --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index dfc37948ef..c091064b8c 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -907,7 +907,7 @@ if (onnxruntime_USE_CUDA) list(APPEND onnxruntime_EXTERNAL_LIBRARIES ${ONNXRUNTIME_CUDA_LIBRARIES}) if(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64-linux-gnu") - string (APPEND CMAKE_CUDA_FLAGS "-gencode=arch=compute_53,code=sm_53 -gencode=arch=compute_62,code=sm_62") #nano, TX1, TX2 + string (APPEND CMAKE_CUDA_FLAGS "-gencode=arch=compute_53,code=sm_53 -gencode=arch=compute_62,code=sm_62 ") #nano, TX1, TX2 string (APPEND CMAKE_CUDA_FLAGS "-gencode=arch=compute_72,code=sm_72") # Jetson N else() # the following compute capabilities are deprecated in CUDA 11 Toolkit