From 27fa5eff181a9ed98774130b67e612aeec59067d Mon Sep 17 00:00:00 2001 From: Da Zheng Date: Sat, 13 Jan 2018 02:59:02 +0000 Subject: [PATCH] Fix a bug in fallback. --- src/operator/nn/mkldnn/mkldnn_base.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/operator/nn/mkldnn/mkldnn_base.cc b/src/operator/nn/mkldnn/mkldnn_base.cc index b36b9f1de195..947bc5979d85 100644 --- a/src/operator/nn/mkldnn/mkldnn_base.cc +++ b/src/operator/nn/mkldnn/mkldnn_base.cc @@ -243,15 +243,7 @@ void FallBackCompute(FCompute fn, const nnvm::NodeAttrs &attrs, std::vector in_bufs; std::vector in_blobs(inputs.size()); for (size_t i = 0; i < in_blobs.size(); i++) { - if (inputs[i].IsDefault()) { in_blobs[i] = inputs[i].data(); - } else { - in_bufs.emplace_back(inputs[i].shape(), inputs[i].ctx(), - false, inputs[i].dtype()); - auto mem = inputs[i].GetMKLDNNData(); - in_bufs.back().CopyFrom(*mem); - in_blobs[i] = in_bufs.back().data(); - } } std::vector out_blobs(outputs.size()); for (size_t i = 0; i < out_blobs.size(); i++) {