Commit 29e09d3
committed
feat: render torch.profiler GPU profiles in the Flyte report
Add torch_profile() to flyteplugins-pytorch: a context manager (sync and
async) that runs torch.profiler over a region of a task body and renders
the result into a Flyte report tab — summary tiles, top-ops tables, and
an interactive Perfetto timeline (the gzipped chrome trace is base64-
embedded and pushed into a lazy ui.perfetto.dev iframe via its
postMessage deep-link API), plus a trace download button. Traces over an
embed cap are uploaded to blob storage and linked instead.
Rendering is best-effort and never fails the task; body exceptions are
never suppressed. Verified end-to-end on the demo cluster (L4 GPU).
Claude-Session: https://claude.ai/code/session_01FoFxbPpsYcWMny59J63BZM
Signed-off-by: Kevin Su <pingsutw@apache.org>1 parent c521246 commit 29e09d3
4 files changed
Lines changed: 597 additions & 1 deletion
File tree
- plugins/pytorch
- examples
- src/flyteplugins/pytorch
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
0 commit comments