Merge branch 'shawnz_bug_fix' into 'master'

Bug fix for 5280038, 5277193, 5281036 and 5294720

See merge request cuda-samples/cuda-samples!112
This commit is contained in:
Rob Armstrong
2025-05-21 10:51:12 -07:00
6 changed files with 34 additions and 9 deletions

View File

@@ -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()

View File

@@ -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));

View File

@@ -248,7 +248,7 @@ 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;