From 5e66db2470c8eb3622a9a66dffbaad2277dee786 Mon Sep 17 00:00:00 2001 From: Mitchell Augustin Date: Thu, 17 Jul 2025 18:03:34 -0500 Subject: [PATCH 1/2] Add tip for common cmake error to README This error is common on many machines I've used with standard installations, so I think it would be helpful to make note of this simple workaround here. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index c6536152b..8fb6f49ca 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,9 @@ Configure the project with CMake: ``` cmake .. ``` +> [!TIP] +> If you encounter an error such as `CMAKE_CUDA_ARCHITECTURES must be non-empty if set`, you may need to set CUDACXX explicitly (ex: if using cuda-12, run `CUDACXX=/usr/local/cuda-12/bin/nvcc cmake ..` instead) + Build the samples: ``` make -j$(nproc) From d4d345dfefe359e077a70705fb9f02923db95676 Mon Sep 17 00:00:00 2001 From: Mitchell Augustin Date: Thu, 18 Sep 2025 16:39:18 -0500 Subject: [PATCH 2/2] Add note to use CUDA samples version that matches your installed CUDA version --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8fb6f49ca..f14bb8b44 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ git clone https://github.com/NVIDIA/cuda-samples.git Without using git the easiest way to use these samples is to download the zip file containing the current version by clicking the "Download ZIP" button on the repo page. You can then unzip the entire archive and use the samples. +Be sure to use the cuda-samples version corresponding to your installed CUDA version + ## Building CUDA Samples ### Building CUDA Samples