未验证 提交 9e9a569d 编写于 作者: P Pei Yang 提交者: GitHub

add trt int8 support for elementwise_mul and scale (#25676)

上级 d11c140e
...@@ -54,7 +54,10 @@ struct SimpleOpTypeSetTeller : public Teller { ...@@ -54,7 +54,10 @@ struct SimpleOpTypeSetTeller : public Teller {
"leaky_relu", "leaky_relu",
"fc", "fc",
"relu6", "relu6",
"concat"}; "concat",
"scale",
"elementwise_mul",
"conv2d_transpose"};
std::unordered_set<std::string> teller_set{ std::unordered_set<std::string> teller_set{
"mul", "mul",
"conv2d", "conv2d",
......
...@@ -46,9 +46,26 @@ _fake_quant_dequant_op_list = [ ...@@ -46,9 +46,26 @@ _fake_quant_dequant_op_list = [
] ]
_out_scale_op_list = [ _out_scale_op_list = [
"conv2d", "depthwise_conv2d", "mul", "matmul", "relu", "leaky_relu", "conv2d",
"relu6", "sigmoid", "tanh", "prelu", "swish", "softmax", "batch_norm", "depthwise_conv2d",
"elementwise_add", "pool2d", "reshape2", "transpose2", "concat" "mul",
"matmul",
"relu",
"leaky_relu",
"relu6",
"sigmoid",
"tanh",
"prelu",
"swish",
"softmax",
"batch_norm",
"elementwise_add",
"pool2d",
"reshape2",
"transpose2",
"concat",
"elementwise_mul",
"scale",
] ]
# list op real input and output names, to avoid processing input such as AxisTensor. # list op real input and output names, to avoid processing input such as AxisTensor.
...@@ -90,6 +107,8 @@ _op_real_in_out_name = { ...@@ -90,6 +107,8 @@ _op_real_in_out_name = {
"dropout": [["X"], ["Out"]], "dropout": [["X"], ["Out"]],
"batch_norm": [["X"], ["Y"]], "batch_norm": [["X"], ["Y"]],
"sigmoid": [["X"], ["Out"]], "sigmoid": [["X"], ["Out"]],
"elementwise_mul": [["X", "Y"], ["Out"]],
"scale": [["X"], ["Out"]],
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册