OpenCL Spec
The main OpenCL spec, stipulate that:
memory_scope_work_item: memory-ordering constraints only apply within the work-item [1].
And [1] said
1. This value for memory_scope can only be used with atomic_work_item_fence with flags set to CLK_IMAGE_MEM_FENCE.
So that it's clear, memory_scope_work_item can just be used for atomic_work_item_fence set to CLK_IMAGE_MEM_FENCE.
OpenCL SPIRV-V
On the other env OpenCL SPIR-V env said (https://registry.khronos.org/OpenCL/specs/2.2/html/OpenCL_Env.html#validation-rules)
Otherwise [after OpenCL 1.2], Scope for Memory must be one of:
- CrossDevice
- Device
- Workgroup
- Invocation
- Subgroup (OpenCL 2.1 and Newer)
Where the SPIRV spec define invocation as `A single execution of an entry point in a SPIR-V module [...] a single invocation operates only on a single work item
(naive) Question
Is this discrepancy expected / on purpose ?
Thanks
Was discovered by the SYCL WG here: KhronosGroup/SYCL-Docs#1004 (comment)
OpenCL Spec
The main OpenCL spec, stipulate that:
And [1] said
1. This value for memory_scope can only be used with atomic_work_item_fence with flags set to CLK_IMAGE_MEM_FENCE.
So that it's clear,
memory_scope_work_itemcan just be used foratomic_work_item_fenceset to CLK_IMAGE_MEM_FENCE.OpenCL SPIRV-V
On the other env OpenCL SPIR-V env said (https://registry.khronos.org/OpenCL/specs/2.2/html/OpenCL_Env.html#validation-rules)
Where the SPIRV spec define
invocationas `A single execution of an entry point in a SPIR-V module [...] a single invocation operates only on a single work item(naive) Question
Is this discrepancy expected / on purpose ?
Thanks
Was discovered by the SYCL WG here: KhronosGroup/SYCL-Docs#1004 (comment)