Skip to content

Add validation layer support to detect if maps from urEnqueueMemBufferMap are overlapping #1221

Open
@fabiomestre

Description

@fabiomestre

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    commonChanges or additions to common utilitiesspecificationChanges or additions to the specification

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions