1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Compile test fix (#6104)

* update

* update
This commit is contained in:
Dhruv Nair
2023-12-15 18:34:46 +05:30
committed by GitHub
parent 49db233b35
commit d704a730cd

View File

@@ -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(