Changes for building for aarch64, specifically jetson orin nano

This commit is contained in:
Jonathan Bentz 2025-01-08 17:05:45 -06:00
parent 1e0c660f22
commit a1cf9e4183
15 changed files with 189 additions and 120 deletions

View File

@ -20,6 +20,9 @@ find_package(GLUT)
# Source file # Source file
if(${OpenGL_FOUND}) if(${OpenGL_FOUND})
if (${GLUT_FOUND}) if (${GLUT_FOUND})
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
message(STATUS "Will not build sample simpleCUDA2GL - not supported on aarch64")
else()
# Add target for simpleCUDA2GL # Add target for simpleCUDA2GL
add_executable(simpleCUDA2GL simpleCUDA2GL.cu main.cpp) add_executable(simpleCUDA2GL simpleCUDA2GL.cu main.cpp)
@ -39,6 +42,7 @@ target_compile_features(simpleCUDA2GL PRIVATE cxx_std_17 cuda_std_17)
${OPENGL_LIBRARIES} ${OPENGL_LIBRARIES}
${GLUT_LIBRARIES} ${GLUT_LIBRARIES}
) )
endif()
else() else()
message(STATUS "GLUT not found - will not build sample 'simpleCUDA2GL'") message(STATUS "GLUT not found - will not build sample 'simpleCUDA2GL'")
endif() endif()

View File

@ -14,6 +14,9 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) include_directories(../../../Common)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
message(STATUS "Will not build sample simpleIPC - not supported on aarch64")
else()
# Source file # Source file
# Add target for simpleIPC # Add target for simpleIPC
add_executable(simpleIPC simpleIPC.cu ../../../Common/helper_multiprocess.cpp) add_executable(simpleIPC simpleIPC.cu ../../../Common/helper_multiprocess.cpp)
@ -23,3 +26,4 @@ target_compile_options(simpleIPC PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-l
target_compile_features(simpleIPC PRIVATE cxx_std_17 cuda_std_17) target_compile_features(simpleIPC PRIVATE cxx_std_17 cuda_std_17)
set_target_properties(simpleIPC PROPERTIES CUDA_SEPARABLE_COMPILATION ON) set_target_properties(simpleIPC PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
endif()

View File

@ -16,6 +16,9 @@ include_directories(../../../Common)
# Source file # Source file
# Add target for simpleP2P # Add target for simpleP2P
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
message(STATUS "Will not build sample simpleP2P - not supported on aarch64")
else()
add_executable(simpleP2P simpleP2P.cu) add_executable(simpleP2P simpleP2P.cu)
target_compile_options(simpleP2P PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>) target_compile_options(simpleP2P PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
@ -23,3 +26,4 @@ target_compile_options(simpleP2P PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-l
target_compile_features(simpleP2P PRIVATE cxx_std_17 cuda_std_17) target_compile_features(simpleP2P PRIVATE cxx_std_17 cuda_std_17)
set_target_properties(simpleP2P PROPERTIES CUDA_SEPARABLE_COMPILATION ON) set_target_properties(simpleP2P PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
endif()

View File

@ -14,6 +14,9 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) include_directories(../../../Common)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
message(STATUS "Will not build sample systemWideAtomics - not supported on aarch64")
else()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Source file # Source file
# Add target for systemWideAtomics # Add target for systemWideAtomics
@ -28,3 +31,4 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
else() else()
message(STATUS "Will not build sample systemWideAtomics - requires Linux OS") message(STATUS "Will not build sample systemWideAtomics - requires Linux OS")
endif() endif()
endif()

View File

@ -16,6 +16,9 @@ include_directories(../../../Common)
# Source file # Source file
# Add target for vectorAddMMAP # Add target for vectorAddMMAP
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
message(STATUS "Will not build sample vectorAddMMAP - not supported on aarch64")
else()
add_executable(vectorAddMMAP vectorAddMMAP.cpp multidevicealloc_memmap.cpp) add_executable(vectorAddMMAP vectorAddMMAP.cpp multidevicealloc_memmap.cpp)
target_compile_options(vectorAddMMAP PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>) target_compile_options(vectorAddMMAP PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
@ -46,3 +49,4 @@ add_custom_target(generate_fatbin_vectorAddMMAP ALL DEPENDS ${CUDA_FATBIN_FILE})
# Ensure matrixMulDrv depends on the fatbin # Ensure matrixMulDrv depends on the fatbin
add_dependencies(vectorAddMMAP generate_fatbin_vectorAddMMAP) add_dependencies(vectorAddMMAP generate_fatbin_vectorAddMMAP)
endif()

View File

@ -14,6 +14,9 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) include_directories(../../../Common)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
message(STATUS "Will not build sample topologyQuery - not supported on aarch64")
else()
# Source file # Source file
# Add target for topologyQuery # Add target for topologyQuery
add_executable(topologyQuery topologyQuery.cu) add_executable(topologyQuery topologyQuery.cu)
@ -23,3 +26,4 @@ target_compile_options(topologyQuery PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extend
target_compile_features(topologyQuery PRIVATE cxx_std_17 cuda_std_17) target_compile_features(topologyQuery PRIVATE cxx_std_17 cuda_std_17)
set_target_properties(topologyQuery PROPERTIES CUDA_SEPARABLE_COMPILATION ON) set_target_properties(topologyQuery PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
endif()

View File

@ -17,6 +17,9 @@ include_directories(../../../Common)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Source file # Source file
# Add target for streamOrderedAllocationIPC # Add target for streamOrderedAllocationIPC
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
message(STATUS "Will not build sample streamOrderedAllocationIPC - not supported on aarch64")
else()
add_executable(streamOrderedAllocationIPC streamOrderedAllocationIPC.cu ../../../Common/helper_multiprocess.cpp) add_executable(streamOrderedAllocationIPC streamOrderedAllocationIPC.cu ../../../Common/helper_multiprocess.cpp)
target_compile_options(streamOrderedAllocationIPC PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>) target_compile_options(streamOrderedAllocationIPC PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
@ -28,6 +31,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(streamOrderedAllocationIPC PUBLIC target_link_libraries(streamOrderedAllocationIPC PUBLIC
CUDA::cuda_driver CUDA::cuda_driver
) )
endif()
else() else()
message(STATUS "Will not build sample streamOrderedAllocationIPC - requires Linux OS") message(STATUS "Will not build sample streamOrderedAllocationIPC - requires Linux OS")
endif() endif()

View File

@ -17,6 +17,9 @@ include_directories(../../../Common)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Source file # Source file
# Add target for StreamPriorities # Add target for StreamPriorities
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
message(STATUS "Will not build sample streamPriorities - not supported on aarch64")
else()
add_executable(StreamPriorities StreamPriorities.cu) add_executable(StreamPriorities StreamPriorities.cu)
target_compile_options(StreamPriorities PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>) target_compile_options(StreamPriorities PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
@ -24,6 +27,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_compile_features(StreamPriorities PRIVATE cxx_std_17 cuda_std_17) target_compile_features(StreamPriorities PRIVATE cxx_std_17 cuda_std_17)
set_target_properties(StreamPriorities PROPERTIES CUDA_SEPARABLE_COMPILATION ON) set_target_properties(StreamPriorities PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
endif()
else() else()
message(STATUS "Will not build sample StreamPriorities - requires Linux OS") message(STATUS "Will not build sample StreamPriorities - requires Linux OS")
endif() endif()

View File

@ -6,7 +6,12 @@ project(cdpAdvancedQuicksort LANGUAGES C CXX CUDA)
find_package(CUDAToolkit REQUIRED) find_package(CUDAToolkit REQUIRED)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(CMAKE_CUDA_ARCHITECTURES 61 70 75 80 86 87 90)
else()
set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90) set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive) # set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive)
endif() endif()

View File

@ -6,7 +6,12 @@ project(cdpBezierTessellation LANGUAGES C CXX CUDA)
find_package(CUDAToolkit REQUIRED) find_package(CUDAToolkit REQUIRED)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(CMAKE_CUDA_ARCHITECTURES 61 70 75 80 86 87 90)
else()
set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90) set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive) # set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive)
endif() endif()

View File

@ -6,7 +6,12 @@ project(cdpQuadtree LANGUAGES C CXX CUDA)
find_package(CUDAToolkit REQUIRED) find_package(CUDAToolkit REQUIRED)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(CMAKE_CUDA_ARCHITECTURES 61 70 75 80 86 87 90)
else()
set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90) set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive) # set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive)
endif() endif()

View File

@ -6,7 +6,12 @@ project(cdpSimplePrint LANGUAGES C CXX CUDA)
find_package(CUDAToolkit REQUIRED) find_package(CUDAToolkit REQUIRED)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(CMAKE_CUDA_ARCHITECTURES 61 70 75 80 86 87 90)
else()
set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90) set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive) # set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive)
endif() endif()

View File

@ -6,7 +6,12 @@ project(cdpSimpleQuicksort LANGUAGES C CXX CUDA)
find_package(CUDAToolkit REQUIRED) find_package(CUDAToolkit REQUIRED)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(CMAKE_CUDA_ARCHITECTURES 61 70 75 80 86 87 90)
else()
set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90) set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive) # set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive)
endif() endif()

