-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL][CUDA] Add mem_advise reset and managed mem check #5536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, don't change user-visible enum values. Only add new ones.
bb38a66
to
8ed7a36
Compare
Non ABI breaking changes also being proposed in: #6281 |
Sorry @AidanBeltonS . I completely missed this PR. Does #6281 cover everything that this changes or should we coordinate the patches? |
No worries. I think #6281 covers all everything that does not require an ABI breaking window so I don't think anything needs to be coordinated. I can update this PR later so that it just makes the enum changes. |
Co-authored-by: Steffen Larsen <[email protected]>
…into cuda_memadvise
I have set
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @AidanBeltonS! Changes look good to me, but since it changes the PI API and break backwards compatability, the PI version should be incremented as detailed at the top of pi.h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Test failure in Basic/image/image_write_fp16.cpp. @AidanBeltonS - Is this related to this patch? |
It appears to be unrelated to this patch. There is no use of mem_advice or USM within the test. |
Do you know if it's a known failure? If not, could you please open an issue for investigating it? |
I do not think it is a known problem. I have created an issue to track it #6491. |
Perfect, thank you! In that case, let's get this merged. |
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