From 98f081778f38dbbc7c212c52c379f31f61247725 Mon Sep 17 00:00:00 2001 From: Pei Yang Date: Wed, 9 Jun 2021 11:08:47 +0800 Subject: [PATCH] add op pbtxt of matmul/matmul_v2/scale/softmax (#33424) * add op pbtxt of matmul/matmul_v2/scale/softmax * add newline * move quant attrs to extra for matmul --- paddle/fluid/operators/compat/matmul.pbtxt | 98 +++++++++++++++++++ paddle/fluid/operators/compat/matmul_v2.pbtxt | 42 ++++++++ paddle/fluid/operators/compat/scale.pbtxt | 43 ++++++++ paddle/fluid/operators/compat/softmax.pbtxt | 55 +++++++++++ 4 files changed, 238 insertions(+) create mode 100644 paddle/fluid/operators/compat/matmul.pbtxt create mode 100644 paddle/fluid/operators/compat/matmul_v2.pbtxt create mode 100644 paddle/fluid/operators/compat/scale.pbtxt create mode 100644 paddle/fluid/operators/compat/softmax.pbtxt diff --git a/paddle/fluid/operators/compat/matmul.pbtxt b/paddle/fluid/operators/compat/matmul.pbtxt new file mode 100644 index 0000000000..e68a7f31b6 --- /dev/null +++ b/paddle/fluid/operators/compat/matmul.pbtxt @@ -0,0 +1,98 @@ +type: "matmul" +def { + inputs { + name: "X" + } + inputs { + name: "Y" + } + outputs { + name: "Out" + } + attrs { + name: "alpha" + type: FLOAT + } + attrs { + name: "transpose_X" + type: BOOLEAN + } + attrs { + name: "transpose_Y" + type: BOOLEAN + } +} +extra { + attrs { + name: "Scale_out" + type: FLOAT + } + attrs { + name: "Scale_x" + type: FLOAT + } + attrs { + name: "Scale_y" + type: FLOAT + } + attrs { + name: "use_mkldnn" + type: BOOLEAN + } + attrs { + name: "mkldnn_data_type" + type: STRING + } + 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: "use_quantizer" + type: BOOLEAN + } + attrs { + name: "force_fp32_output" + type: BOOLEAN + } + attrs { + name: "fused_reshape_Out" + type: INTS + } + attrs { + name: "fused_reshape_X" + type: INTS + } + attrs { + name: "fused_reshape_Y" + type: INTS + } + attrs { + name: "fused_transpose_Out" + type: INTS + } + attrs { + name: "fused_transpose_X" + type: INTS + } + attrs { + name: "fused_transpose_Y" + type: INTS + } +} diff --git a/paddle/fluid/operators/compat/matmul_v2.pbtxt b/paddle/fluid/operators/compat/matmul_v2.pbtxt new file mode 100644 index 0000000000..5f43e1f8bf --- /dev/null +++ b/paddle/fluid/operators/compat/matmul_v2.pbtxt @@ -0,0 +1,42 @@ +type: "matmul_v2" +def { + inputs { + name: "X" + } + inputs { + name: "Y" + } + outputs { + name: "Out" + } + attrs { + name: "trans_x" + type: BOOLEAN + } + attrs { + name: "trans_y" + type: BOOLEAN + } +} +extra { + 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/scale.pbtxt b/paddle/fluid/operators/compat/scale.pbtxt new file mode 100644 index 0000000000..1331cd5cd7 --- /dev/null +++ b/paddle/fluid/operators/compat/scale.pbtxt @@ -0,0 +1,43 @@ +type: "scale" +def { + inputs { + name: "X" + } + outputs { + name: "Out" + } + attrs { + name: "bias" + type: FLOAT + } + attrs { + name: "scale" + type: FLOAT + } + attrs { + name: "bias_after_scale" + type: BOOLEAN + } +} +extra { + 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/softmax.pbtxt b/paddle/fluid/operators/compat/softmax.pbtxt new file mode 100644 index 0000000000..5cd155ed1c --- /dev/null +++ b/paddle/fluid/operators/compat/softmax.pbtxt @@ -0,0 +1,55 @@ +type: "softmax" +def { + inputs { + name: "X" + } + outputs { + name: "Out" + } + attrs { + name: "axis" + type: INT + } + attrs { + name: "data_format" + type: STRING + } +} +extra { + 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: "is_test" + type: BOOLEAN + } + attrs { + name: "mkldnn_data_type" + type: STRING + } + attrs { + name: "use_cudnn" + type: BOOLEAN + } + attrs { + name: "use_mkldnn" + type: BOOLEAN + } +} -- GitLab