[all-commits] [llvm/llvm-project] 40effc: [libc] Implement (v|f)printf on the GPU (#96369)
Joseph Huber via All-commits
all-commits at lists.llvm.org
Fri Jul 12 17:36:35 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 40effc7af5679b7d54d3176a5eef2cdee1962ecd
https://github.com/llvm/llvm-project/commit/40effc7af5679b7d54d3176a5eef2cdee1962ecd
Author: Joseph Huber <huberjn at outlook.com>
Date: 2024-07-12 (Fri, 12 Jul 2024)
Changed paths:
M libc/config/gpu/entrypoints.txt
M libc/include/llvm-libc-types/rpc_opcodes_t.h
M libc/src/__support/arg_list.h
M libc/src/gpu/rpc_fprintf.cpp
M libc/src/stdio/CMakeLists.txt
R libc/src/stdio/fprintf.cpp
M libc/src/stdio/generic/CMakeLists.txt
A libc/src/stdio/generic/fprintf.cpp
A libc/src/stdio/generic/vfprintf.cpp
M libc/src/stdio/gpu/CMakeLists.txt
A libc/src/stdio/gpu/fprintf.cpp
A libc/src/stdio/gpu/printf.cpp
A libc/src/stdio/gpu/vfprintf.cpp
A libc/src/stdio/gpu/vfprintf_utils.h
A libc/src/stdio/gpu/vprintf.cpp
R libc/src/stdio/vfprintf.cpp
M libc/test/integration/src/stdio/gpu/CMakeLists.txt
R libc/test/integration/src/stdio/gpu/printf.cpp
A libc/test/integration/src/stdio/gpu/printf_test.cpp
M libc/test/src/stdio/CMakeLists.txt
M libc/utils/gpu/server/rpc_server.cpp
Log Message:
-----------
[libc] Implement (v|f)printf on the GPU (#96369)
Summary:
This patch implements the `printf` family of functions on the GPU using
the new variadic support. This patch adapts the old handling in the
`rpc_fprintf` placeholder, but adds an extra RPC call to get the size of
the buffer to copy. This prevents the GPU from needing to parse the
string. While it's theoretically possible for the pass to know the size
of the struct, it's prohibitively difficult to do while maintaining ABI
compatibility with NVIDIA's varargs.
Depends on https://github.com/llvm/llvm-project/pull/96015.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list