-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
287c577
to
60723de
Compare
@TaoLv please review |
@azai91 It will be helpful if you can please add more details to description explaining why tests where failing earlier, and how did you fix it. |
@mseth10 @anirudh2290 pulling you guys in for a review... |
@Vikas89 added |
Is it possible to separate operator change and unit test into two PRs? |
bool inputs_valid = SupportMKLDNN(inputs[0]); | ||
for (size_t i = 1; i < inputs.size(); i++) { | ||
if (inputs[i].IsMKLDNNData()) { | ||
inputs_valid = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inputs valid is set to false if it is in MKLDNN format ?
&& param.axis == mxnet::op::batchnorm::DEFAULT_AXIS | ||
&& shape[param.axis] % 8 == 0 | ||
&& !mxnet::op::batchnorm::disable_mkl; | ||
bool inputs_valid = SupportMKLDNN(inputs[0]); | ||
for (size_t i = 1; i < inputs.size(); i++) { | ||
if (inputs[i].IsMKLDNNData()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once inputs_valid is set to false, we need not check remaining inputs, we can add a break here.
if (!inputs_valid) break;
@azai91 can you please resolve merge conflicts. |
@azai91 - can you please rebase? |
@azai91 please rebase and resolve merge conflicts |
closing since this is a duplicate of #13625 |
Description
Add tests for MKLDNN batch norm operator The creates ndarray inputs and then runs it separately through the native CPU BN operator and MKLDNN BN operator. Creating the BN test requires a different helper as the BN operation writes to the input, so identical arrays of equal value must be created and then ran through the native / MKLDNN operators.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments