Skip to content

Behaviour of clCreate{Buffer,Image}WithProperties when CL_DEVICE_HANDLE_LIST_KHR is provided but no external memory handle is #916

@kpet

Description

@kpet

CL_DEVICE_HANDLE_LIST_KHR can be passed to clCreateBufferWithProperties or clCreateImageWithProperties to restrict which devices in the context import the external memory described by an external memory handle. The specification does not however state what happens when CL_DEVICE_HANDLE_LIST_KHR is provided (especially if the list does not contain all the devices that are part of the context) but no external memory handle is provided. A few possible options:

  1. Ignore the device list.
  2. Restrict which devices can use the memory object even though it wouldn't be imported (feels weird to introduce this with cl_khr_external_memory).
  3. Report an error. We could add a rule stating that an external memory handle must be provided when CL_DEVICE_HANDLE_LIST_KHR is and require implementations to report CL_INVALID_PROPERTY otherwise.
  4. Report an error when the device list does not contain all the devices that are in the context.

I think I have a preference for option 3. Thoughts?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions