Skip to content

Commit 4d304e0

Browse files
committed
updates deviceOverlap handling (adds version check)
1 parent 354f05b commit 4d304e0

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/gpu/initialize_gpu.cu

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,16 @@ void initialize_cuda_device(int* myrank_f,int* ncuda_devices) {
241241
}else{
242242
fprintf(fp," canMapHostMemory: FALSE\n");
243243
}
244+
#if CUDA_VERSION < 13000 || (defined (__CUDACC_VER_MAJOR__) && (__CUDACC_VER_MAJOR__ < 13))
245+
if (deviceProp.deviceOverlap){
246+
fprintf(fp," deviceOverlap: TRUE\n");
247+
}else{
248+
fprintf(fp," deviceOverlap: FALSE\n");
249+
}
250+
#else
251+
// CUDA version >= 13, deviceOverlap deprecated, replaced by asyncEngineCount
244252
fprintf(fp," asyncEngineCount: %d\n", deviceProp.asyncEngineCount);
253+
#endif
245254
if (deviceProp.concurrentKernels){
246255
fprintf(fp," concurrentKernels: TRUE\n");
247256
}else{

utils/GPU_tools/check_cuda_device.cu

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,11 +387,16 @@ e.g., on titan enable environment CRAY_CUDA_MPS=1 to use a single GPU with multi
387387
}else{
388388
printf(" canMapHostMemory: FALSE\n");
389389
}
390+
#if CUDA_VERSION < 13000 || (defined (__CUDACC_VER_MAJOR__) && (__CUDACC_VER_MAJOR__ < 13))
390391
if(deviceProp.deviceOverlap){
391392
printf(" deviceOverlap: TRUE\n");
392393
}else{
393394
printf(" deviceOverlap: FALSE\n");
394395
}
396+
#else
397+
// CUDA version >= 13, deviceOverlap deprecated, replaced by asyncEngineCount
398+
printf(" asyncEngineCount: %d\n", deviceProp.asyncEngineCount);
399+
#endif
395400
printf(" Compute Mode: %d\n", deviceProp.computeMode);
396401
fflush(stdout);
397402

0 commit comments

Comments
 (0)