From 561296832a62071dbdd3016715449aed728beb6a Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Tue, 26 Mar 2024 13:15:59 -0700 Subject: [PATCH] updated after March 26th teleconference Clarified that this is a provisional extension Removed ext from feature names and feature test macros Added undefined behavior description to the SPIR-V environment spec --- OpenCL_C.txt | 12 ++++++------ api/opencl_platform_layer.asciidoc | 6 +++--- c/feature-dictionary.asciidoc | 18 +++++++++--------- env/extensions.asciidoc | 10 ++++++++-- xml/cl.xml | 2 +- 5 files changed, 27 insertions(+), 21 deletions(-) diff --git a/OpenCL_C.txt b/OpenCL_C.txt index aa76f4cb..1c89703f 100644 --- a/OpenCL_C.txt +++ b/OpenCL_C.txt @@ -230,15 +230,15 @@ products on 4x8 bit integer vectors. endif::cl_khr_integer_dot_product[] ifdef::cl_khr_kernel_clock[] -| {opencl_c_ext_kernel_clock_scope_device} +| {opencl_c_kernel_clock_scope_device} | The OpenCL C compiler supports built-in functions that sample the value from a clock shared by all work-items executing on the device. -| {opencl_c_ext_kernel_clock_scope_work_group} +| {opencl_c_kernel_clock_scope_work_group} | The OpenCL C compiler supports built-in functions that sample the value from a clock shared by all work-items executing in the same work-group. -| {opencl_c_ext_kernel_clock_scope_sub_group} +| {opencl_c_kernel_clock_scope_sub_group} | The OpenCL C compiler supports built-in functions that sample the value from a clock shared by all work-items executing in the same sub-group. endif::cl_khr_kernel_clock[] @@ -15251,11 +15251,11 @@ ifdef::cl_khr_kernel_clock[] NOTE: The functionality described in this section <> support for the `<>` extension. + The `clock_read_device` and `clock_read_hilo_device` functions require support -for the {opencl_c_ext_kernel_clock_scope_device} feature. +for the {opencl_c_kernel_clock_scope_device} feature. The `clock_read_work_group` and `clock_read_hilo_work_group` functions require -support for the {opencl_c_ext_kernel_clock_scope_work_group} feature. +support for the {opencl_c_kernel_clock_scope_work_group} feature. The `clock_read_sub_group` and `clock_read_hilo_sub_group` functions require -support for the {opencl_c_ext_kernel_clock_scope_sub_group} feature. +support for the {opencl_c_kernel_clock_scope_sub_group} feature. This section describes OpenCL C built-in functions that sample the value from one of three clocks provided by compute units. diff --git a/api/opencl_platform_layer.asciidoc b/api/opencl_platform_layer.asciidoc index 21e59f5f..981db806 100644 --- a/api/opencl_platform_layer.asciidoc +++ b/api/opencl_platform_layer.asciidoc @@ -2103,11 +2103,11 @@ returned for {CL_DEVICE_KERNEL_CLOCK_CAPABILITIES_KHR}: |==== | Feature Bit | Feature Macro | {CL_DEVICE_KERNEL_CLOCK_SCOPE_DEVICE_KHR} - | {opencl_c_ext_kernel_clock_scope_device} + | {opencl_c_kernel_clock_scope_device} | {CL_DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP_KHR} - | {opencl_c_ext_kernel_clock_scope_work_group} + | {opencl_c_kernel_clock_scope_work_group} | {CL_DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP_KHR} - | {opencl_c_ext_kernel_clock_scope_sub_group} + | {opencl_c_kernel_clock_scope_sub_group} |==== endif::cl_khr_kernel_clock[] diff --git a/c/feature-dictionary.asciidoc b/c/feature-dictionary.asciidoc index fd7b3433..e8375eb5 100644 --- a/c/feature-dictionary.asciidoc +++ b/c/feature-dictionary.asciidoc @@ -146,26 +146,26 @@ ifndef::backend-html5[] :opencl_c_integer_dot_product_input_4x8bit_packed: pass:q[`\__opencl_c_​integer_​dot_​product_​input_​4x8bit_​packed`] endif::[] -// opencl_c_ext_kernel_clock_scope_device +// opencl_c_kernel_clock_scope_device ifdef::backend-html5[] -:opencl_c_ext_kernel_clock_scope_device: pass:q[`\__opencl_c_ext_kernel_clock_scope_device`] +:opencl_c_kernel_clock_scope_device: pass:q[`\__opencl_c_kernel_clock_scope_device`] endif::[] ifndef::backend-html5[] -:opencl_c_ext_kernel_clock_scope_device: pass:q[`\__opencl_c_​ext_​kernel_​clock_​scope_​device`] +:opencl_c_kernel_clock_scope_device: pass:q[`\__opencl_c_​kernel_​clock_​scope_​device`] endif::[] -// opencl_c_ext_kernel_clock_scope_work_group +// opencl_c_kernel_clock_scope_work_group ifdef::backend-html5[] -:opencl_c_ext_kernel_clock_scope_work_group: pass:q[`\__opencl_c_ext_kernel_clock_scope_work_group`] +:opencl_c_kernel_clock_scope_work_group: pass:q[`\__opencl_c_kernel_clock_scope_work_group`] endif::[] ifndef::backend-html5[] -:opencl_c_ext_kernel_clock_scope_work_group: pass:q[`\__opencl_c_​ext_​kernel_​clock_​scope_​work_​group`] +:opencl_c_kernel_clock_scope_work_group: pass:q[`\__opencl_c_​kernel_​clock_​scope_​work_​group`] endif::[] -// opencl_c_ext_kernel_clock_scope_sub_group +// opencl_c_kernel_clock_scope_sub_group ifdef::backend-html5[] -:opencl_c_ext_kernel_clock_scope_sub_group: pass:q[`\__opencl_c_ext_kernel_clock_scope_sub_group`] +:opencl_c_kernel_clock_scope_sub_group: pass:q[`\__opencl_c_kernel_clock_scope_sub_group`] endif::[] ifndef::backend-html5[] -:opencl_c_ext_kernel_clock_scope_sub_group: pass:q[`\__opencl_c_​ext_​kernel_​clock_​scope_​sub_​group`] +:opencl_c_kernel_clock_scope_sub_group: pass:q[`\__opencl_c_​kernel_​clock_​scope_​sub_​group`] endif::[] diff --git a/env/extensions.asciidoc b/env/extensions.asciidoc index df534ab1..07bc5615 100644 --- a/env/extensions.asciidoc +++ b/env/extensions.asciidoc @@ -383,11 +383,17 @@ Otherwise, for the *GroupUniformArithmeticKHR* scan and reduction instructions, If the OpenCL environment supports the extension `cl_khr_kernel_clock`, then the environment must accept modules that declare use of the extension `SPV_KHR_shader_clock` via *OpExtension*. -If the OpenCL environment supports the extension `cl_khr_kernel_clock` and use of the SPIR-V extension `SPV_KHR_shader_clock` is declared in the module via *OpExtension*, then the environment must accept modules that declare the following SPIR-V capabilities: +If the OpenCL environment supports the extension `cl_khr_kernel_clock` and use of the SPIR-V extension `SPV_KHR_shader_clock` is declared in the module via *OpExtension*, then the environment must accept modules that declare the following SPIR-V capability: * *ShaderClockKHR* -// TODO: describe when each Scope is valid for instructions requiring these capabilities? +For the *OpReadClockKHR* instruction requiring this capability, supported values for _Scope_ are: + +* *Device*, if `CL_DEVICE_KERNEL_CLOCK_SCOPE_DEVICE_KHR` is supported +* *Workgroup*, if `CL_DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP_KHR` is supported +* *Subgroup*, if `CL_DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP_KHR` is supported + +For unsupported _Scope_ values, the behavior of *OpReadClockKHR* is undefined. === Embedded Profile Extensions diff --git a/xml/cl.xml b/xml/cl.xml index 4b0535da..b0b12e00 100644 --- a/xml/cl.xml +++ b/xml/cl.xml @@ -7459,7 +7459,7 @@ server's OpenCL/api-docs repository. - +