Skip to content

fix the device inconsistency for import convert_sync_batchnorm#38729

Closed
jjsjann123 wants to merge 5 commits intopytorch:masterfrom
jjsjann123:syncbn_device_fix
Closed

fix the device inconsistency for import convert_sync_batchnorm#38729
jjsjann123 wants to merge 5 commits intopytorch:masterfrom
jjsjann123:syncbn_device_fix

Conversation

@jjsjann123
Copy link
Copy Markdown
Collaborator

This fixes the device inconsistency reported in #37930

@jjsjann123 jjsjann123 requested a review from ngimel May 19, 2020 18:24
@jjsjann123 jjsjann123 requested a review from apaszke as a code owner May 19, 2020 18:24
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented May 19, 2020

💊 CI failures summary and remediations

As of commit 9f88297 (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 15 times.

@jjsjann123
Copy link
Copy Markdown
Collaborator Author

That's a lot of failure with 2 lines of code change 🤦

From what I can see, the related failure is this one:

May 19 19:22:27   test_run_mypy (__main__.TestTypeHints) ... torch/nn/intrinsic/modules/fused.py:45: error: Name 'BatchNorm1d' is not defined  [name-defined]

May 19 19:22:27 torch/nn/intrinsic/modules/fused.py:63: error: Name 'BatchNorm1d' is not defined  [name-defined]

May 19 19:22:42 Found 2 errors in 1 file (checked 980 source files)

I don't know how BatchNorm1d pops up in the error. I have BatchNorm2d in my local script... I can try to import BatchNorm1d in that file, but that seems to cover up a stranger problem...
Any thoughts?

Comment thread torch/nn/modules/batchnorm.py Outdated
Comment thread torch/nn/modules/batchnorm.py
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ngimel has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@ngimel merged this pull request in 5b8a79a.

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
…ch#38729)

Summary:
This fixes the device inconsistency reported in pytorch#37930
Pull Request resolved: pytorch#38729

Differential Revision: D21671039

Pulled By: ngimel

fbshipit-source-id: 17fdb4eae2ddaf64560dd026fe39958536ab313f
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.

5 participants