Clarification on importing opaque_fd and dma buf
In 5.5.2.1 "File descriptor handle types" it is stated:
"For these extensions, importing memory from a file descriptor transfers ownership of the file descriptor from the application to the OpenCL implementation. The application must not perform any operations on the file descriptor after a successful import. The imported memory object holds a reference to its payload."
-
What defines an operation? For example, would it be valid for an application to mmap an opaque fd or dmabuf after the image is created, as long as the imported fd has not been acquired by clEnqueueAcquire?
-
How is ownership defined?
Related to #1308
Notes from memory subgroup call on April 15th, 2025.
- Understand the purpose of language borrowed from Vulkan around operations on memory handles after import.
From the Vulkan spec "Importing memory from a file descriptor transfers ownership of the file descriptor from the application to the Vulkan implementation. The application must not perform any operations on the file descriptor after a successful import. The imported memory object holds a reference to its payload."
So it seems like Vulkan differentiates between the handle and the payload. So maybe our current wording is fine.
Closing the issue as discussed in OpenCL Memory subgroup call of April 22, 2025. Will open new issue if any further changes needed.