Skip to content

Commit 57eb60e

Browse files
author
aidan.belton
committed
emit warning
1 parent 4433929 commit 57eb60e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4765,8 +4765,11 @@ pi_result cuda_piextUSMEnqueuePrefetch(pi_queue queue, const void *ptr,
47654765
unsigned int is_managed;
47664766
PI_CHECK_ERROR(cuPointerGetAttribute(
47674767
&is_managed, CU_POINTER_ATTRIBUTE_IS_MANAGED, (CUdeviceptr)ptr));
4768-
if (!is_managed)
4769-
return PI_SUCCESS;
4768+
if (!is_managed) {
4769+
setErrorMessage("Prefetch hint ignored as prefetch only works with ",
4770+
"USM" PI_SUCCESS);
4771+
return PI_PLUGIN_SPECIFIC_ERROR;
4772+
}
47704773

47714774
// flags is currently unused so fail if set
47724775
if (flags != 0)

0 commit comments

Comments
 (0)