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

[BUGFIX] Fix MKLDNN BatchNorm with even number of channels (#19150) #19299 #19425

Merged
merged 3 commits into from
Oct 30, 2020

Conversation

akarbown
Copy link
Contributor

@akarbown akarbown commented Oct 26, 2020

Description

It's the change (#19299) ported form mxnet 1.7.

Checklist

Essentials

  • PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

Even number of channels results in data reordering before batch
norm operation. Therefore, if BatchNorm data array is view of
another array and the data is stored in MKLDNN format, the data
needs to be converted to the default format.
@mxnet-bot
Copy link

Hey @akarbown , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [website, windows-gpu, windows-cpu, sanity, clang, unix-cpu, centos-cpu, unix-gpu, centos-gpu, miscellaneous, edge]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@lanking520 lanking520 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test labels Oct 26, 2020
@leezu
Copy link
Contributor

leezu commented Oct 26, 2020

@mxnet-bot run ci [unix-cpu]

@akarbown
Copy link
Contributor Author

@mxnet-bot run ci [greeting, unix-cpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [unix-cpu]

1 similar comment
@mxnet-bot
Copy link

Jenkins CI successfully triggered : [unix-cpu]

@lanking520 lanking520 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Oct 26, 2020
samskalicky pushed a commit that referenced this pull request Oct 29, 2020
…19150) #19299 #19425 (#19428)

* Fix MKLDNN BatchNorm with even number of channels (#19150)

Even number of channels results in data reordering before batch
norm operation. Therefore, if BatchNorm data array is view of
another array and the data is stored in MKLDNN format, the data
needs to be converted to the default format.

* Add or updated test to verify Batchnorm odd & even number of channels

* Fix for Batchnorm odd & even chnls number context
samskalicky pushed a commit that referenced this pull request Oct 29, 2020
…) #19299 #19425 (#19445)

* Fix MKLDNN BatchNorm with even number of channels (#19150)

Even number of channels results in data reordering before batch
norm operation. Therefore, if BatchNorm data array is view of
another array and the data is stored in MKLDNN format, the data
needs to be converted to the default format.

* Add or updated test to verify Batchnorm odd & even number of channels

* Fix for Batchnorm odd & even chnls number context
@akarbown
Copy link
Contributor Author

@TaoLv, @wkcn, @samskalicky - could you please take a look at this change & review it!? (it's the same change as for the 1.x, 1.7 & 1.8 branches)

Copy link
Contributor

@samskalicky samskalicky left a comment

Choose a reason for hiding this comment

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

Thanks @akarbown for porting this fix!

@samskalicky samskalicky merged commit 0faecf0 into apache:master Oct 30, 2020
vidyaravipati pushed a commit to vidyaravipati/incubator-mxnet that referenced this pull request Nov 11, 2020
) apache#19299 (apache#19425)

* Fix MKLDNN BatchNorm with even number of channels (apache#19150)

Even number of channels results in data reordering before batch
norm operation. Therefore, if BatchNorm data array is view of
another array and the data is stored in MKLDNN format, the data
needs to be converted to the default format.

* Add or updated test to verify Batchnorm odd & even number of channels

* Fix for Batchnorm odd & even chnls number context
@akarbown akarbown deleted the master_batchnorm_is_view branch November 16, 2020 10:27
chinakook pushed a commit to chinakook/mxnet that referenced this pull request Nov 17, 2020
) apache#19299 (apache#19425)

* Fix MKLDNN BatchNorm with even number of channels (apache#19150)

Even number of channels results in data reordering before batch
norm operation. Therefore, if BatchNorm data array is view of
another array and the data is stored in MKLDNN format, the data
needs to be converted to the default format.

* Add or updated test to verify Batchnorm odd & even number of channels

* Fix for Batchnorm odd & even chnls number context
chinakook pushed a commit to chinakook/mxnet that referenced this pull request Nov 19, 2020
) apache#19299 (apache#19425)

* Fix MKLDNN BatchNorm with even number of channels (apache#19150)

Even number of channels results in data reordering before batch
norm operation. Therefore, if BatchNorm data array is view of
another array and the data is stored in MKLDNN format, the data
needs to be converted to the default format.

* Add or updated test to verify Batchnorm odd & even number of channels

* Fix for Batchnorm odd & even chnls number context
josephevans pushed a commit to josephevans/mxnet that referenced this pull request Dec 8, 2020
…he#19150) apache#19299 apache#19425 (apache#19445)

* Fix MKLDNN BatchNorm with even number of channels (apache#19150)

Even number of channels results in data reordering before batch
norm operation. Therefore, if BatchNorm data array is view of
another array and the data is stored in MKLDNN format, the data
needs to be converted to the default format.

* Add or updated test to verify Batchnorm odd & even number of channels

* Fix for Batchnorm odd & even chnls number context
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants