OpenCL-Docs icon indicating copy to clipboard operation
OpenCL-Docs copied to clipboard

Do we want a path to provide properties for all command types defined by cl_khr_command_buffer?

Open kpet opened this issue 1 year ago • 3 comments

The provisional specification for cl_khr_command_buffer defines a path to provide additional properties for NDRange kernel commands (clCommandNDRangeKernelKHR/cl_ndrange_kernel_command_properties_khr). This enables future extensibility which cl_khr_command_buffer_mutable_dispatch is already using. Do we want a similar path for all command types?

kpet avatar Jul 10 '24 11:07 kpet

I think that makes sense, it's a minor increase in verbosity but gives a significant extensibility benefit.

EwanC avatar Jul 10 '24 11:07 EwanC

My main question before drafting this up is, do we want a generic property type for all commands?

Right now cl_ndrange_kernel_command_properties_khr is tied to the clCommandNDRangeKernelKHR command, and if we followed that precedent then each command would have its own cl_foo_command_properties_khr property type - which feels a bit excessive. Alternatively, we could have a generic cl_command_properties_khr property type for all commands (including changing clCommandNDRangeKernelKHR to use it) It would mean that we would need error/valid-usage wording around which commands each property define for it can be used with.

EwanC avatar Jul 23 '24 08:07 EwanC

A single cl_command_properties_khr property type sounds like a better direction to me. It's not like our approach to properties is type safe anyway...

kpet avatar Jul 23 '24 09:07 kpet