tp: Add GpuCorrelation TrackEvent extension for host-GPU linking#5425
tp: Add GpuCorrelation TrackEvent extension for host-GPU linking#5425
Conversation
🎨 Perfetto UI Builds
|
|
@LalitMaganti I switched to using an extension for the second part of the GPU correlation that requires track event integration. I can think of at least one more immediate use-case of this extension; tagging track events as representing GPU API calls. E.g. a cudaLaunchKernel track event can be tagged with Api::CUDA in a similar way as how we tag render stages. |
|
I'm going to defer this to Primiano since he's been thinking a lot about TrackEvent extensions and about whether this makes sense. |
primiano
left a comment
There was a problem hiding this comment.
I'm going to defer this to Primiano since he's been thinking a lot about TrackEvent extensions and about whether this makes sense.
I didn't look at the c++ code that does the parsing in TP, but I assume the question for me is about the proto / track event extension.
I am positive about it. in hindsight this is the way we should deal with all these track event extensions, and leave the inline ones only for core types that everybody should be able to see in the SDK
@LalitMaganti can you PTAL to the trace processor part?
Add a GpuCorrelation TrackEvent extension (field 3000) that allows host-side track events to declare correlations with GPU render stage events: - render_stage_submission_event_ids: correlates this slice with the GPU render stage events it submitted (e.g. cudaLaunchKernel). - render_stage_wait_event_ids: indicates this slice waited on the specified GPU render stage events to complete (e.g. cudaMemcpy). The extension is defined in gpu_track_event.proto using the perfetto_gpu allocation (3000-3099) in track_event_extensions.json. The trace processor loads the extension descriptor and creates flow arrows between the correlated slices via GpuTracker.
5ee2d74 to
3f272c9
Compare
Upstream Perfetto has a dependency on a new descriptor file, gpu_track_event.descriptor (introduced in google/perfetto#5425 and rolled into Chromium in https://chromium-review.git.corp.google.com/c/chromium/src/+/7762804). This CL adds the descriptor file's path to the `run_perfetto_diff_tests` command. PERFETTO_TESTS=Will pass once google/perfetto#5627 is rolled into Chromium Bug: 507066166 Change-Id: I245472f85174430f659f39a55ddc6d14d32c8736 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7799735 Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org> Auto-Submit: Petr Cermak <petrcermak@chromium.org> Commit-Queue: Petr Cermak <petrcermak@chromium.org> Cr-Commit-Position: refs/heads/main@{#1621845}
Add a GpuCorrelation TrackEvent extension (field 3000) that allows host-side track events to declare correlations with GPU render stage events:
The extension is defined in gpu_track_event.proto using the perfetto_gpu allocation (3000-3099) in track_event_extensions.json. The trace processor loads the extension descriptor and creates flow arrows between the correlated slices via GpuTracker.