Fix a crash when calling take() for input array with non-integer values #771
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DPNP map of kernel functions for take() was updated in scope of #1172: an input array of indices has to be of an integer type. For other types of indices data, DPNP backend function get_dpnp_function_ptr() will raise a runtime exception pointing on the types mismatching.
Numba-DPEX had missing "except +" notation while declaring get_dpnp_function_ptr() in cython file. Thus the exception from DPNP backend led to a core dump in Numba-DPEX instead of printing the error.
Numba-DPEX shall explicitly pass a type of input array for indices while calling DPNP backend, rather than passing "None". It will help to select a proper kernel function, since DPNP has to know how incoming array is placed in the memory to avoid any potential memory corruption issue while accessing it.