Add input format in Transpose GetHash (#17737)

* fix the bug of mobilenet-ssd INT8 inference without overloading GetHash
test=develop

* remove the out_grad->format() in TransposeMKLDNNGradOpKernel
test=develop
dependabot/pip/python/requests-2.20.0
lidanqing 6 years ago committed by Tao Luo
parent f893914f1f
commit d7c5c2bd64

@ -46,7 +46,8 @@ class TransposeMKLDNNOpKernel : public paddle::framework::OpKernel<T> {
std::vector<int> nchw_tz = paddle::framework::vectorize2int(input->dims());
const std::string key = platform::TransposeMKLDNNHandler::GetHash(
nchw_tz, axis, ctx.op().Output("Out"));
nchw_tz, axis,
ctx.op().Output("Out") + std::to_string(input->format()));
platform::TransposeMKLDNNHandler handler(nchw_tz, axis, dev_ctx,
mkldnn_engine, key);

Loading…
Cancel
Save