mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
CUDA: Update CUDA tests to handle CUDA 13 deprecations
This commit is contained in:

committed by
Brad King

parent
bbf732525a
commit
3ff777de12
@@ -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, ¶ms, 0, device);
|
||||
#else
|
||||
cuCtxCreate(&context, 0, device);
|
||||
#endif
|
||||
|
||||
CUmodule module;
|
||||
for (auto p : actual_paths) {
|
||||
|
@@ -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, ¶ms, 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, ¶ms, 0, device);
|
||||
#else
|
||||
cuCtxCreate(&context, 0, device);
|
||||
#endif
|
||||
|
||||
CUmodule module;
|
||||
CUresult result = cuModuleLoadData(&module, kernels);
|
||||
|
Reference in New Issue
Block a user