You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/09/23 01:37:39 UTC
[GitHub] [incubator-mxnet] rongzha1 commented on a change in pull request
#16221: [mkldnn-v1.0] Add MKL-DNN FC
rongzha1 commented on a change in pull request #16221: [mkldnn-v1.0] Add MKL-DNN FC
URL: https://github.com/apache/incubator-mxnet/pull/16221#discussion_r326931494
##########
File path: src/operator/nn/mkldnn/mkldnn_fully_connected.cc
##########
@@ -244,35 +198,35 @@ void MKLDNNFCForwardFullFeature(const MKLDNNFCFullParam &full_param,
NDArray weight = in_data[fullc::kWeight];
NDArray data = in_data[fullc::kData];
- auto data_mem = data.GetMKLDNNDataReorder(fwd->fwd_pd.src_primitive_desc());
+ auto data_mem = data.GetMKLDNNDataReorder(fwd->fwd_pd.src_desc());
const mkldnn::memory *weight_mem;
if (ctx.is_train) {
if (weight.IsMKLDNNData()) {
weight.Reorder2DefaultAsync();
}
- weight_mem = GetWeights(weight, fwd->fwd_pd.weights_primitive_desc(), 1);
+ weight_mem = GetWeights(weight, fwd->fwd_pd.weights_desc(), 1);
} else {
- if (weight.IsDefaultData()) {
- // We also need to modify the layout on the original weight array.
- // Don't switch below sequence because naive engine will executes
- // pushAsync synchronously.
- weight.MKLDNNDataReorderAsync(fwd->fwd_pd.weights_primitive_desc());
- weight_mem = GetWeights(weight, fwd->fwd_pd.weights_primitive_desc(), 1);
- } else {
- weight_mem = weight.GetMKLDNNData();
- CHECK(weight_mem->get_primitive_desc() == fwd->fwd_pd.weights_primitive_desc());
+ weight_mem = weight.GetMKLDNNData();
+ if (weight_mem->get_desc() != fwd->fwd_pd.weights_desc()) {
+ // rm following line for ut:test_contrib_rnn, need debug
Review comment:
OK
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services