Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
singlethread scope is added for completeness for the atomicity considering signal handling. It may not be applicable to GPU yet. We could simply ignore them in the late phases of the compiler. If desired, I may remove it as well.
clang/include/clang/Basic/Builtins.def | ||
---|---|---|
849–856 | Should HIP also consider adding a hip_atomic_load and hip_atomic_store? | |
clang/lib/CodeGen/TargetInfo.cpp | ||
9096–9114 | The HIP memory model uses a single happens-before relation for all address spaces which is different to OpenCL. So these need to use the "*-one-as" names. Before committing this we should decide if we want to implement the OpenCL address space fence support using the syncScope, in which case we may want to adjust this name before we start using it. | |
clang/lib/Sema/SemaChecking.cpp | ||
4981 | Does HIP have atomic types for this to be meaningful? I would expect that HIP should be treated the same as OpenCL which does not appear to be here. |
clang/include/clang/Basic/Builtins.def | ||
---|---|---|
849–856 | What is being done for the memory fences? Does HIP have any interest in adding a memory order? | |
clang/lib/CodeGen/TargetInfo.cpp | ||
9096–9114 | Actually the other way round, OpenCL should be using the "*-one-as" names except for the seq_cst memory ordering which is all address spaces. |
opencl atomic builtins are documented as notes to __c11_atomic builtins part of https://clang.llvm.org/docs/LanguageExtensions.html#builtin-functions. These new atomic builtins can be documented in a similar way after that.
Hi Michael, would you like to continue working on this, or let someone from AMD to take over? Thanks.
Should HIP also consider adding a hip_atomic_load and hip_atomic_store?