Skip to content

Commit d704a73

Browse files
authored
Compile test fix (#6104)
* update * update
1 parent 49db233 commit d704a73

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/diffusers/utils/testing_utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,9 @@ def _is_torch_fp16_available(device):
820820

821821
try:
822822
x = torch.zeros((2, 2), dtype=torch.float16).to(device)
823-
_ = x @ x
823+
_ = torch.mul(x, x)
824+
return True
825+
824826
except Exception as e:
825827
if device.type == "cuda":
826828
raise ValueError(
@@ -838,7 +840,9 @@ def _is_torch_fp64_available(device):
838840

839841
try:
840842
x = torch.zeros((2, 2), dtype=torch.float64).to(device)
841-
_ = x @ x
843+
_ = torch.mul(x, x)
844+
return True
845+
842846
except Exception as e:
843847
if device.type == "cuda":
844848
raise ValueError(

0 commit comments

Comments
 (0)