-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[mkldnn-v1.0]fallback mkldnn fc bwd in imperative mode #16672
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. make a swap:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's make this change on 1.0 PR directly @rongzha1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can investigate the root cause and try to fix it. Then we don't need this workaround. This can be done following the 1.0 PR merge. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 1.0 pr |
||
MKLDNN_OPCHECK_INIT(true, outputs.size(), inputs, outputs); | ||
MKLDNNFCBackward(attrs, ctx, inputs, req, outputs); | ||
MKLDNN_OPCHECK_RUN(FullyConnectedGradCompute<cpu>, attrs, ctx, inputs, req, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment for the reason of disabling and TODO(your name)