Repository navigation
[profiler] add opt-in Cuspy profiling backend - #5525
Conversation
[ghstack-poisoned]
[ghstack-poisoned]
There was a problem hiding this comment.
I feel we should put this file as torchtitan/observability/README.md, at least the profiling sections.
|
@claude review |
|
Claude finished @tianyu-l's task in 1m 18s —— View job Review: [profiler] add opt-in Cuspy profiling backend
Overall the PR is clean. It's opt-in, and with Worth addressing
Minor
Docs
Tests
I didn't run the tests or the linter. My tool permissions in this job blocked running Python, so I couldn't inspect the installed torch's |
[ghstack-poisoned]
Profiler.Config.cuspy switches CUDA activity collection from Kineto to Cuspy (PM sampling, environment counters, sync events, graph dependencies, event-node ids, and optional Perfetto protobuf output). Profiler startup raises a ValueError if torch or libcupti lacks Cuspy support. The profiling docs (memory snapshots, and the new Cuspy section) move from docs/debugging.md to torchtitan/observability/README.md, next to the code. ghstack-source-id: 77117d8 Pull Request resolved: pytorch/torchtitan#5525
Stack from ghstack (oldest at bottom):
Profiler.Config.cuspy switches CUDA activity collection from Kineto to Cuspy
(PM sampling, environment counters, sync events, graph dependencies, event-node
ids, and optional Perfetto protobuf output). Profiler startup raises a
ValueError if torch or libcupti lacks Cuspy support.
With CUDA graphs on, kernels replayed from graphs do not carry annotations in
the Cuspy trace yet; the next PR in the stack captures graphs with a CUPTI
annotation config to fix that.