Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fix races in block scope #17749

Merged
merged 5 commits into from
May 20, 2020
Merged

Fix races in block scope #17749

merged 5 commits into from
May 20, 2020

Conversation

hzfan
Copy link
Contributor

@hzfan hzfan commented Mar 3, 2020

Description

Fix races in block scope by

  • make _BlockScope thread-local

Thank @eric-haibin-lin for guidance :)

@hzfan hzfan requested a review from szha as a code owner March 3, 2020 06:14
Copy link
Member

@eric-haibin-lin eric-haibin-lin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an unit test with 2 threads? thanks!

@hzfan
Copy link
Contributor Author

hzfan commented Mar 3, 2020

@eric-haibin-lin Tests added.

@hzfan hzfan changed the title Fix races in block scope and deferred_init Fix races in block scope Mar 4, 2020
@eric-haibin-lin eric-haibin-lin merged commit f4d0290 into apache:master May 20, 2020
@chinakook
Copy link
Contributor

@leezu
Copy link
Contributor

leezu commented May 21, 2020

@chinakook gluoncv does not support MXNet 2 development version at this point. You can use MXNet 1

AntiZpvoh pushed a commit to AntiZpvoh/incubator-mxnet that referenced this pull request Jul 6, 2020
* Add tests

* Fix block_scope

Co-authored-by: Haibin Lin <[email protected]>
Co-authored-by: Lin <[email protected]>
@chinakook
Copy link
Contributor

It's also a problem with Tensorflow and Keras, and there are lots of work arounds.
tensorflow/tensorflow#36897

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants