add cuda compute 8.7 to Cmakelists.txt to support Nvidia Orin devices (#12377)

* add cuda arch 8.7 to cmakelists.txt to support Nvidia Orin devices

* add cuda version >= 11 check for orin support
This commit is contained in:
George Wu 2022-08-01 09:45:58 -07:00 committed by GitHub
parent 3f66297499
commit 6bb807ef74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1801,6 +1801,9 @@ if (onnxruntime_USE_CUDA)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode=arch=compute_53,code=sm_53") # TX1, Nano
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode=arch=compute_62,code=sm_62") # TX2
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode=arch=compute_72,code=sm_72") # AGX Xavier, NX Xavier
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode=arch=compute_87,code=sm_87") # AGX Orin, NX Orin
endif()
else()
# the following compute capabilities are removed in CUDA 11 Toolkit
if (CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11)