[all-commits] [llvm/llvm-project] 694051: [libc] Simplify RPC lock handling to be scalar on ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Sep 8 05:15:20 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6940519208db433dfffc408392344245129e4050
      https://github.com/llvm/llvm-project/commit/6940519208db433dfffc408392344245129e4050
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M libc/shared/rpc.h

  Log Message:
  -----------
  [libc] Simplify RPC lock handling to be scalar on the GPU (#221805)

Summary:
This interface was originally written in a complicated way as a
pessimistic bet against NVIDIA's independent thread scheduling. The idea
was that it would work regardless of which set actually executed the
function. The problem is that this forces the operation to be an
expensive vector operation.

This should be safe, we already have other safeguards against ITS in the
main loop. When this function is called, we know that the index and lane
mask are convergent in the set. ITS says the true threads executing this
could be greater than returned. But in this case the 'locked' value
would not be shuffled in, it would not see that it got the lock, and
loop again in a different mask set.

The complicated thing about ITS is mostly that any lanes that share a PC
will report convergent, but that should not bite us here as we already
guard against that before calling this.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list