提交 d7c5c2bd 编写于 作者: L lidanqing 提交者: Tao Luo

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
上级 f893914f
...@@ -46,7 +46,8 @@ class TransposeMKLDNNOpKernel : public paddle::framework::OpKernel<T> { ...@@ -46,7 +46,8 @@ class TransposeMKLDNNOpKernel : public paddle::framework::OpKernel<T> {
std::vector<int> nchw_tz = paddle::framework::vectorize2int(input->dims()); std::vector<int> nchw_tz = paddle::framework::vectorize2int(input->dims());
const std::string key = platform::TransposeMKLDNNHandler::GetHash( 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, platform::TransposeMKLDNNHandler handler(nchw_tz, axis, dev_ctx,
mkldnn_engine, key); mkldnn_engine, key);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册