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

Commit

Permalink
reorder2default only if mkldnn flag
Browse files Browse the repository at this point in the history
  • Loading branch information
azai91 committed Jun 11, 2018
1 parent 2786ff9 commit 71b0db4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/common/exec_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ inline bool SetupDefaultBlobsOut(const std::vector<NDArray>& src,
is_default = nd.IsDefaultData();
#endif
if (!is_default) {
NDArray temp = bufs != nullptr ? bufs->at(i) : nd.Reorder2Default();
#if MXNET_USE_MKLDNN == 1
NDArray temp = bufs != nullptr ? bufs->at(i) : nd.Reorder2Default();
CHECK(temp.IsDefaultData());
#else
NDArray temp = bufs != nullptr ? bufs->at(i) : NDArray(nd.shape(), nd.ctx(),
true, nd.dtype());
#endif
temp_src->emplace_back(nd);
temp_dst->emplace_back(temp);
Expand Down

0 comments on commit 71b0db4

Please sign in to comment.