Skip to content

[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

Open
wants to merge 2 commits into
base: sycl
Choose a base branch
from

Conversation

martygrant
Copy link
Contributor

@martygrant martygrant commented May 12, 2025

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 moves checkUSMImplAlignment from Hip into a common header so it can be used in both Hip and OpenCL.

… OpenCL. Use checkUSMImplAlignment from the Hip adapter for this but moved it to a common header.
@martygrant martygrant marked this pull request as ready for review May 14, 2025 12:57
@martygrant martygrant requested review from a team as code owners May 14, 2025 12:57
@martygrant
Copy link
Contributor Author

Arc fails tracked here #18416

@kbenzie
Copy link
Contributor

kbenzie commented May 14, 2025

Arc fails tracked here #18416

Those are not the same tests.

@martygrant
Copy link
Contributor Author

@kbenzie oops! I don't think there is an open issue for these ones yet that I can find. They failed on another PR today #18457. I'll open one.

Unrelated to the PR so should be fine.

@martygrant
Copy link
Contributor Author

Created an issue for them here #18463

Copy link
Contributor

@aelovikov-intel aelovikov-intel left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[OpenCL][USM] urEnqueueUSMFill incorrectly assumes destination memory alignment and fails
3 participants