summaryrefslogtreecommitdiff
path: root/libc/utils/gpu
diff options
context:
space:
mode:
authorMichael Kruse <llvm-project@meinersbur.de>2025-01-03 10:22:51 +0100
committerMichael Kruse <llvm-project@meinersbur.de>2025-01-03 10:22:51 +0100
commit38500d63e14ce340236840f60d356cdefb56a52c (patch)
tree17edbec446ce9b50d2f215a483b83afb293a635d /libc/utils/gpu
parent1a3d5daaef7a6a63448a497da3eff7fc9e23df26 (diff)
parent27f30029741ecf023baece7b3dde1ff9011ffefc (diff)
Merge branch 'main' into users/meinersbur/flang_runtime_split-headersusers/meinersbur/flang_runtime_split-headers
Diffstat (limited to 'libc/utils/gpu')
-rw-r--r--libc/utils/gpu/loader/Loader.h4
-rw-r--r--libc/utils/gpu/server/CMakeLists.txt5
-rw-r--r--libc/utils/gpu/server/rpc_server.cpp6
3 files changed, 10 insertions, 5 deletions
diff --git a/libc/utils/gpu/loader/Loader.h b/libc/utils/gpu/loader/Loader.h
index 0d683832855e..8e86f6396932 100644
--- a/libc/utils/gpu/loader/Loader.h
+++ b/libc/utils/gpu/loader/Loader.h
@@ -113,7 +113,7 @@ inline uint32_t handle_server(rpc::Server &server, uint32_t index,
return 0;
index = port->get_index() + 1;
- int status = rpc::SUCCESS;
+ int status = rpc::RPC_SUCCESS;
switch (port->get_opcode()) {
case RPC_TEST_INCREMENT: {
port->recv_and_send([](rpc::Buffer *buffer, uint32_t) {
@@ -186,7 +186,7 @@ inline uint32_t handle_server(rpc::Server &server, uint32_t index,
}
// Handle all of the `libc` specific opcodes.
- if (status != rpc::SUCCESS)
+ if (status != rpc::RPC_SUCCESS)
handle_error("Error handling RPC server");
port->close();
diff --git a/libc/utils/gpu/server/CMakeLists.txt b/libc/utils/gpu/server/CMakeLists.txt
index b1cada44cd32..a109d603318b 100644
--- a/libc/utils/gpu/server/CMakeLists.txt
+++ b/libc/utils/gpu/server/CMakeLists.txt
@@ -23,6 +23,11 @@ target_compile_definitions(llvmlibc_rpc_server PUBLIC
LIBC_NAMESPACE=${LIBC_NAMESPACE})
# Install the server and associated header.
+install(FILES ${LIBC_SOURCE_DIR}/shared/rpc.h
+ ${LIBC_SOURCE_DIR}/shared/rpc_util.h
+ ${LIBC_SOURCE_DIR}/shared/rpc_opcodes.h
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/shared
+ COMPONENT libc-headers)
install(TARGETS llvmlibc_rpc_server
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}"
COMPONENT libc)
diff --git a/libc/utils/gpu/server/rpc_server.cpp b/libc/utils/gpu/server/rpc_server.cpp
index f724c5c82c42..1faee531fa20 100644
--- a/libc/utils/gpu/server/rpc_server.cpp
+++ b/libc/utils/gpu/server/rpc_server.cpp
@@ -437,10 +437,10 @@ rpc::Status handle_port_impl(rpc::Server::Port &port) {
break;
}
default:
- return rpc::UNHANDLED_OPCODE;
+ return rpc::RPC_UNHANDLED_OPCODE;
}
- return rpc::SUCCESS;
+ return rpc::RPC_SUCCESS;
}
namespace rpc {
@@ -455,7 +455,7 @@ rpc::Status handle_libc_opcodes(rpc::Server::Port &port, uint32_t num_lanes) {
case 64:
return handle_port_impl<64>(port);
default:
- return rpc::ERROR;
+ return rpc::RPC_ERROR;
}
}
} // namespace rpc