Skip to content

Clarify "atomic_ref" with private address space#986

Open
gmlueck wants to merge 1 commit intoKhronosGroup:mainfrom
gmlueck:me/atomic-private
Open

Clarify "atomic_ref" with private address space#986
gmlueck wants to merge 1 commit intoKhronosGroup:mainfrom
gmlueck:me/atomic-private

Conversation

@gmlueck
Copy link
Contributor

@gmlueck gmlueck commented Mar 11, 2026

The spec was not clear about this before. The OpenCL SPIR-V environment specification says that atomic operations on objects in the private address space produce undefined behavior. Therefore, it seems sensible to make the same clarification in SYCL.

The spec was not clear about this before.  The OpenCL SPIR-V
environment specification says that atomic operations on objects in the
address space produce undefined behavior.  Therefore, it seems sensible
to make the same clarification in SYCL.
@gmlueck
Copy link
Contributor Author

gmlueck commented Mar 11, 2026

The relevant text from the OpenCL SPIR-V Environment spec is here:

For all Atomic Instructions:

  • Only 32-bit integer types are supported for the Result Type and/or type of Value.

  • 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.

  • For OpenCL environments that support and declare the GenericPointer capability, the Pointer operand may 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.

(https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_Env.html#validation-rules)

@bader
Copy link
Contributor

bader commented Mar 11, 2026

The OpenCL SPIR-V environment specification says that atomic operations on objects in the address space produce undefined behavior.

the address space -> the private address space?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants