mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 22:30:13 -06: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);
|
cuDeviceGet(&device, 0);
|
||||||
|
|
||||||
CUcontext context;
|
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);
|
cuCtxCreate(&context, 0, device);
|
||||||
|
#endif
|
||||||
|
|
||||||
CUmodule module;
|
CUmodule module;
|
||||||
for (auto p : actual_paths) {
|
for (auto p : actual_paths) {
|
||||||
|
|||||||
@@ -36,8 +36,14 @@ int main()
|
|||||||
cuDeviceGet(&device, 0);
|
cuDeviceGet(&device, 0);
|
||||||
|
|
||||||
CUcontext context;
|
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);
|
cuCtxCreate(&context, 0, device);
|
||||||
|
#endif
|
||||||
CUmodule module;
|
CUmodule module;
|
||||||
for (auto p : actual_paths) {
|
for (auto p : actual_paths) {
|
||||||
if (p.find(".fatbin") == std::string::npos) {
|
if (p.find(".fatbin") == std::string::npos) {
|
||||||
|
|||||||
@@ -18,7 +18,14 @@ int main()
|
|||||||
cuDeviceGet(&device, 0);
|
cuDeviceGet(&device, 0);
|
||||||
|
|
||||||
CUcontext context;
|
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);
|
cuCtxCreate(&context, 0, device);
|
||||||
|
#endif
|
||||||
|
|
||||||
CUmodule module;
|
CUmodule module;
|
||||||
CUresult result = cuModuleLoadData(&module, kernels);
|
CUresult result = cuModuleLoadData(&module, kernels);
|
||||||
|
|||||||
Reference in New Issue
Block a user