[all-commits] [llvm/llvm-project] 219355: [Libomptarget] Use scoped atomics in the device ru...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Dec 19 12:30:48 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 219355d4c0d2b6e2c0d5e022f8b7a78c1e9ce53f
      https://github.com/llvm/llvm-project/commit/219355d4c0d2b6e2c0d5e022f8b7a78c1e9ce53f
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2023-12-19 (Tue, 19 Dec 2023)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/src/Synchronization.cpp

  Log Message:
  -----------
  [Libomptarget] Use scoped atomics in the device runtime (#75834)

Summary:
A recent patch allowed us to easily replace GNU atomics with scoped
variants that make use of the backend's handling for more permissive
scopes. The default is full "system" scope, that means the atomic
operation must be consistent with operations that may happen on the
host's memory. This is generally only required for processes that are
communicating with something via global fine-grained memory. This patch
uses these atomics to make everything device scoped, as nothing in the
OpenMP runtime should depend on the host.

This is only provided as a very new clang extension but the DeviceRTL is
only compiled with clang so it is always available.




More information about the All-commits mailing list