From ebc1078379cfd8a8c6f9a052bfccb1efbc637e76 Mon Sep 17 00:00:00 2001 From: shawnz Date: Wed, 14 May 2025 15:54:41 +0800 Subject: [PATCH 1/5] Bug 5280038: Update cuda-c-linking as per CUDA 13.0 API change --- CHANGELOG.md | 3 +++ Samples/7_libNVVM/cuda-c-linking/cuda-c-linking.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2a2f99f..ef4d5ccf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,9 +43,12 @@ * `4_CUDA_Libraries` * `jitLto` * `7_libNVVM` + * `cuda-c-linking` * `device-side-launch` * `simple` * `uvmlite` + * `8_Platform_Specific/Tegra` + * `EGLSync_CUDAEvent_Interop` * Updated the sample using CUDA API "cudaGraphAddNode"/"cudaStreamGetCaptureInfo" with adding "cudaGraphEdgeData" pointer parameter as they are updated to "cudaGraphAddNode_v2"/"cudaStreamGetCaptureInfo_v3" by default in CUDA 13.0: * `3_CUDA_Features` * `graphConditionalNodes` diff --git a/Samples/7_libNVVM/cuda-c-linking/cuda-c-linking.cpp b/Samples/7_libNVVM/cuda-c-linking/cuda-c-linking.cpp index 06e8d1ca..27fb73af 100644 --- a/Samples/7_libNVVM/cuda-c-linking/cuda-c-linking.cpp +++ b/Samples/7_libNVVM/cuda-c-linking/cuda-c-linking.cpp @@ -248,7 +248,8 @@ int main(int argc, char **argv) // Create the CUDA context. CUcontext context; - checkCudaErrors(cuCtxCreate(&context, 0, device)); + + checkCudaErrors(cuCtxCreate(&context, NULL, 0, device)); // Create a JIT linker and generate the result CUBIN. CUlinkState linker; From ee0ee417c90207d70ec1a74dd0d9582abeae8751 Mon Sep 17 00:00:00 2001 From: shawnz Date: Wed, 14 May 2025 16:02:17 +0800 Subject: [PATCH 2/5] Update the sample list for API changes in CHANGELOG --- Samples/7_libNVVM/cuda-c-linking/cuda-c-linking.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Samples/7_libNVVM/cuda-c-linking/cuda-c-linking.cpp b/Samples/7_libNVVM/cuda-c-linking/cuda-c-linking.cpp index 27fb73af..3717c413 100644 --- a/Samples/7_libNVVM/cuda-c-linking/cuda-c-linking.cpp +++ b/Samples/7_libNVVM/cuda-c-linking/cuda-c-linking.cpp @@ -248,7 +248,6 @@ int main(int argc, char **argv) // Create the CUDA context. CUcontext context; - checkCudaErrors(cuCtxCreate(&context, NULL, 0, device)); // Create a JIT linker and generate the result CUBIN. From c1b03b9f818c6a63ef09e7c115e6593356ebfeaa Mon Sep 17 00:00:00 2001 From: shawnz Date: Fri, 16 May 2025 11:21:07 +0800 Subject: [PATCH 3/5] Bug 5277193: Remove the CUFFT_LICENSE_ERROR checking as it is deprecated since CUDA13.0 --- CHANGELOG.md | 17 +++++++++++++++++ Common/helper_cuda.h | 3 +++ .../simpleCUFFT_callback.cu | 8 -------- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef4d5ccf..19cc5391 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,23 @@ * Replaced "thrust::identity()" with "cuda::std::identity()" as it is deprecated in CUDA 13.0. * `2_Concepts_and_Techniques` * `segmentationTreeThrust` +* Updated the the headers file and samples for CUFFT error codes update. + * Deprecated CUFFT errors: + * `CUFFT_INCOMPLETE_PARAMETER_LIST` + * `CUFFT_PARSE_ERROR` + * `CUFFT_LICENSE_ERROR` + * New added CUFFT errors: + * `CUFFT_MISSING_DEPENDENCY` + * `CUFFT_NVRTC_FAILURE` + * `CUFFT_NVJITLINK_FAILURE` + * `CUFFT_NVSHMEM_FAILURE` + * Header files and samples that are related with this change: + * `Common/helper_cuda.h` + * `4_CUDA_Libraries` + * `simpleCUFFT` + * `simpleCUFFT_2d_MGPU` + * `simpleCUFFT_MGPU` + * `simpleCUFFT_callback` ### CUDA 12.9 * Updated toolchain for cross-compilation for Tegra Linux platforms. diff --git a/Common/helper_cuda.h b/Common/helper_cuda.h index 401c41b2..3c70fdc2 100644 --- a/Common/helper_cuda.h +++ b/Common/helper_cuda.h @@ -147,6 +147,9 @@ static const char *_cudaGetErrorEnum(cufftResult error) { case CUFFT_NOT_IMPLEMENTED: return "CUFFT_NOT_IMPLEMENTED"; + case CUFFT_NOT_SUPPORTED: + return "CUFFT_NOT_SUPPORTED"; + case CUFFT_MISSING_DEPENDENCY: return "CUFFT_MISSING_DEPENDENCY"; diff --git a/Samples/4_CUDA_Libraries/simpleCUFFT_callback/simpleCUFFT_callback.cu b/Samples/4_CUDA_Libraries/simpleCUFFT_callback/simpleCUFFT_callback.cu index 64017353..5f636e1d 100644 --- a/Samples/4_CUDA_Libraries/simpleCUFFT_callback/simpleCUFFT_callback.cu +++ b/Samples/4_CUDA_Libraries/simpleCUFFT_callback/simpleCUFFT_callback.cu @@ -182,14 +182,6 @@ int runTest(int argc, char **argv) checkCudaErrors(cudaMemcpyFromSymbol(&hostCopyOfCallbackPtr, myOwnCallbackPtr, sizeof(hostCopyOfCallbackPtr))); // Now associate the load callback with the plan. - cufftResult status = - cufftXtSetCallback(cb_plan, (void **)&hostCopyOfCallbackPtr, CUFFT_CB_LD_COMPLEX, (void **)&d_params); - if (status == CUFFT_LICENSE_ERROR) { - printf("This sample requires a valid license file.\n"); - printf("The file was either not found, out of date, or otherwise invalid.\n"); - return EXIT_WAIVED; - } - checkCudaErrors( cufftXtSetCallback(cb_plan, (void **)&hostCopyOfCallbackPtr, CUFFT_CB_LD_COMPLEX, (void **)&d_params)); From 1141dd7af431da3713b158a1f408dbb36a124f1e Mon Sep 17 00:00:00 2001 From: shawnz Date: Tue, 20 May 2025 14:47:44 +0800 Subject: [PATCH 4/5] Bug 5281036: Limit the register number of debug version for cdpAdvancedQuicksort --- Samples/3_CUDA_Features/cdpAdvancedQuicksort/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Samples/3_CUDA_Features/cdpAdvancedQuicksort/CMakeLists.txt b/Samples/3_CUDA_Features/cdpAdvancedQuicksort/CMakeLists.txt index f68f6651..e52a4a26 100644 --- a/Samples/3_CUDA_Features/cdpAdvancedQuicksort/CMakeLists.txt +++ b/Samples/3_CUDA_Features/cdpAdvancedQuicksort/CMakeLists.txt @@ -23,6 +23,7 @@ set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets") if(ENABLE_CUDA_DEBUG) set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (may significantly affect performance on some targets) + set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -maxrregcount=64") # Limit register usage to 64 for the 'big_bitonicsort kernel else() set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -lineinfo") # add line information to all builds for debug tools (exclusive to -G option) endif() From 3e631f467aedfbc8da8a65cd4d2c21bd1587affc Mon Sep 17 00:00:00 2001 From: shawnz Date: Wed, 21 May 2025 14:16:48 +0800 Subject: [PATCH 5/5] Bug 5294720: Update GpuArch Cores and Name for SM103, 110 and 121 --- Common/helper_cuda.h | 6 ++++++ Common/helper_cuda_drvapi.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/Common/helper_cuda.h b/Common/helper_cuda.h index 3c70fdc2..9440235e 100644 --- a/Common/helper_cuda.h +++ b/Common/helper_cuda.h @@ -673,7 +673,10 @@ inline int _ConvertSMVer2Cores(int major, int minor) { {0x90, 128}, {0xa0, 128}, {0xa1, 128}, + {0xa3, 128}, + {0xb0, 128}, {0xc0, 128}, + {0xc1, 128}, {-1, -1}}; int index = 0; @@ -725,7 +728,10 @@ inline const char* _ConvertSMVer2ArchName(int major, int minor) { {0x90, "Hopper"}, {0xa0, "Blackwell"}, {0xa1, "Blackwell"}, + {0xa3, "Blackwell"}, + {0xb0, "Blackwell"}, {0xc0, "Blackwell"}, + {0xc1, "Blackwell"}, {-1, "Graphics Device"}}; int index = 0; diff --git a/Common/helper_cuda_drvapi.h b/Common/helper_cuda_drvapi.h index 3303e6f5..2ded503e 100644 --- a/Common/helper_cuda_drvapi.h +++ b/Common/helper_cuda_drvapi.h @@ -118,7 +118,10 @@ inline int _ConvertSMVer2CoresDRV(int major, int minor) { {0x90, 128}, {0xa0, 128}, {0xa1, 128}, + {0xa3, 128}, + {0xb0, 128}, {0xc0, 128}, + {0xc1, 128}, {-1, -1}}; int index = 0;