1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 10:47:59 +08:00

CUDA: Update CUDA tests to handle CUDA 13 deprecations

This commit is contained in:
Robert Maynard
2025-04-21 15:21:17 -04:00
committed by Brad King
parent bbf732525a
commit 3ff777de12
3 changed files with 21 additions and 1 deletions

View File

@@ -36,7 +36,14 @@ int main()
cuDeviceGet(&device, 0);
CUcontext context;
#if defined(__CUDACC_VER_MAJOR__) && __CUDACC_VER_MAJOR__ >= 13
CUctxCreateParams params;
params.execAffinityParams = nullptr;
params.numExecAffinityParams = 0;
cuCtxCreate(&context, &params, 0, device);
#else
cuCtxCreate(&context, 0, device);
#endif
CUmodule module;
for (auto p : actual_paths) {

View File

@@ -36,8 +36,14 @@ int main()
cuDeviceGet(&device, 0);
CUcontext context;
#if defined(__CUDACC_VER_MAJOR__) && __CUDACC_VER_MAJOR__ >= 13
CUctxCreateParams params;
params.execAffinityParams = nullptr;
params.numExecAffinityParams = 0;
cuCtxCreate(&context, &params, 0, device);
#else
cuCtxCreate(&context, 0, device);
#endif
CUmodule module;
for (auto p : actual_paths) {
if (p.find(".fatbin") == std::string::npos) {

View File

@@ -18,7 +18,14 @@ int main()
cuDeviceGet(&device, 0);
CUcontext context;
#if defined(__CUDACC_VER_MAJOR__) && __CUDACC_VER_MAJOR__ >= 13
CUctxCreateParams params;
params.execAffinityParams = nullptr;
params.numExecAffinityParams = 0;
cuCtxCreate(&context, &params, 0, device);
#else
cuCtxCreate(&context, 0, device);
#endif
CUmodule module;
CUresult result = cuModuleLoadData(&module, kernels);