History log of /llvm-project/libc/src/stdio/generic/vfprintf.cpp (Results 1 – 1 of 1)
Revision Date Author Comments
# 40effc7a 13-Jul-2024 Joseph Huber <huberjn@outlook.com>

[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

[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.

show more ...