summaryrefslogtreecommitdiff
path: root/libc/test/integration/startup/gpu/rpc_interface_test.cpp
AgeCommit message (Collapse)Author
2025-09-22[libc] Remove separate RPC test handling (#160206)Joseph Huber
Summary: This was originally kept separate so it didn't pollute the name space, but now I'm thinking it's just easier to bundle it in with the default interface. This means that we'll have a bit of extra code for people using the server.h file to handle libc opcodes, but it's minimal (3 functions) and it simplifies this. I'm doing this because I'm hoping to move the GPU tester binary to liboffload which handles `libc` opcodes internally except these. This is the easier option compared to adding a hook to register custom handlers there.
2024-11-22[libc] Move RPC interface to `libc/shared` to export it (#117034)Joseph Huber
Summary: Previous patches have made the `rpc.h` header independent of the `libc` internals. This allows us to include it directly rather than providing an indirect C API. This patch only does the work to move the header. A future patch will pull out the `rpc_server` interface and simply replace it with a single function that handles the opcodes.
2024-10-15[libc] Fix incorrect RPC usage in testsJoseph Huber
2024-02-29[libc] Revert https://github.com/llvm/llvm-project/pull/83199 since it broke ↵lntue
Fuchsia. (#83374) With some header fix forward for GPU builds.
2024-02-27[libc] Add "include/" to the LLVM include directories (#83199)Joseph Huber
Summary: Recent changes added an include path in the float128 type that used the internal `libc` path to find the macro. This doesn't work once it's installed because we need to search from the root of the install dir. This patch adds "include/" to the include path so that our inclusion of installed headers always match the internal use.
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet
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-21[libc] Remove test RPC opcodes from the exported headerJoseph Huber
This patch does the noisy work of removing the test opcodes from the exported interface to an interface that is only visible in `libc`. The benefit of this is that we both test the exported RPC registration more directly, and we do not need to give this interface to users. I have decided to export any opcode that is not a "core" libc feature as having its MSB set in the opcode. We can think of these as non-libc "extensions". Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D154848
2023-06-15[libc] Export GPU extensions to `libc` for external useJoseph Huber
The GPU port of the LLVM C library needs to export a few extensions to the interface such that users can interface with it. This patch adds the necessary logic to define a GPU extension. Currently, this only exports a `rpc_reset_client` function. This allows us to use the server in D147054 to set up the RPC interface outside of `libc`. Depends on https://reviews.llvm.org/D147054 Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D152283
2023-05-10[libc] Fix RPC interface when sending and recieving aribtrary packetsJoseph Huber
The interface exported by the RPC library allows users to simply send and recieve fixed sized packets without worrying about the data motion underneath. However, this was broken in the current implementation. We can think of the send and recieve implementations in terms of waiting for ownership of the buffer, using the buffer, and posting ownership to the other side. Our implementation of `recv` was incorrect in the following scenarios. recv -> send // we still own the buffer and should give away ownership recv -> close // The other side is not waiting for data, this will result in multiple openings of the same port This patch attempts to fix this with an admittedly hacky fix where we track if the previous implementation was a recv and post conditionally. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D150327