From e83df5071719ff223497590b44ae4bb5ca5af2b9 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Wed, 17 Sep 2025 19:40:25 +0300 Subject: [PATCH] IPEX fix missing dtype from randn --- modules/intel/ipex/hijacks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/intel/ipex/hijacks.py b/modules/intel/ipex/hijacks.py index feb31bec2..e617eed3a 100644 --- a/modules/intel/ipex/hijacks.py +++ b/modules/intel/ipex/hijacks.py @@ -322,9 +322,9 @@ def torch_randn(*args, device=None, dtype=None, **kwargs): if dtype is bytes: dtype = None if check_cuda(device): - return original_torch_randn(*args, device=return_xpu(device), **kwargs) + return original_torch_randn(*args, device=return_xpu(device), dtype=dtype, **kwargs) else: - return original_torch_randn(*args, device=device, **kwargs) + return original_torch_randn(*args, device=device, dtype=dtype, **kwargs) original_torch_ones = torch.ones @wraps(torch.ones)