leezu commented on a change in pull request #18405:
URL: https://github.com/apache/incubator-mxnet/pull/18405#discussion_r449206224



##########
File path: python/mxnet/gluon/block.py
##########
@@ -1119,8 +1135,8 @@ def _call_cached_op(self, *args):
                                  .format(fmt, self._in_format))
 
         args_without_none = [ele for ele in args if ele is not None]
-        cargs = [args_without_none[i] if is_arg else i.data()
-                 for is_arg, i in self._cached_op_args]
+        cargs = [args_without_none[i] if is_arg else i
+                 for is_arg, i, _ in self._cached_op_args]

Review comment:
       Would there be an issue now when passing arrays on a different context? 
Ie, initially using gpu(0) but later using gpu(1). 
   Because self._cached_op_args now contains the .data() array directly instead 
of the parameter (which may manage arrays on multiple devices)




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to