提交 2952d995 编写于 作者: H Haihao Shen

Add the attributes for conv and quantize op

上级 ab89c546
...@@ -303,6 +303,9 @@ void Conv3DOpMaker::Make() { ...@@ -303,6 +303,9 @@ void Conv3DOpMaker::Make() {
"Defaults to \"NHWC\". Specify the data format of the output data, " "Defaults to \"NHWC\". Specify the data format of the output data, "
"the input will be transformed automatically. ") "the input will be transformed automatically. ")
.SetDefault("AnyLayout"); .SetDefault("AnyLayout");
AddAttr<bool>("force_fp32_output",
"(bool, default false) Only used in mkldnn INT8 kernel")
.SetDefault(false);
// TODO(dzhwinter): need to registered layout transform function // TODO(dzhwinter): need to registered layout transform function
AddAttr<int>("workspace_size_MB", AddAttr<int>("workspace_size_MB",
"Only used in cudnn kernel. workspace size for cudnn, in MB, " "Only used in cudnn kernel. workspace size for cudnn, in MB, "
......
...@@ -98,6 +98,9 @@ void QuantOpMaker::Make() { ...@@ -98,6 +98,9 @@ void QuantOpMaker::Make() {
AddInput("Input","input data"); AddInput("Input","input data");
AddInput("Scale","scale data"); AddInput("Scale","scale data");
AddOutput("Output","output data"); AddOutput("Output","output data");
AddAttr<bool>("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"); AddComment(R"DOC(This op will quantize data from FP32 to INT8)DOC");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册