We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da95178 commit 73dbab3Copy full SHA for 73dbab3
paddle/fluid/operators/mkldnn/conv_mkldnn_op.cc
@@ -1052,7 +1052,11 @@ class ConvMKLDNNGradOpKernel : public paddle::framework::OpKernel<T> {
1052
astream.wait();
1053
1054
filter_grad->set_layout(DataLayout::kMKLDNN);
1055
- filter_grad->set_format(GetMKLDNNFormat(*diff_weights_memory_p));
+ // in OneDNN groups in convolution are treated as separate dimension
1056
+ // which is not the case in paddlepaddle
1057
+ auto filter_fmt = GetMKLDNNFormat(*diff_weights_memory_p);
1058
+ filter_grad->set_format(platform::MKLDNNFormatForSize(
1059
+ g > 1 ? weights_tz.size() - 1 : weights_tz.size(), filter_fmt));
1060
}
1061
if (input_grad) {
1062
auto weights_memory_p = handler.AcquireWeightsMemoryFromDataPrimitive(
0 commit comments