Skip to content

Commit d515feb

Browse files
committed
Free memory for iDPNPC input data object
1 parent b7ff36e commit d515feb

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

dpnp/backend/kernels/dpnp_krnl_mathematical.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ void dpnp_floor_divide_c(void* result_out,
306306

307307
input1_it->~DPNPC_id();
308308
input2_it->~DPNPC_id();
309+
310+
dpnp_memory_free_c(input1_it);
311+
dpnp_memory_free_c(input2_it);
309312
}
310313

311314
template <typename _KernelNameSpecialization1, typename _KernelNameSpecialization2>

dpnp/dpnp_algo/dpnp_algo.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,9 @@ cdef utils.dpnp_descriptor call_fptr_2in_1out_strides(DPNPFuncName fptr_name,
373373

374374
# Create result array
375375
cdef shape_type_c x1_shape = x1_obj.shape
376-
cdef shape_type_c x1_strides = strides_to_vector(x1_obj.strides, x1_shape)
376+
cdef shape_type_c x1_strides = utils.strides_to_vector(x1_obj.strides, x1_shape)
377377
cdef shape_type_c x2_shape = x2_obj.shape
378-
cdef shape_type_c x2_strides = strides_to_vector(x2_obj.strides, x2_shape)
378+
cdef shape_type_c x2_strides = utils.strides_to_vector(x2_obj.strides, x2_shape)
379379
cdef shape_type_c result_shape = utils.get_common_shape(x1_shape, x2_shape)
380380
cdef utils.dpnp_descriptor result
381381

@@ -390,7 +390,7 @@ cdef utils.dpnp_descriptor call_fptr_2in_1out_strides(DPNPFuncName fptr_name,
390390

391391
result = out
392392

393-
cdef shape_type_c result_strides = strides_to_vector(result.strides, result_shape)
393+
cdef shape_type_c result_strides = utils.strides_to_vector(result.strides, result_shape)
394394

395395
""" Call FPTR function """
396396
cdef fptr_2in_1out_strides_t func = <fptr_2in_1out_strides_t > kernel_data.ptr

dpnp/dpnp_utils/dpnp_algo_utils.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ __all__ = [
6363
"_get_linear_index",
6464
"normalize_axis",
6565
"_object_to_tuple",
66-
"strides_to_vector",
6766
"use_origin_backend"
6867
]
6968

0 commit comments

Comments
 (0)