ZhennanQin commented on a change in pull request #16141: [mkldnn-v1.0] Add MKL-DNN Convolution URL: https://github.com/apache/incubator-mxnet/pull/16141#discussion_r324944841
########## File path: src/operator/operator_common.h ########## @@ -526,17 +526,46 @@ class OpSignature { * and the layout to sign the op. */ -#if MXNET_USE_MKLDNN == 1 +#if MXNET_USE_MKLDNN == 100 void AddSign(const mkldnn::memory &mem) { - auto desc = mem.get_primitive_desc().desc(); - hash = hash * 2 + desc.data.format; - eles.push_back(desc.data.format); + auto desc = mem.get_desc(); + hash = hash * 2 + desc.data.format_kind; + eles.push_back(desc.data.format_kind); hash = hash * 2 + desc.data.data_type; eles.push_back(desc.data.data_type); for (int i = 0; i < desc.data.ndims; i++) { hash = hash * 2 + desc.data.dims[i]; eles.push_back(desc.data.dims[i]); } + switch (desc.data.format_kind) { Review comment: OK. Ideally, we can save the hash result into MKLDNNMemory, only computing it when hash result doesn't exist. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services