[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-09-23 Thread Yang Haonan via Phabricator via cfe-commits
haonanya added inline comments. Comment at: clang/lib/Headers/opencl-c.h:13379 +uint __ovld atomic_fetch_xor(volatile __global atomic_uint *object, uint operand); +uint __ovld atomic_fetch_xor(volatile __local atomic_uint *object, uint operand);i +int __ovld

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-30 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov added a comment. @airlied, can you please fix that to something like here https://godbolt.org/z/3Kbso8ca3? What currently we do have with your patch is that generic address space overload is always selected, but more strict overloading always exist in OpenCL C 3.0

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-29 Thread Dave Airlie via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3c7d2f1b67d1: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics (authored by airlied). Repository: rG LLVM Github Monorepo

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-29 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov added inline comments. Comment at: clang/lib/Headers/opencl-c.h:13303 #endif +#elif __OPENCL_C_VERSION__ >= CL_VERSION_3_0 +void __ovld atomic_init(volatile __global atomic_int *object, int value); Sorry, I overlooked that. Not //elif//, just //if//

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106778/new/ https://reviews.llvm.org/D106778

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-28 Thread Dave Airlie via Phabricator via cfe-commits
airlied added inline comments. Comment at: clang/lib/Headers/opencl-c.h:13678 +uintptr_t __ovld atomic_fetch_sub_explicit(volatile __local atomic_uintptr_t *object, ptrdiff_t operand, memory_order order, memory_scope scope); +#endif +#endif Anastasia wrote: >

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-28 Thread Dave Airlie via Phabricator via cfe-commits
airlied updated this revision to Diff 362587. airlied added a comment. added comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106778/new/ https://reviews.llvm.org/D106778 Files: clang/lib/Headers/opencl-c.h Index:

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Headers/opencl-c.h:13678 +uintptr_t __ovld atomic_fetch_sub_explicit(volatile __local atomic_uintptr_t *object, ptrdiff_t operand, memory_order order, memory_scope scope); +#endif +#endif airlied wrote: >

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-28 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov added inline comments. Comment at: clang/lib/Headers/opencl-c.h:13304 +#else +void __ovld atomic_init(volatile __global atomic_int *object, int value); +void __ovld atomic_init(volatile __local atomic_int *object, int value); These new atomics with

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-27 Thread Dave Airlie via Phabricator via cfe-commits
airlied added a comment. In D106778#2904509 , @Anastasia wrote: > Generally LGTM, but I think we should guard the `else` blocks with > CL_VERSION_2_0 or higher to avoid exposing the functions in earlier standards > because the spec says: > > The C11

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-27 Thread Dave Airlie via Phabricator via cfe-commits
airlied added a comment. In D106778#2904509 , @Anastasia wrote: > Generally LGTM, but I think we should guard the `else` blocks with > CL_VERSION_2_0 or higher to avoid exposing the functions in earlier standards > because the spec says: > > The C11

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Generally LGTM, but I think we should guard the `else` blocks with CL_VERSION_2_0 or higher to avoid exposing the functions in earlier standards because the spec says: The C11 style atomic functions in this sub-section require support for OpenCL 2.0 or newer.

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-25 Thread Dave Airlie via Phabricator via cfe-commits
airlied created this revision. airlied added a project: clang. Herald added subscribers: ldrumm, jfb, Anastasia, yaxunl. airlied requested review of this revision. Herald added a subscriber: cfe-commits. CL 2.0 interdocued atomics and generic address space so there were only one set of APIs for