"vscode:/vscode.git/clone" did not exist on "11bdafc32b77f8550aa2bb8333670ae7a9089380"
Unverified Commit a5035df5 authored by Nikita Shulga's avatar Nikita Shulga Committed by GitHub
Browse files

Make `disable_tf32` context manager handle exceptions (#7651)

parent f3d6c6be
......@@ -29,7 +29,9 @@ SKIP_BIG_MODEL = os.getenv("SKIP_BIG_MODEL", "1") == "1"
def disable_tf32():
previous = torch.backends.cudnn.allow_tf32
torch.backends.cudnn.allow_tf32 = False
try:
yield
finally:
torch.backends.cudnn.allow_tf32 = previous
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment