I realized that I shouldn't use mx.nd.array in different threads, because it 
uses Push API.

I found [here](https://mxnet.incubator.apache.org/architecture/overview.html)

> Push APIs are not thread-safe. To be specific, only one thread should make 
> engine API calls at a time.

I think you should mention in python API documentation what exactly python API 
functions should be called only from main thread.

It will be useful to make function for creating ndarray in non-block fashion. 
Because mx.nd.array very slow and this function blocks main thread long time.

```
heavy_nparray = ...
ndarr = mx.nd.array_nonblock(heavy_nparray)
# do something
ndarr.wait()
```


[ Full content available at: 
https://github.com/apache/incubator-mxnet/issues/12393 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to