NVIDIA / NVTX

The NVIDIA® Tools Extension SDK (NVTX) is a C-based Application Programming Interface (API) for annotating events, code ranges, and resources in your applications.
Apache License 2.0
310 stars 48 forks source link

How to write an injection library? #104

Open martin-belanger opened 2 months ago

martin-belanger commented 2 months ago

Nvidia provides a lot of documentation on how to instrument code with NVTX. However, I have not seen any documentation (or examples) about writing a library to collect the data generated. I know that I could use nsys profile to look at the collected data. However, I would like to just collect specific data (ranges) and save it to a text file.

To be precise, I'm trying to collect statistics from NCCL (especially the type and size of data being processed). I know that NCCL is already instrumented with NVTX. And I would like to write a plugin for NCCL that can collect specific data. However, I have no idea what APIs need to be provided by the plugin and could not find any documentation about it.

Is there documentation or code examples that does that?