Integration of LibKineto CUpti Events and Metrics with PyTorch Profiler

Open
#973 5 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
performance

Research direction

Start by reading the referenced sections of libkineto/src/CuptiRangeProfiler.cpp and libkineto/src/EventProfiler.cpp, then inspect libkineto/test/EventProfilerTest.cpp. Determine and document whether PyTorch Profiler supports these events and metrics, their intended applications, and whether Chrome traces can include them; the test should clarify existing behavior.

Written by the indexing model from the issue text.

Description

Hi team,

It looks like LibKineto can enable GPU hardware counters (Events) and/or GPU Metrics, but the integration with PyTorch profiler is not clear for me. I can see the potential use of the CUDA metrics in kDerivedMetrics, in EventProfilerTest and its initialization in EventProfiler::initMetrics...

So my questions are:

  • Is there any documentation on how to use LibKineto CUpti events and metrics within the PyTorch profiler?
  • If integration with the PyTorch profiler isn’t the intended use case, what are the main applications for these metrics?
  • Can LibKineto produce Chrome traces that include GPU events and/or metrics?

I could not find examples of PyTorch profiler using GPU counter events, which suggests potential integration challenges. Clarifying these points would really help in understanding how to leverage LibKineto’s capabilities. Specially because I am trying to extend LibKineto to support metrics of a different AI hardware accelerator.

Dominant language
C++
Stars
992
Forks
270
Avg merge
2d 11h
Merged PRs (30d)
12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pytorch/kineto

All issues in pytorch/kineto

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.