Skip to content

Commit 9cbf2bd

Browse files
committed
Fix issue with divide on Iris Xe
1 parent a0a91bd commit 9cbf2bd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dpnp/dpnp_algo/dpnp_algo.pyx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,22 +495,24 @@ cdef utils.dpnp_descriptor call_fptr_2in_1out_strides(DPNPFuncName fptr_name,
495495

496496
# get FPTR function and result type
497497
cdef fptr_2in_1out_strides_t func = NULL
498+
cdef DPNPFuncType return_type = DPNP_FT_NONE
498499
if fptr_name != DPNP_FN_DIVIDE_EXT or result_sycl_device.has_aspect_fp64:
499-
result_type = dpnp_DPNPFuncType_to_dtype(< size_t > kernel_data.return_type)
500+
return_type = kernel_data.return_type
500501
func = < fptr_2in_1out_strides_t > kernel_data.ptr
501502
else:
502-
result_type = dpnp_DPNPFuncType_to_dtype(< size_t > kernel_data.return_type_no_fp64)
503+
return_type = kernel_data.return_type_no_fp64
503504
func = < fptr_2in_1out_strides_t > kernel_data.ptr_no_fp64
504505

505506
if out is None:
506507
""" Create result array with type given by FPTR data """
507508
result = utils.create_output_descriptor(result_shape,
508-
kernel_data.return_type,
509+
return_type,
509510
None,
510511
device=result_sycl_device,
511512
usm_type=result_usm_type,
512513
sycl_queue=result_sycl_queue)
513514
else:
515+
result_type = dpnp_DPNPFuncType_to_dtype(< size_t > return_type)
514516
if out.dtype != result_type:
515517
utils.checker_throw_value_error(func_name, 'out.dtype', out.dtype, result_type)
516518
if out.shape != result_shape:

0 commit comments

Comments
 (0)