[libc-commits] [libc] [libc] Remove more libc dependencies from the RPC header (PR #116437)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Fri Nov 15 16:00:32 PST 2024


================
@@ -10,20 +10,16 @@
 #define LLVM_LIBC_SRC___SUPPORT_RPC_RPC_UTIL_H
 
 #include "src/__support/CPP/type_traits.h"
-#include "src/__support/GPU/utils.h"
 #include "src/__support/macros/attributes.h"
 #include "src/__support/macros/config.h"
-#include "src/__support/macros/properties/architectures.h"
 #include "src/__support/threads/sleep.h"
-#include "src/string/memory_utils/generic/byte_per_byte.h"
-#include "src/string/memory_utils/inline_memcpy.h"
 
 namespace LIBC_NAMESPACE_DECL {
 namespace rpc {
 
 /// Conditional to indicate if this process is running on the GPU.
 LIBC_INLINE constexpr bool is_process_gpu() {
-#if defined(LIBC_TARGET_ARCH_IS_GPU)
+#if defined(__NVPTX__) || defined(__AMDGPU__)
----------------
michaelrj-google wrote:

would it make sense to have a `gpu_common.h` public header where you could define `LIBC_TARGET_ARCH_IS_GPU`?

https://github.com/llvm/llvm-project/pull/116437


More information about the libc-commits mailing list