Skip to content

Commit 55e6148

Browse files
albanDjeffdaily
authored andcommitted
Add cpp stack traces to our own reruns (#119408)
Note that I'm not sure why we both have pytest rerun the failing test twice via https://github.com/pytorch/pytorch/blob/81abc2b2494ab7d48394b63d528eb5dddfa9d3d5/test/run_test.py#L966 before our own logic retries it as well? The failing test is only here to make sure it works as expected in the CI env. Will remove before landing. Pull Request resolved: #119408 Approved by: https://github.com/huydhn
1 parent de99671 commit 55e6148

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/run_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,9 @@ def print_to_file(s):
614614
else:
615615
sc_command = f"--sc={stepcurrent_key}"
616616
print_to_file("Retrying...")
617+
# Print full c++ stack traces during retries
618+
env = env or {}
619+
env["TORCH_SHOW_CPP_STACKTRACES"] = "1"
617620
print_items = [] # do not continue printing them, massive waste of space
618621

619622
consistent_failures = [x[1:-1] for x in num_failures.keys() if num_failures[x] >= 3]

0 commit comments

Comments
 (0)