summaryrefslogtreecommitdiff
path: root/libc/test
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-04-20 11:16:01 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-04-24 15:47:53 -0500
commit50445dff43037014a23eb38b1f50bb698e64ffcf (patch)
treeb44aeeb6b16e717993efdb2a6170ede2030fd906 /libc/test
parent5084ba395e487adee67ba38cc5c68ff7e052e37c (diff)
downloadllvm-50445dff43037014a23eb38b1f50bb698e64ffcf.tar.gz
[libc] Add more utility functions for the GPU
This patch adds extra intrinsics for the GPU. Some of these are unused for now but will be used later. We use these currently to update the `RPC` handling. Currently, every thread can update the RPC client, which isn't correct. This patch adds code neccesary to allow a single thread to perfrom the write while the others wait. Feedback is welcome for the naming of these functions. I'm copying the OpenMP nomenclature where we call an AMD `wavefront` or NVIDIA `warp` a `lane`. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D148810
Diffstat (limited to 'libc/test')
-rw-r--r--libc/test/integration/startup/gpu/rpc_test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/test/integration/startup/gpu/rpc_test.cpp b/libc/test/integration/startup/gpu/rpc_test.cpp
index 0d3f13718d59..0b23ee37f998 100644
--- a/libc/test/integration/startup/gpu/rpc_test.cpp
+++ b/libc/test/integration/startup/gpu/rpc_test.cpp
@@ -13,7 +13,7 @@
using namespace __llvm_libc;
static void test_add_simple() {
- uint32_t num_additions = 1000 + 10 * get_block_id_x();
+ uint32_t num_additions = 1000 + 10 * gpu::get_block_id_x();
uint64_t cnt = 0;
for (uint32_t i = 0; i < num_additions; ++i) {
rpc::Port port = rpc::client.open(rpc::TEST_INCREMENT);