Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
a5035df5
"...en/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "cd7071e7506275a1c7c52df9e1a696feafa3b118"
Unverified
Commit
a5035df5
authored
Jun 02, 2023
by
Nikita Shulga
Committed by
GitHub
Jun 02, 2023
Browse files
Make `disable_tf32` context manager handle exceptions (#7651)
parent
f3d6c6be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
test/test_models.py
test/test_models.py
+4
-2
No files found.
test/test_models.py
View file @
a5035df5
...
...
@@ -29,8 +29,10 @@ 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
yield
torch
.
backends
.
cudnn
.
allow_tf32
=
previous
try
:
yield
finally
:
torch
.
backends
.
cudnn
.
allow_tf32
=
previous
def
list_model_fns
(
module
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment