[FEA]: Host-side logging system
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
### Is this a duplicate?
- [x] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this request and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)
### Area
General CCCL
### Is your feature request related to a problem? Please describe.
Today, math libraries such as cuBLAS, cuSolver, cuFFT, and others use a unified logging system (whose implementation is internal-only) that supports controls via both environment variables and APIs (both are documented and public-facing), allowing for in-memory and on-disk logging. It is very useful for debugging, performance tracking, rich error msgs, and algorithm selection transparency.
Host-side logging should not require recompilation to enable or disable, and the logging code should always be present in the binary with aforementioned runtime control. For header-only use cases, we could provide a macro to turn off the logging completely if desired.
(CCCL) Developer education for logging practices will be needed (ex: when to warn; "debug" vs "error"; ...)
Examples of valuable log include but are not limited to: tuning policy selection, input arguments (pointer addresses, sizes, types, ...), temporary memory allocations, memory resource usage, and stream addresses, which are not easily accessible through existing developer tools like Nsys or NCU.
### Describe the solution you'd like
_No response_
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.