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' ") .
This commit is contained in:
paradigm 2020-08-21 00:27:38 +02:00 committed by GitHub
parent c6119a548c
commit c5342b5417
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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