From a45c3c30d5371b8ad3ae57cb75bda0a20daead0a Mon Sep 17 00:00:00 2001 From: Tom Birdsong Date: Thu, 19 Dec 2024 15:00:00 -0500 Subject: [PATCH 1/2] Build: Set default `CUDA_ARCHITECTURES` for builds Set a default `CMAKE_CUDA_ARCHITECTURES` list for builds to inherit that covers most modern architectures. The list here is at parity with Holoscan SDK build defaults. Subprojects in HoloHub may choose to override this value with their own default settings or set `CUDA_ARCHITECTURES` directly on targets. Resolves an observed issue on IGX 1.1 where not setting this property resulted in a default value of "52" in the Multi-AI Ultrasound application, leading to a "PTX" failure message. With this fix the Multi-AI Ultrasound application inherits the updated list of compute capabilities by default. Note that existing builds may need to clear the `CMakeCache.txt` or the specific architectures cache entry to apply the fix. co-authored-by: Wendell Hom Signed-off-by: Tom Birdsong --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba9dfccc5..1602a9bda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,11 @@ set(HOLOHUB_DATA_DIR "${CMAKE_BINARY_DIR}/data" CACHE PATH "Data Download direct set(CMAKE_INSTALL_RPATH "\$ORIGIN:\$ORIGIN/../../../lib:\$ORIGIN/../../lib:/opt/nvidia/holoscan/lib/") +# Set the default CUDA target platforms +if(NOT CMAKE_CUDA_ARCHITECTURES) + set(CMAKE_CUDA_ARCHITECTURES "60;70;72;75;80;86;87;89;90;90a") +endif() + # Build packaging add_subdirectory(pkg) From 0f5a1ae917f655f72bcd094210d2b53ea9682c36 Mon Sep 17 00:00:00 2001 From: Andreas Heumann Date: Tue, 7 Jan 2025 07:18:27 +0100 Subject: [PATCH 2/2] Update CMakeLists.txt Co-authored-by: Tom Birdsong <40648863+tbirdso@users.noreply.github.com> Signed-off-by: Andreas Heumann --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1602a9bda..ce2746ea5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,7 @@ set(CMAKE_INSTALL_RPATH # Set the default CUDA target platforms if(NOT CMAKE_CUDA_ARCHITECTURES) - set(CMAKE_CUDA_ARCHITECTURES "60;70;72;75;80;86;87;89;90;90a") + set(CMAKE_CUDA_ARCHITECTURES "native") endif() # Build packaging