bartekkuncer commented on a change in pull request #20666:
URL: https://github.com/apache/incubator-mxnet/pull/20666#discussion_r792453753
##########
File path: src/operator/nn/mkldnn/mkldnn_convolution.cc
##########
@@ -113,16 +113,28 @@
std::shared_ptr<mkldnn::convolution_forward::primitive_desc> GetConvFwdImpl(
[¶m, &data, &weights, &output, &attr](const
mkldnn::convolution_forward::desc& desc) {
auto engine = CpuEngine::Get()->get_engine();
try {
- // MKL-DNN introduced padded formats since 0.15 which require more
memory
- // compared to the actual size of the tensor. Currently, MKL-DNN
operators
- // still reuse memory from memory planning, so here we need to
select a
- // suboptimal kernel for computation that has the expected memory
size requirements
+ // MKLDNN introduced padded formats since 0.15 which require more
+ // memory compared to the actual size of the tensor. Currently,
MKLDNN
+ // operators still reuse memory from memory planning, so here we need
+ // to select a suboptimal kernel for computation that has the
expected
+ // memory size requirements
auto conv_pd =
-
std::make_shared<mkldnn::convolution_forward::primitive_desc>(desc, attr,
engine);
- while (conv_pd->dst_desc().get_size() != GetArraySize(output) ||
- conv_pd->src_desc().get_size() != GetArraySize(data) ||
- (!param.mkldnn_param.quantized &&
- conv_pd->weights_desc().get_size() !=
GetArraySize(weights))) {
+ std::make_shared<mkldnn::convolution_forward::primitive_desc>(
+ desc, attr, engine);
+ while (
+ conv_pd->dst_desc().get_size() != GetArraySize(output) ||
+ conv_pd->src_desc().get_size() != GetArraySize(data) ||
+ (!param.mkldnn_param.quantized &&
+ conv_pd->weights_desc().get_size() != GetArraySize(weights)) ||
+ // With the upgrade of MKLDNN to version 2.4+
+ // tests/python/mkl/test_subgraph.py::test_pos_conv_add
+ // started failing. Switching away from primitive with weight
+ // mkldnn::format_tag ABcd4b16a4b is in place to temporairly fix
Review comment:
```suggestion
// mkldnn::format_tag ABcd4b16a4b in order to temporarily fix
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]