You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/10/27 17:26:57 UTC

[GitHub] [incubator-mxnet] barry-jin commented on a change in pull request #20572: [API] Standardize MXNet NumPy creation functions

barry-jin commented on a change in pull request #20572:
URL: https://github.com/apache/incubator-mxnet/pull/20572#discussion_r737693044



##########
File path: python/mxnet/gluon/data/batchify.py
##########
@@ -82,7 +82,7 @@ def __call__(self, data):
             dtype = data[0].dtype
             if self._use_shared_mem:
                 out = _arr.empty((len(data),) + data[0].shape, dtype=dtype,
-                                 ctx=Context('cpu_shared', 0))
+                                 ctx=Device('cpu_shared', 0))

Review comment:
       Because here _arr can be legacy NDArray or mxnet.numpy ndarray. I didn't change ctx/context part inside legacy ndarray/symbol because this will need to change the ctx signature in backend, which will lead to more changes like OpContext to OpDevice in C++ side. So, I think we can do this in the future in seperate pull requests. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org