未验证 提交 1b0db6bf 编写于 作者: H HongyuJia 提交者: GitHub

[0D-Tensor] Support ElementwiseBinaryOp (#54118)

上级 b75c0c24
...@@ -58,11 +58,26 @@ void CinnZeroTensorTrickPass::ApplyImpl(ir::Graph* graph) const { ...@@ -58,11 +58,26 @@ void CinnZeroTensorTrickPass::ApplyImpl(ir::Graph* graph) const {
} }
} }
// CINN ops in this white list support 0D-Tensor // CINN ops in this white list support 0D-Tensor, wait-list = {"remainder"}
const std::unordered_set<std::string> white_op_list{"elementwise_add", const std::unordered_set<std::string> white_op_list{"elementwise_add",
"elementwise_sub", "elementwise_sub",
"elementwise_mul", "elementwise_mul",
"elementwise_div"}; "elementwise_div",
"atan2",
"floor_divide",
"mod",
"maximum",
"minimum",
"pow",
"logical_and",
"logical_or",
"logical_xor",
"equal",
"not_equal",
"greater_than",
"greater_equal",
"less_than",
"less_equal"};
std::unordered_set<std::string> white_tensor_name; std::unordered_set<std::string> white_tensor_name;
// enable white_op_list only when graph_node_size = 1, which means single op // enable white_op_list only when graph_node_size = 1, which means single op
// test // test
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册