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

Commit

Permalink
only reorder if mkldnn
Browse files Browse the repository at this point in the history
  • Loading branch information
azai91 committed Jun 11, 2018
1 parent 50befd6 commit 7be6940
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common/exec_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ inline bool SetupDefaultBlobsOut(const std::vector<NDArray>& src,
#endif
if (!is_default) {
#if MXNET_USE_MKLDNN == 1
NDArray temp = bufs != nullptr ? bufs->at(i) : nd.Reorder2Default();
NDArray temp = bufs != nullptr ? bufs->at(i) : nd.IsMKLDNNData() ?
nd.Reorder2Default() : NDArray(nd.shape(), nd.ctx(), true, nd.dtype());
CHECK(temp.IsDefaultData());
#else
NDArray temp = bufs != nullptr ? bufs->at(i) : NDArray(nd.shape(), nd.ctx(),
Expand Down

0 comments on commit 7be6940

Please sign in to comment.