Skip to content

Commit 3efacad

Browse files
Fix for test_multipy by python scalar on Windows
1 parent fb95d67 commit 3efacad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpctl/tensor/_elementwise_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def _resolve_weak_types(o1_dtype, o2_dtype, dev):
316316
o2_kind_num = _strong_dtype_num_kind(o2_dtype)
317317
if o1_kind_num > o2_kind_num:
318318
if isinstance(o1_dtype, WeakIntegralType):
319-
return dpt.int64, o2_dtype
319+
return dpt.dtype(ti.default_device_int_type(dev)), o2_dtype
320320
if isinstance(o1_dtype, WeakComplexType):
321321
if o2_dtype is dpt.float16 or o2_dtype is dpt.float32:
322322
return dpt.complex64, o2_dtype
@@ -335,7 +335,7 @@ def _resolve_weak_types(o1_dtype, o2_dtype, dev):
335335
o2_kind_num = _weak_type_num_kind(o2_dtype)
336336
if o2_kind_num > o1_kind_num:
337337
if isinstance(o2_dtype, WeakIntegralType):
338-
return o1_dtype, dpt.int64
338+
return o1_dtype, dpt.dtype(ti.default_device_int_type(dev))
339339
if isinstance(o2_dtype, WeakComplexType):
340340
if o1_dtype is dpt.float16 or o1_dtype is dpt.float32:
341341
return o1_dtype, dpt.complex64

0 commit comments

Comments
 (0)