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

Commit

Permalink
fix cpp test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ciyongch committed May 15, 2019
1 parent 812c57f commit f0059f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/operator/nn/mkldnn/mkldnn_sum.cc
Expand Up @@ -141,18 +141,19 @@ void MKLDNNSumForward(const nnvm::NodeAttrs& attrs, const OpContext &ctx,
in_bufs[i] = inputs[i].Reorder2Default();
in_mem = in_bufs[i].GetMKLDNNData();
} else {
in_bufs[i] = inputs[i];
in_mem = inputs[i].GetMKLDNNData();
}
mkldnn::memory::primitive_desc tmp_pd = in_mem->get_primitive_desc();
data_md.push_back(tmp_pd);
data_mem.push_back(in_mem);
}

MKLDNNSumFwd &fwd = GetSumForward(scales, inputs, data_md);
MKLDNNSumFwd &fwd = GetSumForward(scales, in_bufs, data_md);
mxnet::mkldnn_output_t out_mem = CreateMKLDNNMem(out_data,
fwd.fwd_pd.dst_primitive_desc(),
req,
&inputs[0]);
&in_bufs[0]);
fwd.SetNewMem(data_mem, *out_mem.second);
MKLDNNStream::Get()->RegisterPrim(fwd.GetFwd());
CommitOutput(out_data, out_mem);
Expand Down

0 comments on commit f0059f6

Please sign in to comment.