Skip to content

[libc] Remove old RPC host call extension for GPU #120800

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
Dec 21, 2024

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Dec 20, 2024

Summary:
This was originally a hacked together function that served to just
implement some features for OpenMP. That has been moved into OpenMP
itself now that we have exported RPC properly. This can now be deleted.

Summary:
This was originally a hacked together function that served to just
implement some features for OpenMP. That has been moved into OpenMP
itself now that we have exported RPC properly. This can now be deleted.
@llvmbot
Copy link
Member

llvmbot commented Dec 20, 2024

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

Summary:
This was originally a hacked together function that served to just
implement some features for OpenMP. That has been moved into OpenMP
itself now that we have exported RPC properly. This can now be deleted.


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

6 Files Affected:

  • (modified) libc/config/gpu/entrypoints.txt (-3)
  • (modified) libc/config/gpu/headers.txt (-3)
  • (removed) libc/hdrgen/yaml/gpu/rpc.yaml (-23)
  • (modified) libc/include/CMakeLists.txt (-13)
  • (removed) libc/include/gpu/rpc.h.def (-18)
  • (modified) libc/src/__support/RPC/CMakeLists.txt (-1)
diff --git a/libc/config/gpu/entrypoints.txt b/libc/config/gpu/entrypoints.txt
index 28317c656d4be4..b008e0e6684fdd 100644
--- a/libc/config/gpu/entrypoints.txt
+++ b/libc/config/gpu/entrypoints.txt
@@ -271,9 +271,6 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.locale.newlocale
     libc.src.locale.setlocale
     libc.src.locale.uselocale
-
-    # gpu/rpc.h entrypoints
-    libc.src.gpu.rpc_host_call
 )
 
 set(TARGET_LIBM_ENTRYPOINTS
diff --git a/libc/config/gpu/headers.txt b/libc/config/gpu/headers.txt
index adbd014fba6c18..fa8ad7c11ba8b1 100644
--- a/libc/config/gpu/headers.txt
+++ b/libc/config/gpu/headers.txt
@@ -18,7 +18,4 @@ set(TARGET_PUBLIC_HEADERS
     libc.include.uchar
     libc.include.features
     libc.include.locale
-
-    # Header for RPC extensions
-    libc.include.gpu_rpc
 )
diff --git a/libc/hdrgen/yaml/gpu/rpc.yaml b/libc/hdrgen/yaml/gpu/rpc.yaml
deleted file mode 100644
index da4f6afb7856d2..00000000000000
--- a/libc/hdrgen/yaml/gpu/rpc.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-header: gpu-rpc.h
-macros: []
-types: []
-enums: []
-objects: []
-functions:
-  - name: rpc_fprintf
-    standards:
-      - GPUExtensions
-    return_type: int
-    arguments:
-      - type: ::FILE *__restrict
-      - type: const char *__restrict
-      - type: void *
-      - type: size_t
-  - name: rpc_host_call
-    standards:
-      - GPUExtensions
-    return_type: unsigned long long
-    arguments:
-      - type: void *
-      - type: void *
-      - type: size_t
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index 18ce8e22d1a0ac..3a05c01abba5a4 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -750,19 +750,6 @@ add_header_macro(
     .llvm-libc-types.struct_lconv
 )
 
-if(LIBC_TARGET_OS_IS_GPU)
-  file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/gpu)
-
-  add_header_macro(
-    gpu_rpc
-    ../libc/hdrgen/yaml/gpu/rpc.yaml
-    gpu/rpc.h.def
-    gpu/rpc.h
-    DEPENDS
-      .llvm_libc_common_h
-  )
-endif()
-
 if(NOT LLVM_LIBC_FULL_BUILD)
   # We don't install headers in non-fullbuild mode.
   return()
diff --git a/libc/include/gpu/rpc.h.def b/libc/include/gpu/rpc.h.def
deleted file mode 100644
index 060650345e1fb1..00000000000000
--- a/libc/include/gpu/rpc.h.def
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- GPU header rpc.h --------------------------------------------------===//
-//
-// 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_GPU_RPC_H
-#define LLVM_LIBC_GPU_RPC_H
-
-#include "__llvm-libc-common.h"
-
-#include "../llvm-libc-types/rpc_opcodes_t.h"
-
-%%public_api()
-
-#endif // LLVM_LIBC_GPU_RPC_H
diff --git a/libc/src/__support/RPC/CMakeLists.txt b/libc/src/__support/RPC/CMakeLists.txt
index 0a7141fb60bf03..cac9c4e05e3698 100644
--- a/libc/src/__support/RPC/CMakeLists.txt
+++ b/libc/src/__support/RPC/CMakeLists.txt
@@ -9,6 +9,5 @@ add_object_library(
   HDRS
     rpc_client.h
   DEPENDS
-    libc.include.gpu_rpc
     libc.src.__support.GPU.utils
 )

@jhuber6 jhuber6 merged commit 3bbd53c into llvm:main Dec 21, 2024
13 checks passed
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