aboutsummaryrefslogtreecommitdiff
path: root/libc/src/gpu/rpc_host_call.cpp
AgeCommit message (Collapse)AuthorFilesLines
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet1-2/+2
This is step 4 of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
2023-07-19[libc][NFC] Move the RPC types to the `rpc_client.h` headerJoseph Huber1-1/+0
Summary: Simple cleanup of the interface so we do not depend on the installed headers and get everything we need just including rpc_client.h.
2023-07-19[libc] Add basic support for calling host functions from the GPUJoseph Huber1-0/+30
This patch adds the `rpc_host_call` function as a GPU extension. This is exported from the `libc` project to use the RPC interface to call a function pointer via RPC any copying the arguments by-value. The interface can only support a single void pointer argument much like pthreads. The function call here is the bare-bones version of what's required for OpenMP reverse offloading. Full support will require interfacing with the mapping table, nowait support, etc. I decided to test this interface in `libomptarget` as that will be the primary consumer and it would be more difficult to make a test in `libc` due to the testing infrastructure not really having a concept of the "host" as it runs directly on the GPU as if it were a CPU target. Reviewed By: jplehr Differential Revision: https://reviews.llvm.org/D155003