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

Commit

Permalink
use reorder member fn
Browse files Browse the repository at this point in the history
  • Loading branch information
azai91 committed Jun 12, 2018
1 parent c0b2179 commit 9a4b299
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/operator/nn/mkldnn/mkldnn_sum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ void MKLDNNSumForward(const nnvm::NodeAttrs& attrs, const OpContext &ctx,
in_mem = inputs[i].GetMKLDNNData(target_pd);
}
if (in_mem == nullptr) {
auto tmp_memory = TmpMemMgr::Get()->Alloc(target_pd);
auto input_memory = inputs[i].GetMKLDNNData();
CopyMKLDNNMem(*input_memory, tmp_memory);
in_mem = tmp_memory;
in_mem = inputs[i].GetMKLDNNDataReorder(target_pd);
}
in_prims.push_back(*in_mem);
in_pds[i] = in_mem->get_primitive_desc();
Expand Down

0 comments on commit 9a4b299

Please sign in to comment.