[FEA]: Improve `cuda::std::format_to` codegen
Open
libcu++
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
The current `` implementation generates a lot of code on device with very long `ptxas` times. We need to investigate what is happening and how we can reduce the code bloat.
A simple example like:
```cpp
char buffer[128]{};
cuda::std::format_to(buffer, "{} {}!", "Hello", "world");
printf("%s", buffer);
```
generates [~1.6k x86 instructions on host](https://godbolt.org/z/TnE3v6fvP) (gcc 16.1, `-O3`), but [~80k SASS instructions on sm120](https://godbolt.org/z/834nbjess) (nvcc 13.3, doesn't even compile on godbolt).
Contributor guide
Assessment
This issue has not been assessed yet.