DNXie opened a new issue #20041:
URL: https://github.com/apache/incubator-mxnet/issues/20041
## Description
`mxnet.ndarray.cast` and `mxnet.ndarray.op.cast` crashes(aborts) when `data`
is empty tensor.
### Error Message
~~~python
Segmentation fault: 11
Stack trace:
[bt] (0)
/root/miniconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x3c27360)
[0x7f911dcc4360]
terminate called after throwing an instance of 'std::system_error'
what(): Resource deadlock avoided
Aborted (core dumped)
~~~
## To Reproduce
~~~python
import mxnet
import numpy as np
mxnet.ndarray.cast(data=mxnet.nd.array(np.ones((12,0))), dtype='float32')
~~~
or
~~~python
import mxnet
import numpy as np
mxnet.ndarray.cast(data=mxnet.nd.array(np.ones((12,0))),
dtype=mxnet.nd.ones((1)))
~~~
## Environment
OS: ubuntu 18.04
Python: 3.7.6
pip: 20.0.2
numpy: 1.18.5
mxnet: 1.6.0
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]