guanxinq commented on a change in pull request #15969: [WIP] Partitioning Gluon
HybridBlocks
URL: https://github.com/apache/incubator-mxnet/pull/15969#discussion_r370275405
##########
File path: python/mxnet/gluon/block.py
##########
@@ -932,6 +932,9 @@ def _get_graph(self, *args):
def _build_cache(self, *args):
data, out = self._get_graph(*args)
+ if self._backend:
+ # To do: pass in all arguments
+ out = out.optimize_for(self._backend, **self.optargs)
Review comment:
Just as Sam mentioned "Because once self._cached_graph is set the previous
code wont be executed in the _get_graph function". It is better to keep this
change.
----------------------------------------------------------------
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]
With regards,
Apache Git Services