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
renzhc
diffusers_dcu
Commits
d704a730
Unverified
Commit
d704a730
authored
Dec 15, 2023
by
Dhruv Nair
Committed by
GitHub
Dec 15, 2023
Browse files
Compile test fix (#6104)
* update * update
parent
49db233b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/diffusers/utils/testing_utils.py
src/diffusers/utils/testing_utils.py
+6
-2
No files found.
src/diffusers/utils/testing_utils.py
View file @
d704a730
...
...
@@ -820,7 +820,9 @@ def _is_torch_fp16_available(device):
try
:
x
=
torch
.
zeros
((
2
,
2
),
dtype
=
torch
.
float16
).
to
(
device
)
_
=
x
@
x
_
=
torch
.
mul
(
x
,
x
)
return
True
except
Exception
as
e
:
if
device
.
type
==
"cuda"
:
raise
ValueError
(
...
...
@@ -838,7 +840,9 @@ def _is_torch_fp64_available(device):
try
:
x
=
torch
.
zeros
((
2
,
2
),
dtype
=
torch
.
float64
).
to
(
device
)
_
=
x
@
x
_
=
torch
.
mul
(
x
,
x
)
return
True
except
Exception
as
e
:
if
device
.
type
==
"cuda"
:
raise
ValueError
(
...
...
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