Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support sync batchnorm #151

Merged
merged 33 commits into from
Aug 26, 2021
Merged

feat: support sync batchnorm #151

merged 33 commits into from
Aug 26, 2021

Conversation

Tengxu-Sun
Copy link
Contributor

Not official.

@Tengxu-Sun Tengxu-Sun marked this pull request as draft August 5, 2021 03:04
@Tengxu-Sun Tengxu-Sun linked an issue Aug 5, 2021 that may be closed by this pull request
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
bagua/torch_api/contrib/sync_batchnorm.py Outdated Show resolved Hide resolved
Copy link
Contributor

@NOBLES5E NOBLES5E left a comment

Choose a reason for hiding this comment

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

see comments

tests/contrib/test_sync_bn.py Show resolved Hide resolved
tests/contrib/test_sync_bn.py Show resolved Hide resolved
tests/contrib/test_sync_bn.py Show resolved Hide resolved
tests/contrib/test_sync_bn.py Outdated Show resolved Hide resolved
tests/contrib/test_sync_bn.py Show resolved Hide resolved
tests/contrib/test_sync_bn.py Outdated Show resolved Hide resolved
tests/contrib/test_sync_bn.py Outdated Show resolved Hide resolved
tests/contrib/test_sync_bn.py Outdated Show resolved Hide resolved
tests/contrib/test_sync_bn.py Outdated Show resolved Hide resolved
tests/contrib/test_sync_bn.py Show resolved Hide resolved
tests/contrib/test_sync_bn.py Outdated Show resolved Hide resolved
tests/contrib/test_sync_bn.py Outdated Show resolved Hide resolved
@Tengxu-Sun Tengxu-Sun marked this pull request as ready for review August 26, 2021 08:09
"LOCAL_WORLD_SIZE": str(nprocs),
"MASTER_ADDR": "127.0.0.1",
"MASTER_PORT": str(find_free_port()),
"BAGUA_SERVICE_PORT": str(find_free_port()),
Copy link
Member

Choose a reason for hiding this comment

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

I updated find_free_port func in another pr. please check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

got it

Copy link
Contributor

Choose a reason for hiding this comment

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

@wangraying Which one to use?

return port
except OSError:
port += 1
raise IOError("no free ports")
Copy link
Contributor

Choose a reason for hiding this comment

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

[blackfmt] reported by reviewdog 🐶

Suggested change
raise IOError("no free ports")
raise IOError("no free ports")

@NOBLES5E NOBLES5E merged commit 3937288 into master Aug 26, 2021
@NOBLES5E NOBLES5E deleted the sync_bn branch August 26, 2021 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement SyncBN
3 participants