Skip to content

Commit

Permalink
[MKLDNN] apply MKLDNNRun to quantized_act/transpose (apache#17689)
Browse files Browse the repository at this point in the history
* apply MKLDNNRun to quantized_act/transpose ops

* run CI
  • Loading branch information
wuxun-zhang committed Apr 18, 2020
1 parent 814530d commit b652c4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/operator/quantization/mkldnn/mkldnn_quantized_act.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static void MKLDNNQuantizedActForward(const nnvm::NodeAttrs& attrs,
<< "_contrib_quantized_act op only supports uint8 and int8 as input "
"type";

MKLDNNActivationForward(attrs, ctx, in_data[0], req[0], out_data[0]);
MKLDNNRun(MKLDNNActivationForward, attrs, ctx, in_data[0], req[0], out_data[0]);
out_data[1].data().dptr<float>()[0] = in_data[1].data().dptr<float>()[0];
out_data[2].data().dptr<float>()[0] = in_data[2].data().dptr<float>()[0];
}
Expand Down
2 changes: 1 addition & 1 deletion src/operator/tensor/matrix_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static void TransposeComputeExCPU(const nnvm::NodeAttrs& attrs,
CHECK_EQ(outputs.size(), 1U);

if (SupportMKLDNNTranspose(param, inputs[0]) && req[0] == kWriteTo) {
MKLDNNTransposeForward(attrs, ctx, inputs[0], req[0], outputs[0]);
MKLDNNRun(MKLDNNTransposeForward, attrs, ctx, inputs[0], req[0], outputs[0]);
return;
}
FallBackCompute(Transpose<cpu>, attrs, ctx, inputs, req, outputs);
Expand Down

0 comments on commit b652c4d

Please sign in to comment.