Skip to content

Commit e4dbac6

Browse files
cuda: Add explicit check for the use of Cuda Toolkit's >= 13 with cc's < 7.5
1 parent 9a4f5c5 commit e4dbac6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/cuda/papi_cupti_common.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,14 @@ int cuptic_init(void)
603603
return papi_errno;
604604
}
605605

606+
// Verify that Cuda Toolkit's >= 13 are not being used with devices that have cc's < 7.5
607+
int cudaRuntimeVersion;
608+
cudaArtCheckErrors( cudaRuntimeGetVersionPtr(&cudaRuntimeVersion), return PAPI_EMISC );
609+
if (cudaRuntimeVersion >= 13000 && system_ccs != sys_gpu_ccs_all_gt_70) {
610+
cuptic_err_set_last("Cuda Toolkit's >= 13 do not support offline compilation for architectures prior to cc's < 7.5. On mixed cc machines utilize 'export CUDA_VISIBLE_DEVICES'.\n");
611+
return PAPI_ECMP;
612+
}
613+
606614
// Get an array of the available devices on the system
607615
papi_errno = get_enabled_devices();
608616
if (papi_errno != PAPI_OK) {

0 commit comments

Comments
 (0)