Skip to content

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented May 19, 2020

Stack from ghstack:

Summary:

Adds test coverage for swapping BN -> SyncBN on a fused ConvBN module.

Test Plan:

python test/test_quantization.py TestDistributed.test_qat_convbn_fused_syncbn_replacement

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D21648320

Summary:

Adds test coverage for swapping BN -> SyncBN on a fused ConvBN module.

Test Plan:

```
python test/test_quantization.py TestDistributed.test_qat_convbn_fused_syncbn_replacement
```

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request May 19, 2020
Summary:

Adds test coverage for swapping BN -> SyncBN on a fused ConvBN module.

Test Plan:

```
python test/test_quantization.py TestDistributed.test_qat_convbn_fused_syncbn_replacement
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 786df13
Pull Request resolved: #38738
@dr-ci
Copy link

dr-ci bot commented May 19, 2020

💊 CI failures summary and remediations

As of commit e6ae36e (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 7 times.

fused_model.qconfig = torch.quantization.get_default_qconfig('fbgemm')
torch.quantization.prepare_qat(fused_model, inplace=True)
# replace with DDP
fused_model = nn.SyncBatchNorm.convert_sync_batchnorm(fused_model)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the convert logic need to be modified after training ? How about a test to check that convert works with sync bn module?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, sounds good. let's save that for a separate PR? I don't plan to get to that until we verify SyncBN accuracy with QAT, and it would be great to land this in the meanwhile.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, approving it now.

Summary:

Adds test coverage for swapping BN -> SyncBN on a fused ConvBN module.

Test Plan:

```
python test/test_quantization.py TestDistributed.test_qat_convbn_fused_syncbn_replacement
```

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D21648320](https://our.internmc.facebook.com/intern/diff/D21648320)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 4d5d9c0.

@facebook-github-bot facebook-github-bot deleted the gh/vkuzo/67/head branch May 24, 2020 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants