Skip to content

Commit 0c33048

Browse files
authored
[SYCL][CUDA] Set cuda_piextUSMEnqueuePrefetch to fail for windows (#4908)
`cuMemPrefetchAsync` currently has issues on Windows machines, this appears to be a problem with CUDA and not the plugins usage of the function. I think `cuda_piextUSMEnqueuePrefetch` which uses `cuMemPrefetchAsync` should be set to fail for windows and send a message to the user that this functionality is not available on windows devices. More details: #4809
1 parent 2f4de56 commit 0c33048

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4651,6 +4651,14 @@ pi_result cuda_piextUSMEnqueuePrefetch(pi_queue queue, const void *ptr,
46514651
const pi_event *events_waitlist,
46524652
pi_event *event) {
46534653

4654+
// CUDA has an issue with cuMemPrefetchAsync returning cudaErrorInvalidDevice
4655+
// for Windows machines
4656+
// TODO: Remove when fix is found
4657+
#ifdef _MSC_VER
4658+
cl::sycl::detail::pi::die(
4659+
"cuda_piextUSMEnqueuePrefetch does not currently work on Windows");
4660+
#endif
4661+
46544662
// flags is currently unused so fail if set
46554663
if (flags != 0)
46564664
return PI_INVALID_VALUE;

0 commit comments

Comments
 (0)