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

cl_ext_float_atomics: required minimum capabilities

Open bashbaug opened this issue 2 years ago • 1 comments

Currently, the cl_ext_float_atomics explicitly states that there are no mandated minimum capabilities: https://registry.khronos.org/OpenCL/extensions/ext/cl_ext_float_atomics.html#_modifications_to_the_opencl_api_specification

This means that an implementation could theoretically advertise support for the extension but then return zero for all three capability queries (for fp16, fp32, and fp64 atomics).

This is slightly inconsistent with other parts of the spec, though. Specifically:

  • This extension requires OpenCL 2.0 or newer…
  • In OpenCL C 2.0 or newer, at the very least the atomic_float versions of atomic_load_explicit and atomic_store_explicit with named address spaces and a memory_scope operand must be supported…
  • Additionally, in OpenCL C 2.0 or newer, atomic_double versions must be supported similarly when cl_khr_int64_base_atomics and cl_khr_int64_extended atomics are supported…
  • Therefore there is a minimum requirement to support at least global loads and stores for atomic_float, and atomic_double in some cases.

Is this logic correct? If so, should we update the spec to document these required mimum capabilities (and ideally add a CTS test for it)? Or is there some other reason why we may want to have no mandated minimum capabilities for this extension?

bashbaug avatar Feb 21 '23 23:02 bashbaug

I see that on Arrow Lake at least latest Neo CPU OpenCL added

cl_ext_float_atomics cl_khr_device_uuid cl_khr_integer_dot_product

Nice. So is this resolved then?

ValeZAA avatar Apr 04 '25 10:04 ValeZAA