summaryrefslogtreecommitdiff
path: root/libc/test/integration/startup/gpu/rpc_stream_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.
2025-06-06[libc] Missing include in RPC testJoseph Huber
2025-03-14[libc] Fix implicit conversion warnings in tests. (#131362)lntue
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-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-07-19[libc][NFC] Rename filesGuillaume Chatelet
This patch mostly renames files so it better reflects the function they declare. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D155607
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-23[libc] Fix the `send_n` and `recv_n` utilities under divergent lanesJoseph Huber
We provide the `send_n` and `recv_n` utilities as a generic way to stream data between both sides of the process. This was previously tested and performed as expected when using a string of constant size. However, when the size was allowed to diverge between the threads in the warp or wavefront this could deadlock. This did not occur on NVPTX because of the use of the explicit warp sync. However, on AMD one of the work items in the wavefront could continue executing and hit the next `recv` call before the other threads, then we would deadlock as we violated the RPC invariants. This patch replaces the for loop with a thread ballot. This will cause every thread in the warp or wavefront to continue executing the loop until all of them can exit. This acts as a more explicit wavefront sync. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D150992
2023-05-11[libc] Fix undeclared 'free' function in stream testJoseph Huber
Summary: We need this function from the test.cpp but need to declare it manually.
2023-05-11[libc] Implement a generic streaming interface in the RPCJoseph Huber
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. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D150379