Skip to content

Conversation

@AidanBeltonS
Copy link
Contributor

@AidanBeltonS AidanBeltonS commented Feb 1, 2022

This PR adds a managed memory check in cuda_piextUSMEnqueuePrefetch.
cuMemPrefetchAsync only works on managed memory and returns an error if host or device memory is passed.

This check ignores the prefetch hint if the memory provided is not managed.
A warning is emitted to the user if the prefetch is ignored.

This is a partial fix to: #5209

@AidanBeltonS AidanBeltonS force-pushed the cuda-prefetch-check-managed branch from 772e725 to 57eb60e Compare May 9, 2022 09:10
@AidanBeltonS
Copy link
Contributor Author

@smaslov-intel would you be able to review this change?

@AidanBeltonS
Copy link
Contributor Author

@pvchupin would you be able to tell me what is failing in the Jenkins/Precommit? Many thanks

@pvchupin
Copy link
Contributor

@AidanBeltonS, it's older issue addressed in #6133
I'm going to try to restart it.

@pvchupin pvchupin merged commit 0fe322c into intel:sycl May 13, 2022
@AidanBeltonS AidanBeltonS deleted the cuda-prefetch-check-managed branch June 9, 2022 09:29
steffenlarsen pushed a commit that referenced this pull request Jul 29, 2022
This PR adds the mem_advise reset case and a managed memory check in cuda_piextUSMEnqueueMemAdvise.

cuMemAdvise only works on managed memory and returns an error if host or device memory is passed.
The SYCL-CTS tests mem_advise with host and device memory, which are not managed.  This PR prevents an error from being thrown in the cts usm test.

In addition, the sycl spec specifies for mem_advise `A value of 0 reverts the advice for ptr to the default behavior`, currently a value of 0 is treated as unknown and throws an error in the cts as well. This reset case is added to mem_advise.

This patch along with #5446 resolves issue #5209 

This change breaks the ABI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants