Skip to content

Extend backend functions interfaces with queue and events#1122

Merged
Alexander-Makaryev merged 8 commits intoIntelPython:masterfrom
densmirn:feature/sycl_to_backend2
Feb 18, 2022
Merged

Extend backend functions interfaces with queue and events#1122
Alexander-Makaryev merged 8 commits intoIntelPython:masterfrom
densmirn:feature/sycl_to_backend2

Conversation

@densmirn
Copy link
Contributor

@densmirn densmirn commented Feb 8, 2022

No description provided.

@Alexander-Makaryev
Copy link
Contributor

For some reason tests on Windows become extremely slow on this PR. We need to pay attention on this during next iterations of testing.

Copy link
Contributor

@Alexander-Makaryev Alexander-Makaryev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +531 to +533
* @param [out] result1 Output array.
* @param [in] size Number of elements in input arrays.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param [out] result1 Output array.
* @param [in] size Number of elements in input arrays.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
* @param [out] result1 Output array.
* @param [in] size Number of elements in input arrays.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.

Comment on lines +550 to 552
* @param [in] q_ref Reference to SYCL queue.
* @param [out] result_out Output array.
* @param [in] result_size Size of output array.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param [in] q_ref Reference to SYCL queue.
* @param [out] result_out Output array.
* @param [in] result_size Size of output array.
* @param [in] q_ref Reference to SYCL queue.
* @param [out] result_out Output array.
* @param [in] result_size Size of output array.

Comment on lines +514 to +521
_DataType* min_arr = reinterpret_cast<_DataType*>(sycl::malloc_shared(result_size * sizeof(_DataType), q));
_DataType* max_arr = reinterpret_cast<_DataType*>(sycl::malloc_shared(result_size * sizeof(_DataType), q));

dpnp_min_c<_DataType>(arr, min_arr, result_size, input_shape, input_ndim, axis, naxis);
dpnp_max_c<_DataType>(arr, max_arr, result_size, input_shape, input_ndim, axis, naxis);

shape_elem_type* _strides =
reinterpret_cast<shape_elem_type*>(dpnp_memory_alloc_c(result_ndim * sizeof(shape_elem_type)));
reinterpret_cast<shape_elem_type*>(sycl::malloc_shared(result_ndim * sizeof(shape_elem_type), q));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question to think about...
Do we really want to stop using functions like dpnp_memory_alloc_c and dpnp_memory_free_c?

@Alexander-Makaryev Alexander-Makaryev merged commit 7d8f2a0 into IntelPython:master Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants