From 71b0db44d69f17b2ef811d213bbb0a96bef173fe Mon Sep 17 00:00:00 2001 From: Alexander Zai Date: Mon, 11 Jun 2018 09:20:28 -0700 Subject: [PATCH] reorder2default only if mkldnn flag --- src/common/exec_utils.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/exec_utils.h b/src/common/exec_utils.h index db6ba21be3d8..225214488405 100644 --- a/src/common/exec_utils.h +++ b/src/common/exec_utils.h @@ -98,9 +98,12 @@ inline bool SetupDefaultBlobsOut(const std::vector& 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);