From 2d3c977b5b459765ce90c57e7ff2952d935b3374 Mon Sep 17 00:00:00 2001 From: xiaolil1 Date: Wed, 31 Oct 2018 13:51:13 +0800 Subject: [PATCH] modify conv op for skipping s8 reorder to u8 on sum fusion --- paddle/fluid/operators/conv_mkldnn_op.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paddle/fluid/operators/conv_mkldnn_op.cc b/paddle/fluid/operators/conv_mkldnn_op.cc index 6f667162f01..624377934a5 100644 --- a/paddle/fluid/operators/conv_mkldnn_op.cc +++ b/paddle/fluid/operators/conv_mkldnn_op.cc @@ -564,6 +564,10 @@ class ConvMKLDNNOpKernel : public paddle::framework::OpKernel { pipeline.push_back(*conv_p); stream(stream::kind::eager).submit(pipeline).wait(); + if(is_INT8 && fuse_residual_conn){ + output->mutable_data(ctx.GetPlace()); + } + output->set_layout(DataLayout::kMKLDNN); output->set_format(GetMKLDNNFormat(*dst_memory_p)); } -- GitLab