-
Notifications
You must be signed in to change notification settings - Fork 664
[OpenCL validation] Atomic instructions #2595
Copy link
Copy link
Open
Labels
Milestone
Description
Common validation rules
For all Atomic Instructions:
- Only 32-bit integer types are supported for the Result Type and/or type of Value except when the Int64Atomics capability is declared. In that case 64-bit integers are allowed as well.
- The Pointer operand must be a pointer to the Function, Workgroup or CrossWorkGroup
storage classes. Note that an Atomic Instruction on a pointer to the Function Storage Class
is valid, but does not have defined behavior. - When the WorkgroupMemory Memory Semantic is used the Scope must be Workgroup. See SPIR-V: Required Scope for WorkgroupMemory Atomics? OpenCL-Docs#88.
OpenCL 2.2/2.1/2.0
- The Pointer operand to all Atomic Instructions may additionally be a pointer to the Generic
Storage Class, however behavior is still undefined if the Generic pointer represents a pointer to the
Function Storage Class.
OpenCL 1.2
- For the Atomic Instructions, the Scope must be Device, and the Memory Semantics must be
Relaxed.
Reactions are currently unavailable