Skip to content

[libc] Remove leftover 'gpu/' source directory #122368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Jan 9, 2025

Summary:
This isn't used anymore, I moved the GPU extensions into offload/.

Summary:
This isn't used anymore, I moved the GPU extensions into `offload/`.
@llvmbot
Copy link
Member

llvmbot commented Jan 9, 2025

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

Summary:
This isn't used anymore, I moved the GPU extensions into offload/.


Full diff: https://github.com/llvm/llvm-project/pull/122368.diff

4 Files Affected:

  • (modified) libc/src/CMakeLists.txt (-4)
  • (removed) libc/src/gpu/CMakeLists.txt (-10)
  • (removed) libc/src/gpu/rpc_host_call.cpp (-35)
  • (removed) libc/src/gpu/rpc_host_call.h (-21)
diff --git a/libc/src/CMakeLists.txt b/libc/src/CMakeLists.txt
index 9fc331ad18a391..32308ba147940c 100644
--- a/libc/src/CMakeLists.txt
+++ b/libc/src/CMakeLists.txt
@@ -26,10 +26,6 @@ if(${LIBC_TARGET_OS} STREQUAL "linux")
   add_subdirectory(unistd)
 endif()
 
-if(${LIBC_TARGET_OS} STREQUAL "gpu")
-  add_subdirectory(gpu)
-endif()
-
 if(NOT LLVM_LIBC_FULL_BUILD)
   return()
 endif()
diff --git a/libc/src/gpu/CMakeLists.txt b/libc/src/gpu/CMakeLists.txt
deleted file mode 100644
index e20228516b5112..00000000000000
--- a/libc/src/gpu/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-add_entrypoint_object(
-  rpc_host_call
-  SRCS
-    rpc_host_call.cpp
-  HDRS
-    rpc_host_call.h
-  DEPENDS
-    libc.src.__support.RPC.rpc_client
-    libc.src.__support.GPU.utils
-)
diff --git a/libc/src/gpu/rpc_host_call.cpp b/libc/src/gpu/rpc_host_call.cpp
deleted file mode 100644
index 676031d16e1540..00000000000000
--- a/libc/src/gpu/rpc_host_call.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//===---------- GPU implementation of the external RPC call function ------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/gpu/rpc_host_call.h"
-
-#include "src/__support/GPU/utils.h"
-#include "src/__support/RPC/rpc_client.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-// This calls the associated function pointer on the RPC server with the given
-// arguments. We expect that the pointer here is a valid pointer on the server.
-LLVM_LIBC_FUNCTION(unsigned long long, rpc_host_call,
-                   (void *fn, void *data, size_t size)) {
-  rpc::Client::Port port = rpc::client.open<LIBC_HOST_CALL>();
-  port.send_n(data, size);
-  port.send([=](rpc::Buffer *buffer, uint32_t) {
-    buffer->data[0] = reinterpret_cast<uintptr_t>(fn);
-  });
-  unsigned long long ret;
-  port.recv([&](rpc::Buffer *buffer, uint32_t) {
-    ret = static_cast<unsigned long long>(buffer->data[0]);
-  });
-  port.close();
-  return ret;
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/gpu/rpc_host_call.h b/libc/src/gpu/rpc_host_call.h
deleted file mode 100644
index 861149dead561e..00000000000000
--- a/libc/src/gpu/rpc_host_call.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation header for RPC functions -----------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_GPU_RPC_HOST_CALL_H
-#define LLVM_LIBC_SRC_GPU_RPC_HOST_CALL_H
-
-#include "src/__support/macros/config.h"
-#include <stddef.h> // size_t
-
-namespace LIBC_NAMESPACE_DECL {
-
-unsigned long long rpc_host_call(void *fn, void *buffer, size_t size);
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_GPU_RPC_HOST_CALL_H

@jhuber6 jhuber6 merged commit 0acdba8 into llvm:main Jan 9, 2025
11 of 12 checks passed
BaiXilin pushed a commit to BaiXilin/llvm-fix-vnni-instr-types that referenced this pull request Jan 12, 2025
Summary:
This isn't used anymore, I moved the GPU extensions into `offload/`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants