-
Notifications
You must be signed in to change notification settings - Fork 790
[DeviceMSAN] Fix urEnqueueUSMMemcpy2D return UR_RESULT_ERROR_UNSUPPORTED_FEATURE after enabling MSAN #19286
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
base: sycl
Are you sure you want to change the base?
Conversation
Would it not make more sense to implement the fallback in the adapter? |
Okay |
I just realised they do different things. |
Hi @intel/unified-runtime-reviewers-level-zero @intel/unified-runtime-reviewers-opencl, please review, thanks! |
Sorry, I'm not familiar with the codes in adapter, especially fixing their conformance tests. |
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.
Pull Request Overview
This PR adds a fallback path for USMFill2D
when the underlying call returns UR_RESULT_ERROR_UNSUPPORTED_FEATURE
and updates 2D memcpy logic to use the new fallback and simplify wait-list handling.
- Introduce
urEnqueueUSMFill2DFallback
to slice a 2D fill into multiple 1D fills on unsupported backends - Update
urEnqueueUSMMemcpy2D
to invoke the new fallback and remove manual wait-event vector management - Minor loop/styling adjustments in event release logic
if (Result == UR_RESULT_SUCCESS || | ||
Result != UR_RESULT_ERROR_UNSUPPORTED_FEATURE) { |
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.
The condition if (Result == UR_RESULT_SUCCESS || Result != UR_RESULT_ERROR_UNSUPPORTED_FEATURE)
is redundant. You can simplify it to if (Result != UR_RESULT_ERROR_UNSUPPORTED_FEATURE) return Result;
for clarity.
if (Result == UR_RESULT_SUCCESS || | |
Result != UR_RESULT_ERROR_UNSUPPORTED_FEATURE) { | |
if (Result != UR_RESULT_ERROR_UNSUPPORTED_FEATURE) { |
Copilot uses AI. Check for mistakes.
urEnqueueUSMMemcpy2D return UR_RESULT_ERROR_UNSUPPORTED_FEATURE after enabling msan layer due to most adapters haven't implementing urEnqueueUSMFill2D.
I added a quick fallback implementation in msan layer just for urEnqueueUSMMemcpy2D.