Commit 394bd88
fix dynamo_compile logging on RecompileLimitExceeded (#146544)
Summary:
Logging branches based on RecompileLimitExceeded or not. If we exceed the limit, we fallback to eager before even trying to analyze the frame. We handle RecompileLimitExceeded outside of the try/catch/finally that edits the metrics context:
https://github.com/pytorch/pytorch/blob/72405b0c0f40a5427656038adfdd4b3efe50d028/torch/_dynamo/convert_frame.py#L908-L935.
dynamo_config and recompile_reason are both known before we raise the RecompileLimitExceeded, so we can add them with the rest of the "common" metrics. which are logged on metric_context decorator exit and is always called
X-link: pytorch/pytorch#146544
Approved by: https://github.com/masnesral
Reviewed By: atalman
Differential Revision: D69257043
fbshipit-source-id: fe9df73052c0ad64062e66c97667f985035a78f01 parent 89d01e9 commit 394bd88
1 file changed
+35
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1330 | 1330 | | |
1331 | 1331 | | |
1332 | 1332 | | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
1333 | 1367 | | |
1334 | 1368 | | |
1335 | 1369 | | |
| |||
1409 | 1443 | | |
1410 | 1444 | | |
1411 | 1445 | | |
| 1446 | + | |
1412 | 1447 | | |
1413 | 1448 | | |
1414 | 1449 | | |
| |||
0 commit comments