Commit 16b626c
committed
Collect peak memory directly in integration tests
Add direct peak-memory collection for integration runs by having MetricsProcessor write a JSON summary at the end of training.
The test runner now passes TORCHTITAN_PEAK_MEMORY_JSON into each launched training job, forces metrics logging every step, and reads the emitted summary file back for reporting. MetricsProcessor tracks the maximum reserved and active CUDA memory it observes across log and validation calls and writes a single summary on close from the metrics rank.
This keeps the measurement path local to the training run, avoids depending on TensorBoard event parsing for memory collection, and preserves the integration-test UX via --collect_peak_memory. The graph-trainer integration entrypoint and 8-GPU workflow are wired to use the flag.
[ghstack-poisoned]1 parent 87b7abc commit 16b626c
4 files changed
Lines changed: 86 additions & 1 deletion
File tree
- .github/workflows
- tests/integration_tests
- torchtitan
- components
- experiments/graph_trainer/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
| |||
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
92 | 113 | | |
93 | 114 | | |
94 | 115 | | |
| |||
98 | 119 | | |
99 | 120 | | |
100 | 121 | | |
| 122 | + | |
101 | 123 | | |
102 | 124 | | |
103 | 125 | | |
| |||
132 | 154 | | |
133 | 155 | | |
134 | 156 | | |
| 157 | + | |
135 | 158 | | |
136 | 159 | | |
137 | 160 | | |
| |||
202 | 225 | | |
203 | 226 | | |
204 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
205 | 234 | | |
206 | 235 | | |
207 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
353 | 354 | | |
354 | 355 | | |
355 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
356 | 360 | | |
357 | 361 | | |
358 | 362 | | |
| |||
362 | 366 | | |
363 | 367 | | |
364 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
365 | 411 | | |
366 | 412 | | |
367 | 413 | | |
| |||
496 | 542 | | |
497 | 543 | | |
498 | 544 | | |
| 545 | + | |
499 | 546 | | |
500 | 547 | | |
501 | 548 | | |
| |||
545 | 592 | | |
546 | 593 | | |
547 | 594 | | |
| 595 | + | |
548 | 596 | | |
549 | 597 | | |
550 | 598 | | |
| |||
579 | 627 | | |
580 | 628 | | |
581 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
582 | 633 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
550 | 555 | | |
551 | 556 | | |
552 | 557 | | |
| |||
0 commit comments