From a01e5133ea4fd1a1bbc49076b38c3e9253445860 Mon Sep 17 00:00:00 2001 From: dyning Date: Mon, 7 Jun 2021 13:52:56 +0800 Subject: [PATCH] Add the op def for elementwise_div elementwise_pow etc (#33288) * Add the op def for elementwise_div elementwise_pow elementwise_sub fake_quantize_dequantize_moving_average_abs_max reduce_mean sqrt test=develop * remove .ipynb_checkpoints for opdef * remove fake_quantize_dequantize_moving_average_abs_max for opdef --- .../operators/compat/elementwise_div.pbtxt | 74 +++++++++++++++++++ .../operators/compat/elementwise_pow.pbtxt | 74 +++++++++++++++++++ .../operators/compat/elementwise_sub.pbtxt | 74 +++++++++++++++++++ .../fluid/operators/compat/reduce_mean.pbtxt | 55 ++++++++++++++ paddle/fluid/operators/compat/sqrt.pbtxt | 39 ++++++++++ 5 files changed, 316 insertions(+) create mode 100644 paddle/fluid/operators/compat/elementwise_div.pbtxt create mode 100644 paddle/fluid/operators/compat/elementwise_pow.pbtxt create mode 100644 paddle/fluid/operators/compat/elementwise_sub.pbtxt create mode 100644 paddle/fluid/operators/compat/reduce_mean.pbtxt create mode 100644 paddle/fluid/operators/compat/sqrt.pbtxt diff --git a/paddle/fluid/operators/compat/elementwise_div.pbtxt b/paddle/fluid/operators/compat/elementwise_div.pbtxt new file mode 100644 index 0000000000..40e9d90dbf --- /dev/null +++ b/paddle/fluid/operators/compat/elementwise_div.pbtxt @@ -0,0 +1,74 @@ +type: "elementwise_div" +def { + inputs { + name: "X" + } + inputs { + name: "Y" + } + outputs { + name: "Out" + } + attrs { + name: "axis" + type: INT + } +} +extra { + attrs { + name: "use_mkldnn" + type: BOOLEAN + } + attrs { + name: "x_data_format" + type: STRING + } + attrs { + name: "y_data_format" + type: STRING + } + attrs { + name: "use_quantizer" + type: BOOLEAN + } + attrs { + name: "mkldnn_data_type" + type: STRING + } + attrs { + name: "Scale_x" + type: FLOAT + } + attrs { + name: "Scale_y" + type: FLOAT + } + attrs { + name: "Scale_out" + type: FLOAT + } + attrs { + name: "op_role" + type: INT + } + attrs { + name: "op_role_var" + type: STRINGS + } + attrs { + name: "op_namescope" + type: STRING + } + attrs { + name: "op_callstack" + type: STRINGS + } + attrs { + name: "op_device" + type: STRING + } + attrs { + name: "act" + type: STRING + } +} diff --git a/paddle/fluid/operators/compat/elementwise_pow.pbtxt b/paddle/fluid/operators/compat/elementwise_pow.pbtxt new file mode 100644 index 0000000000..3ad21423e4 --- /dev/null +++ b/paddle/fluid/operators/compat/elementwise_pow.pbtxt @@ -0,0 +1,74 @@ +type: "elementwise_pow" +def { + inputs { + name: "X" + } + inputs { + name: "Y" + } + outputs { + name: "Out" + } + attrs { + name: "axis" + type: INT + } +} +extra { + attrs { + name: "use_mkldnn" + type: BOOLEAN + } + attrs { + name: "x_data_format" + type: STRING + } + attrs { + name: "y_data_format" + type: STRING + } + attrs { + name: "use_quantizer" + type: BOOLEAN + } + attrs { + name: "mkldnn_data_type" + type: STRING + } + attrs { + name: "Scale_x" + type: FLOAT + } + attrs { + name: "Scale_y" + type: FLOAT + } + attrs { + name: "Scale_out" + type: FLOAT + } + attrs { + name: "op_role" + type: INT + } + attrs { + name: "op_role_var" + type: STRINGS + } + attrs { + name: "op_namescope" + type: STRING + } + attrs { + name: "op_callstack" + type: STRINGS + } + attrs { + name: "op_device" + type: STRING + } + attrs { + name: "act" + type: STRING + } +} diff --git a/paddle/fluid/operators/compat/elementwise_sub.pbtxt b/paddle/fluid/operators/compat/elementwise_sub.pbtxt new file mode 100644 index 0000000000..b449e76ca0 --- /dev/null +++ b/paddle/fluid/operators/compat/elementwise_sub.pbtxt @@ -0,0 +1,74 @@ +type: "elementwise_sub" +def { + inputs { + name: "X" + } + inputs { + name: "Y" + } + outputs { + name: "Out" + } + attrs { + name: "axis" + type: INT + } +} +extra { + attrs { + name: "use_mkldnn" + type: BOOLEAN + } + attrs { + name: "x_data_format" + type: STRING + } + attrs { + name: "y_data_format" + type: STRING + } + attrs { + name: "use_quantizer" + type: BOOLEAN + } + attrs { + name: "mkldnn_data_type" + type: STRING + } + attrs { + name: "Scale_x" + type: FLOAT + } + attrs { + name: "Scale_y" + type: FLOAT + } + attrs { + name: "Scale_out" + type: FLOAT + } + attrs { + name: "op_role" + type: INT + } + attrs { + name: "op_role_var" + type: STRINGS + } + attrs { + name: "op_namescope" + type: STRING + } + attrs { + name: "op_callstack" + type: STRINGS + } + attrs { + name: "op_device" + type: STRING + } + attrs { + name: "act" + type: STRING + } +} diff --git a/paddle/fluid/operators/compat/reduce_mean.pbtxt b/paddle/fluid/operators/compat/reduce_mean.pbtxt new file mode 100644 index 0000000000..eea6ad127f --- /dev/null +++ b/paddle/fluid/operators/compat/reduce_mean.pbtxt @@ -0,0 +1,55 @@ +type: "reduce_mean" +def { + inputs { + name: "X" + } + outputs { + name: "Out" + } + attrs { + name: "dim" + type: INTS + } + attrs { + name: "keep_dim" + type: BOOLEAN + } +} +extra { + attrs { + name: "reduce_all" + type: BOOLEAN + } + attrs { + name: "in_dtype" + type: INT + } + attrs { + name: "out_dtype" + type: INT + } + attrs { + name: "use_mkldnn" + type: BOOLEAN + } + attrs { + name: "op_role" + type: INT + } + attrs { + name: "op_role_var" + type: STRINGS + } + attrs { + name: "op_namescope" + type: STRING + } + attrs { + name: "op_callstack" + type: STRINGS + } + attrs { + name: "op_device" + type: STRING + } +} diff --git a/paddle/fluid/operators/compat/sqrt.pbtxt b/paddle/fluid/operators/compat/sqrt.pbtxt new file mode 100644 index 0000000000..2dbcba802a --- /dev/null +++ b/paddle/fluid/operators/compat/sqrt.pbtxt @@ -0,0 +1,39 @@ +type: "sqrt" +def { + inputs { + name: "X" + } + outputs { + name: "Out" + } +} +extra { + attrs { + name: "use_mkldnn" + type: BOOLEAN + } + attrs { + name: "use_cudnn" + type: BOOLEAN + } + attrs { + name: "op_role" + type: INT + } + attrs { + name: "op_role_var" + type: STRINGS + } + attrs { + name: "op_namescope" + type: STRING + } + attrs { + name: "op_callstack" + type: STRINGS + } + attrs { + name: "op_device" + type: STRING + } +} -- GitLab