KhronosGroup / KhronosGroup/OpenCL-Docs
SPIR-V: Required Scope for WorkgroupMemory Atomics?
- Dominant language
- Python
- Stars
- 420
- Forks
- 131
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 11
Description
I found this issue addressing a review comment in #84.
Currently, in the SPIR-V environment specification section [7.2.8,](https://www.khronos.org/registry/OpenCL/specs/2.2/html/OpenCL_Env.html#opencl_extensions) when describing behavior when the extensions `cl_khr_in64_base_atomics` and `cl_khr_int64_extended_atomics` are supported, there is the line:
> When the **WorkgroupMemory** *Memory Semantic* is used the *Scope* must be **Workgroup**.
However, we don't include any similar validation rule for non-64-bit atomics. Should we?
Regardless, I think this should be described as a common validation rule, and not tied specifically to the 64-bit atomics extensions.
For reference, the [OpenCL C spec ](https://www.khronos.org/registry/OpenCL/specs/2.2/html/OpenCL_C.html#atomic-functions) says:
> Atomic operations to `local` memory only guarantee memory ordering in the work-group not across work-groups and therefore ignore the `memory_scope` value.
Contributor guide
Research direction
Start by reviewing SPIR-V environment specification section 7.2.8 and the referenced OpenCL C atomic-functions section, then compare the existing 64-bit atomic validation rule with non-64-bit atomics. Done means the scope requirement is resolved and, if applicable, documented as a common validation rule rather than only under the 64-bit extensions.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100