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

Commit

Permalink
fallback mkldnn fc bwd in imperative mode (#16672)
Browse files Browse the repository at this point in the history
  • Loading branch information
rongzha1 authored and pengzhao-intel committed Oct 30, 2019
1 parent b5d4f87 commit e663ce1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/operator/nn/fully_connected.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ void FullyConnectedGradComputeExCPU(const nnvm::NodeAttrs& attrs,
const std::vector<NDArray> &inputs,
const std::vector<OpReqType> &req,
const std::vector<NDArray> &outputs) {
if (SupportMKLDNNFC(inputs[0])) {
bool mkldnn_fc_backward_enable = false;
if (SupportMKLDNNFC(inputs[0]) && mkldnn_fc_backward_enable) {
MKLDNN_OPCHECK_INIT(true, outputs.size(), inputs, outputs);
MKLDNNFCBackward(attrs, ctx, inputs, req, outputs);
MKLDNN_OPCHECK_RUN(FullyConnectedGradCompute<cpu>, attrs, ctx, inputs, req,
Expand Down

0 comments on commit e663ce1

Please sign in to comment.