Skip to content

Implementation of atomic_ref::load with memory_scope_work_item #1004

@VerenaBeckham

Description

@VerenaBeckham

Specification Version

SYCL 2020 (Revision 11)

Section Number(s)

4.15.3. Atomic references
(https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:atomic-references)

Issue Description

atomic_ref::load() accepts all memory scopes. In OpenCL this would map to atomic_load_explicit() AIUI, but that API is not allowed with a work_item scope. See OpenCL spec (https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_C.html#memory-scope):

memory_scope_work_item can only be used with atomic_work_item_fence with flags set to CLK_IMAGE_MEM_FENCE.

This I take to mean memory_scope_work_item is only allowed to be used by the fence API.

Are we saying atomic_ref::load() with memory_scope::work_item needs to be implemented in some other way? Or should it be restricted to match OpenCL (#665 seems to say otherwise)? Or should this be added to OpenCL?

Code Example (Optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions