eyalroz / cuda-api-wrappers

Thin, unified, C++-flavored wrappers for the CUDA APIs
BSD 3-Clause "New" or "Revised" License
785 stars 80 forks source link

Consider adding wrappers for the CUPTI library #177

Open eyalroz opened 4 years ago

eyalroz commented 4 years ago

CUDA offers a library named CUPTI - the CUDA Profiling Tools Interface:

CUPTI provides a set of APIs targeted at ISVs creating profilers and other performance optimization tools:

  • the Activity API,
  • the Callback API,
  • the Event API,
  • the Metric API, and
  • the Profiler API

Using these CUPTI APIs, independent software developers can create profiling tools etc. etc.

Documentation for CUPTI can be found here.

Seeing how we already exceed the scope of the runtime API with profiling-related wrappers (see also #176 ), so it might make sense to also go in this direction.

neoblizz commented 4 years ago

Not in a literal wrappers around the API sense, but I have worked on a library to support easy profiling of metrics and events within C++: https://github.com/neoblizz/cupti-plus-plus (work-in-progress).

Maybe this how it can eventually look like, because the individual APIs are not extremely useful or intuitive, but you can build a pretty neat profiler API interface using them.

eyalroz commented 4 years ago

@neoblizz : I've actually noticed that. But - I would start with wrapping the API, then decide how far "up tha abstraction ladder" it makes sense to go.