From 1b0db6bff971639a980428ef520bf17edb1328c1 Mon Sep 17 00:00:00 2001 From: HongyuJia Date: Fri, 26 May 2023 14:14:02 +0800 Subject: [PATCH] [0D-Tensor] Support ElementwiseBinaryOp (#54118) --- .../cinn_zero_tensor_trick_pass.cc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/framework/paddle2cinn/cinn_zero_tensor_trick_pass.cc b/paddle/fluid/framework/paddle2cinn/cinn_zero_tensor_trick_pass.cc index 3ff18200a0d..a7c06af4724 100644 --- a/paddle/fluid/framework/paddle2cinn/cinn_zero_tensor_trick_pass.cc +++ b/paddle/fluid/framework/paddle2cinn/cinn_zero_tensor_trick_pass.cc @@ -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 white_op_list{"elementwise_add", "elementwise_sub", "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 white_tensor_name; // enable white_op_list only when graph_node_size = 1, which means single op // test -- GitLab