I understand blocking call such as asnumpy() or asscalar() can slow down GPU
computation. But I am a bit confused about what's block versus non-blocking,
even after reading
https://mxnet.apache.org/versions/1.5.0/tutorials/gluon/gotchas_numpy_in_mxnet.html.
My vague understanding is that anything involving copying from main memory to
GPU is blocking.
If so, are any following computations blocking calls?
from mxnet import gpu, nd
# x is defined on GPU
x = nd.ones(shape=(10,), ctx=gpu(0))
# y and z are on CPU, I assume
y = 2.0
z = 5
result1 = x * 2.
result2 = x * y
result3 = x.reshape(shape=(5,-1))
result4 = x.reshape(shape=(z,-1))
Thank you!
---
[Visit
Topic](https://discuss.mxnet.io/t/what-is-exactly-a-non-blocking-call/6383/1)
or reply to this email to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click
here](https://discuss.mxnet.io/email/unsubscribe/5883aadbbebcec023b09c708c740a39d37072b811434ee5f466fb568d05e0bc6).