Open kpet opened 7 months ago
I think there is some related discussion here: https://github.com/KhronosGroup/OpenCL-Docs/issues/770
Thanks Ben! I won't try to join both discussions in a comment here. I think we're more likely to make progress in a teleconference.
Discussed in the 2024/05/07 teleconference:
CL_MEM_READ_ONLY
. Applications might have relied on this behaviour that has been an explicit part of the specification for many versions.CL_MEM_READ_ONLY
, CL_MEM_WRITE_ONLY
, and CL_MEM_READ_WRITE
flags.cl_mem_flags
(which is the only viable mechanism given the need to provide the information to clGetSupportedImageFormats
) via an extension to add the concept of "device-immutable images" that could not be modified by any commands. No definitive consensus on whether mapping operations would be supported on such immutable images; leaning towards "no".clGetSupportedImageFormats
to query supported image formats. We noted that cl_ext_image_requirements_info provides some related functionality.Arm has an idea how to proceed. No longer needs WG discussion.
As part of adding support for a new image format for which we can only support read access, we're bumping into the following rule (there are similar notes for clEnqueueFillBuffer, clCommandFillBufferKHR, and clCommandFillImageKHR; these notes have been there since the beginning of our git history for clEnqueueFill* commands):
Looking at Table 19. List of supported memory flag values, it seems access control flags fall into two groups:
CL_MEM_READ_WRITE
,CL_MEM_READ_ONLY
, andCL_MEM_WRITE_ONLY
specify what accesses kernels are allowed to perform on a memory object.CL_MEM_HOST_WRITE_ONLY
,CL_MEM_HOST_READ_ONLY
, andCL_MEM_HOST_NO_ACCESS
specify what accesses the host is allowed to perform on a memory object.CL_MEM_*
flags so they apply to all device commands and remove the notes on fill commands.