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

[MKLDNN] Use MKLDNNRun #16772

Merged
merged 8 commits into from
Nov 29, 2019
Prev Previous commit
Next Next commit
Merge branch 'master' into use_MKLDNNRUN_master
  • Loading branch information
ZhennanQin authored Nov 19, 2019
commit 7c4048983a625728f0d834552a80ac751b8a05d7
5 changes: 3 additions & 2 deletions src/operator/nn/mkldnn/mkldnn_reshape.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ void MKLDNNReshapeForward(const nnvm::NodeAttrs& attrs,
const NDArray &output) {
// For mkldnn non-supported input, it shouldn't hold mkldnn memory, so let's simply fallback to
// naive implement.
if (input.shape().ndim() > 4 || !SupportMKLDNNQuantize(input.dtype())) {
if (req != kWriteInplace && req != kNullOp) {
const int input_ndims = input.shape().ndim();
if ((input_ndims < 1 || input_ndims > 4) || !SupportMKLDNNQuantize(input.dtype())) {
if (req != kWriteInplace) {
FallBackCompute(UnaryOp::IdentityCompute<cpu>, attrs, ctx, {input}, {req}, {output});
}
return;
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.