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 2020/05/15 13:24:45 UTC
[GitHub] [incubator-mxnet] hzfan commented on a change in pull request #17749: Fix races in block scope
hzfan commented on a change in pull request #17749:
URL: https://github.com/apache/incubator-mxnet/pull/17749#discussion_r425799124
##########
File path: python/mxnet/gluon/block.py
##########
@@ -91,22 +92,22 @@ def create(prefix, params, hint):
def __enter__(self):
if self._block._empty_prefix:
return self
- self._old_scope = getattr(_BlockScope._current, "value", None)
+ self._local._old_scope = getattr(_BlockScope._current, "value", None)
_BlockScope._current.value = self
Review comment:
Seems that it has been thread-local ?
https://github.com/apache/incubator-mxnet/blob/f3e8dc14de881a5b8ccc3ff5985167f8d6fa2fb8/python/mxnet/gluon/block.py#L47
----------------------------------------------------------------
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:
users@infra.apache.org