CUDA: Update CUDA tests to handle CUDA 13 deprecations

This commit is contained in:
Robert Maynard authored and Brad King committed 2025-08-04 11:22:13 -04:00
1 parent bbf732525a
commit 3ff777de12
3 files changed
+21 -1

No files matched your search

+7
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) {
+7 -1
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) {
@@ -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);