Commit de0cb2f
Fix mis-calculated memory compression ratio (#150695)
Summary:
pytorch/pytorch#149817 introduced an extra warmup run to compute AOTI memory compression ratio, but since weights are only loaded once in the AOTI run, the peak memory seen in the extra warmup won't include the weight, which causes an aritifically high memory compression ratio. This PR removes that extra warmup run, and calls reset_peak_memory_stats in the proper place instead.
X-link: pytorch/pytorch#150695
Approved by: https://github.com/yushangdi
Reviewed By: atalman
Differential Revision: D72570207
fbshipit-source-id: 421bde2de6ebde4ca795871c5920a66a6b77073f1 parent 4dbceea commit de0cb2f
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1395 | 1395 | | |
1396 | 1396 | | |
1397 | 1397 | | |
| 1398 | + | |
| 1399 | + | |
1398 | 1400 | | |
1399 | 1401 | | |
1400 | 1402 | | |
| |||
1411 | 1413 | | |
1412 | 1414 | | |
1413 | 1415 | | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
1414 | 1424 | | |
1415 | 1425 | | |
1416 | 1426 | | |
| |||
3735 | 3745 | | |
3736 | 3746 | | |
3737 | 3747 | | |
3738 | | - | |
3739 | | - | |
3740 | | - | |
3741 | | - | |
3742 | 3748 | | |
3743 | 3749 | | |
3744 | 3750 | | |
| |||
0 commit comments