Skip to content

[GPU] Use the same flags as the whole buffer when creating an OCL subbuffer #31180

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 1 commit into
base: master
Choose a base branch
from

Conversation

tkrupa-intel
Copy link
Contributor

Details:

  • This call sometimes fails with CL_INVALID_VALUE error when OV_GPU_DISABLE_USM is set.
  • Previously defined flags are not always allowed depending on the existing buffer's flags according to the specification: https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/clCreateSubBuffer.html:
    • CL_MEM_READ_WRITE may be illegal if the existing buffer's flags include CL_MEM_WRITE_ONLY or CL_MEM_READ_ONLY.
    • CL_MEM_USE_HOST_PTR is never allowed to be explicitly set in clCreateSubBuffer().
  • This change makes the subbuffer inherit the existing buffer's flags.

@tkrupa-intel tkrupa-intel requested review from a team as code owners July 2, 2025 12:37
@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: GPU OpenVINO GPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant