[clang] [libc] [llvm] [libc] Implement (v|f)printf on the GPU (PR #96369)

Michael Jones via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 10:04:57 PDT 2024


================
@@ -0,0 +1,73 @@
+//===--- GPU helper functions for printf using RPC ------------------------===//
+//
+// 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/__support/RPC/rpc_client.h"
+#include "src/__support/arg_list.h"
+#include "src/stdio/gpu/file.h"
+#include "src/string/string_utils.h"
+
+#include <stdio.h>
+
+namespace LIBC_NAMESPACE {
+namespace file {
----------------
michaelrj-google wrote:

nit: might make sense to make this something GPU related since `file::vfprintf_impl` is a bit ambiguous

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


More information about the llvm-commits mailing list