View File

@ -14,6 +14,10 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) include_directories(../../../Common)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
message(STATUS "Will not build sample nvJPEG - not supported on aarch64")
else()
# Source file # Source file
# Add target for nvJPEG # Add target for nvJPEG
add_executable(nvJPEG nvJPEG.cpp) add_executable(nvJPEG nvJPEG.cpp)
@ -39,3 +43,5 @@ add_custom_command(TARGET nvJPEG POST_BUILD
${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_CURRENT_SOURCE_DIR}/images
${CMAKE_CURRENT_BINARY_DIR}/images ${CMAKE_CURRENT_BINARY_DIR}/images
) )
endif()

View File

@ -14,6 +14,10 @@ endif()
# Include directories and libraries # Include directories and libraries
include_directories(../../../Common) include_directories(../../../Common)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
message(STATUS "Will not build sample nvJPEG_encoder - not supported on aarch64")
else()
# Source file # Source file
# Add target for nvJPEG_encoder # Add target for nvJPEG_encoder
add_executable(nvJPEG_encoder nvJPEG_encoder.cpp) add_executable(nvJPEG_encoder nvJPEG_encoder.cpp)
@ -45,3 +49,5 @@ add_custom_command(TARGET nvJPEG_encoder POST_BUILD
${CMAKE_CURRENT_SOURCE_DIR}/encode_output ${CMAKE_CURRENT_SOURCE_DIR}/encode_output
${CMAKE_CURRENT_BINARY_DIR}/encode_output ${CMAKE_CURRENT_BINARY_DIR}/encode_output
) )
endif()