Skip to content

Commit

Permalink
Obtain a proper result type on device without fp64 (#1429)
Browse files Browse the repository at this point in the history
* Obtain a proper result type on device without fp64

* remove excess defenitions
antonwolfy committed Jun 15, 2023
1 parent b6cba98 commit 6673b80
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 0 additions & 2 deletions dpnp/dpnp_algo/dpnp_algo.pxd
Original file line number Diff line number Diff line change
@@ -370,8 +370,6 @@ cdef extern from "dpnp_iface_fptr.hpp":
struct DPNPFuncData:
DPNPFuncType return_type
void * ptr
DPNPFuncType return_type_no_fp64
void *ptr_no_fp64

DPNPFuncData get_dpnp_function_ptr(DPNPFuncName name, DPNPFuncType first_type, DPNPFuncType second_type) except +

10 changes: 2 additions & 8 deletions dpnp/dpnp_algo/dpnp_algo.pyx
Original file line number Diff line number Diff line change
@@ -497,14 +497,8 @@ cdef utils.dpnp_descriptor call_fptr_2in_1out_strides(DPNPFuncName fptr_name,
result_sycl_device, result_usm_type, result_sycl_queue = utils.get_common_usm_allocation(x1_obj, x2_obj)

# get FPTR function and return type
cdef fptr_2in_1out_strides_t func = NULL
cdef DPNPFuncType return_type = DPNP_FT_NONE
if result_sycl_device.has_aspect_fp64:
return_type = kernel_data.return_type
func = < fptr_2in_1out_strides_t > kernel_data.ptr
else:
return_type = kernel_data.return_type_no_fp64
func = < fptr_2in_1out_strides_t > kernel_data.ptr_no_fp64
cdef fptr_2in_1out_strides_t func = < fptr_2in_1out_strides_t > kernel_data.ptr
cdef DPNPFuncType return_type = kernel_data.return_type

# check 'out' parameter data
if out is not None:

0 comments on commit 6673b80

Please sign in to comment.