diff --git a/src/operator/subgraph/mkldnn/mkldnn_conv.cc b/src/operator/subgraph/mkldnn/mkldnn_conv.cc index b7776d648e18..be2716f139ed 100644 --- a/src/operator/subgraph/mkldnn/mkldnn_conv.cc +++ b/src/operator/subgraph/mkldnn/mkldnn_conv.cc @@ -426,15 +426,12 @@ void SgMKLDNNConvOperator::Forward(const OpContext &ctx, MKLDNNStream::Get()->Submit(); } else { std::vector new_inputs; - std::vector new_req; if (has_bias) { new_inputs = {data, cached_weight_, cached_bias_}; - new_req = {req[in_data], req[in_weight], req[in_bias]}; } else { new_inputs = {data, cached_weight_}; - new_req = {req[in_data], req[in_weight]}; } - MKLDNNConvolutionForwardFullFeature(full_conv_param, ctx, fwd_.get(), new_inputs, new_req, + MKLDNNConvolutionForwardFullFeature(full_conv_param, ctx, fwd_.get(), new_inputs, req, {output}); } diff --git a/src/operator/subgraph/mkldnn/mkldnn_fc.cc b/src/operator/subgraph/mkldnn/mkldnn_fc.cc index 22432193dcf9..6ebbb79d2571 100644 --- a/src/operator/subgraph/mkldnn/mkldnn_fc.cc +++ b/src/operator/subgraph/mkldnn/mkldnn_fc.cc @@ -188,16 +188,13 @@ void SgMKLDNNFCOp::Forward(const OpContext &ctx, initialized_ = true; } std::vector new_inputs; - std::vector new_req; if (has_bias) { new_inputs = {data, weight, cached_bias_}; - new_req = {req[fullc::kData], req[fullc::kWeight], req[fullc::kBias]}; } else { new_inputs = {data, weight}; - new_req = {req[fullc::kData], req[fullc::kWeight]}; } - MKLDNNFCForwardFullFeature(full_param_, ctx, fwd_.get(), new_inputs, new_req, out_data); + MKLDNNFCForwardFullFeature(full_param_, ctx, fwd_.get(), new_inputs, req, out_data); if (mkldnn_param.quantized && !mkldnn_param.enable_float_output) { float *min_output_ptr = out_data[quantized_fullc::kOutMin].data().dptr();