[libc-commits] [PATCH] D148943: [libc] Enable multiple threads to use RPC on the GPU

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Apr 28 06:42:17 PDT 2023


jhuber6 added a comment.

In D148943#4305191 <https://reviews.llvm.org/D148943#4305191>, @JonChesterfield wrote:

> What's the reasoning behind the placement of sync_lanecalls? If it's meant to be one per basic block some are missing. The comment says it's added to close but the code has more calls than that.
>
> If it's an amdgpu specific hack it should probably be named based on that and excluded on nvptx. Currently it reads like nvptx picks up a lot of synchronisation it doesn't need.

So, the convergence problem was present on Nvidia as well, it's just that its hardware model prevented it from deadlocking so it instead serialized the entire region. Right now we have a `sync_lane` in front of the open and the close mostly for safety to enforce the expected convergence of these operations. e.g. every thread that opens the port should close the port as well in the same operation. The last sync is definitely necessary on the `send_n` call because the threads could copy variable amounts of data.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148943/new/

https://reviews.llvm.org/D148943



More information about the libc-commits mailing list