-
Notifications
You must be signed in to change notification settings - Fork 770
[UR] Check for memory alignment before calling clEnqueueMemFillINTEL_fn in OpenCL #18423
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
[UR] Check for memory alignment before calling clEnqueueMemFillINTEL_fn in OpenCL #18423
Conversation
Arc fails tracked here #18416 |
Those are not the same tests. |
Created an issue for them here #18463 |
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.
E2E test change LGTM
…eueCommandForCG (#18517) Add UR error code when throwing exception from Scheduler::enqueueCommandForCG. Remove message string from non adapter specific error exception in checkUrResult as it's only used in the adapter specific error path. This is related to oneapi-src/unified-runtime#2440 and #18423 where `clEnqueueMemFillINTEL` was failing with -30 (`CL_INVALID_VALUE`) but no detail was provided in the log: ``` terminate called after throwing an instance of 'sycl::_V1::exception' what(): Enqueue process failed. Aborted (core dumped) ``` This is because the first exception thrown from `checkUrResult` was being hidden by a second exception thrown from `Scheduler::enqueueCommandForCG`. I've modified this second exception to include the UR result. The output now looks like: ``` terminate called after throwing an instance of 'sycl::_V1::exception' what(): Enqueue process failed. Native API failed. Native API returns: 4 (UR_RESULT_ERROR_INVALID_VALUE) ```
eb282a1
to
8aab8c8
Compare
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, thanks!
I suspect there probably needs to be some sort of alignment check in the Level Zero adapter also, but I'm not sure what the Level Zero alignment requirements are so this should be done in a separate PR.
@bashbaug I've opened an issue to look at the L0 adapter |
edba358
to
5ef4a39
Compare
5ef4a39
to
204a2ec
Compare
204a2ec
to
2d7d393
Compare
… OpenCL. Use checkUSMImplAlignment from the Hip adapter for this but moved it to a common header.
…ke single *pointer and deference at calls sites where double** was being passed.
2d7d393
to
4aa4f89
Compare
Fixes oneapi-src/unified-runtime#2440
clEnqueueMemFillINTEL returns CL_INVALID_VALUE if dst_ptr is NULL, or if dst_ptr is not aligned to pattern_size bytes.
This PR adds a memory alignment check before calling
clEnqueueMemFillINTEL
to ensure we can safely call it, otherwise take the host side copy path.Re-enables the
USM/fill_any_size.cpp
and also movescheckUSMImplAlignment
from Hip into a common header so it can be used in both Hip and OpenCL.