Skip to content

Commit 1e88df5

Browse files
jinz2014Jin Z
andauthored
[SYCL][CUDA] replace __CUDA_API_VERSION with CUDA_VERSION (#8768)
The support of __CUDA_API_VERSION may be dropped by NVIDIA, so it is replaced with CUDA_VERSION Co-authored-by: Jin Z <[email protected]>
1 parent 7eecef6 commit 1e88df5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5425,7 +5425,7 @@ pi_result cuda_piextUSMGetMemAllocInfo(pi_context context, const void *ptr,
54255425
PI_MEM_TYPE_UNKNOWN);
54265426
}
54275427
case PI_MEM_ALLOC_BASE_PTR: {
5428-
#if __CUDA_API_VERSION >= 10020
5428+
#if CUDA_VERSION >= 10020
54295429
// CU_POINTER_ATTRIBUTE_RANGE_START_ADDR was introduced in CUDA 10.2
54305430
unsigned int value;
54315431
result = PI_CHECK_ERROR(cuPointerGetAttribute(
@@ -5437,7 +5437,7 @@ pi_result cuda_piextUSMGetMemAllocInfo(pi_context context, const void *ptr,
54375437
#endif
54385438
}
54395439
case PI_MEM_ALLOC_SIZE: {
5440-
#if __CUDA_API_VERSION >= 10020
5440+
#if CUDA_VERSION >= 10020
54415441
// CU_POINTER_ATTRIBUTE_RANGE_SIZE was introduced in CUDA 10.2
54425442
unsigned int value;
54435443
result = PI_CHECK_ERROR(cuPointerGetAttribute(

0 commit comments

Comments
 (0)