This is an archive of the discontinued LLVM Phabricator instance.

[libc] Implement a generic streaming interface in the RPC
ClosedPublic

Authored by jhuber6 on May 11 2023, 9:13 AM.

Details

Summary

Currently we provide the send_n and recv_n functions. These were
somewhat divergent and not tested on the GPU. This patch changes the
support to be more common. We do this my making the CPU provide an array
equal the to at least the lane size while the GPU can rely on the
private memory address of its stack variables. This allows us to send
data back and forth generically.

Diff Detail

Event Timeline

jhuber6 created this revision.May 11 2023, 9:13 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 11 2023, 9:13 AM
jhuber6 requested review of this revision.May 11 2023, 9:13 AM

How does deallocation happen here? I see the lambda using malloc on one path and new on another, but can't find a corresponding free for one of them

How does deallocation happen here? I see the lambda using malloc on one path and new on another, but can't find a corresponding free for one of them

The server does a delete []. The malloc on the GPU is currently a bump pointer so free is a no-op.

JonChesterfield accepted this revision.May 11 2023, 9:38 AM
This revision is now accepted and ready to land.May 11 2023, 9:38 AM
This revision was automatically updated to reflect the committed changes.