oneapi-src / oneapi-src/unified-runtime
Add validation layer support to detect if maps from urEnqueueMemBufferMap are overlapping
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 57
- Forks
- 120
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 1
Description
urEnqueueMemBufferMap does not support overlapping maps if they have the flag UR_MAP_FLAG_WRITE. Entrypoints should return an error code in this scenario. From the OpenCL spec:
A NULL pointer is returned otherwise with one of the following error values returned in errcode_ret:
CL_INVALID_OPERATION if mapping would lead to overlapping regions being mapped for writing.
This seems like the kind of thing that could be detected using validation layers instead of relying on checks in the adapter implementations.
We should probably also update the UR spec to clarify this behaviour.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the urEnqueueMemBufferMap entrypoint and trace how validation layers currently handle mapped regions. Compare the required overlapping-write behavior with the cited OpenCL rule, then update the UR spec to clarify it; done means the entrypoints return an error for overlapping write maps and the specification describes that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100