Skip to content

dpnp.arange(10, dtype='i4') crashes #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
oleksandr-pavlyk opened this issue Nov 16, 2020 · 3 comments
Closed

dpnp.arange(10, dtype='i4') crashes #246

oleksandr-pavlyk opened this issue Nov 16, 2020 · 3 comments

Comments

@oleksandr-pavlyk
Copy link
Contributor

oleksandr-pavlyk commented Nov 16, 2020

In [2]: X = dpnp.arange(10, dtype='i4')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/home/repos/dpnp/dpnp/dpnp_utils.pyx in dpnp.dpnp_utils.checker_throw_type_error()
    112
    113 cpdef checker_throw_type_error(function_name, given_type):
--> 114     raise TypeError(f"{ERROR_PREFIX} in function {function_name}() type '{given_type}' is not supported")
    115
    116

TypeError: DPNP error: in function dpnp_dtype_to_DPNPFuncType() type 'i4' is not supported
Exception ignored in: 'dpnp.backend.dpnp_dtype_to_DPNPFuncType'
Traceback (most recent call last):
  File "dpnp/dpnp_utils.pyx", line 114, in dpnp.dpnp_utils.checker_throw_type_error
    raise TypeError(f"{ERROR_PREFIX} in function {function_name}() type '{given_type}' is not supported")
TypeError: DPNP error: in function dpnp_dtype_to_DPNPFuncType() type 'i4' is not supported
terminate called after throwing an instance of 'std::runtime_error'
  what():  DPNP Error: Function ID with unsupported first parameter type.
Aborted (core dumped)

The expected behavior is to interpret dtype='i4' as dtype=np.dtype('i4'), or at least raise an exception and not crash.

@oleksandr-pavlyk
Copy link
Contributor Author

The exception is likely ignored in the call to cdef variant of dpnp.backend.dpnp_dtype_to_DPNPFuncType.

@oleksandr-pavlyk oleksandr-pavlyk changed the title dpnp.arange(10, dtype='i4') crashes dpnp.arange(10, dtype='i4') crashes Nov 16, 2020
@shssf
Copy link
Contributor

shssf commented Nov 23, 2020

Will not be implemented.

@shssf shssf closed this as completed Nov 23, 2020
@oleksandr-pavlyk
Copy link
Contributor Author

The issue is not a request to implement anything. It is a bug.

The Python interpreter should never crash, or users will just stop using it.

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

No branches or pull requests

2 participants