leezu commented on a change in pull request #17749: Fix races in block scope
URL: https://github.com/apache/incubator-mxnet/pull/17749#discussion_r387861538
##########
File path: python/mxnet/gluon/block.py
##########
@@ -48,8 +48,9 @@ class _BlockScope(object):
def __init__(self, block):
self._block = block
self._counter = {}
- self._old_scope = None
- self._name_scope = None
+ self._local = threading.local()
Review comment:
It's a bug. MXNet will currently experience undefined behaviour when
coroutines are used. There's no immediate plan to fix it, as it requires some
backend work as well. However, new code should ideally be written in a correct
way to reduce future efforts.
----------------------------------------------------------------
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