From 2952d9954ba120bfd7eca05d096993ff45de1b66 Mon Sep 17 00:00:00 2001 From: Haihao Shen Date: Fri, 23 Nov 2018 15:01:18 +0800 Subject: [PATCH] Add the attributes for conv and quantize op --- paddle/fluid/operators/conv_op.cc | 3 +++ paddle/fluid/operators/quantize_op.cc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/paddle/fluid/operators/conv_op.cc b/paddle/fluid/operators/conv_op.cc index 2e48d109f20..3677a68a7f5 100644 --- a/paddle/fluid/operators/conv_op.cc +++ b/paddle/fluid/operators/conv_op.cc @@ -303,6 +303,9 @@ void Conv3DOpMaker::Make() { "Defaults to \"NHWC\". Specify the data format of the output data, " "the input will be transformed automatically. ") .SetDefault("AnyLayout"); + AddAttr("force_fp32_output", + "(bool, default false) Only used in mkldnn INT8 kernel") + .SetDefault(false); // TODO(dzhwinter): need to registered layout transform function AddAttr("workspace_size_MB", "Only used in cudnn kernel. workspace size for cudnn, in MB, " diff --git a/paddle/fluid/operators/quantize_op.cc b/paddle/fluid/operators/quantize_op.cc index dc2d36c6b8c..3d2cd64fcdc 100644 --- a/paddle/fluid/operators/quantize_op.cc +++ b/paddle/fluid/operators/quantize_op.cc @@ -98,6 +98,9 @@ void QuantOpMaker::Make() { AddInput("Input","input data"); AddInput("Scale","scale data"); AddOutput("Output","output data"); + AddAttr("is_negative_input", + "(bool, default false) Only used in mkldnn INT8 kernel") + .SetDefault(false); AddComment(R"DOC(This op will quantize data from FP32 to INT8)DOC"); } -- GitLab