!29123 fix Conv2DBackpropEltwiseEltwiseFusion pattern
Merge pull request !29123 from yuchaojie/r1.6_fix
This commit is contained in:
commit
652dfde4a6
|
@ -33,7 +33,7 @@ void BnupdateEltwiseEltwiseFusionPass::MatchBnupdateAddRelu(const CNodePtr &cnod
|
|||
MS_EXCEPTION_IF_NULL(relu_input);
|
||||
auto add = relu_input->cast<CNodePtr>();
|
||||
MS_EXCEPTION_IF_NULL(add);
|
||||
if (AnfAlgo::GetInputTensorNum(cnode) != (ELTWISE_DOUBLE_IN_INPUT_SIZE - 1)) {
|
||||
if (AnfAlgo::GetInputTensorNum(add) != (ELTWISE_DOUBLE_IN_INPUT_SIZE - 1)) {
|
||||
return;
|
||||
}
|
||||
auto tuple_getitem = add->input(kIndex1);
|
||||
|
|
|
@ -29,7 +29,7 @@ void Conv2DBackpropEltwiseEltwiseFusionPass::MatchConv2DBackpropInputEltwiseEltw
|
|||
mindspore::HashSet<AnfNodePtr> record{cnode};
|
||||
auto eltwise_input = cnode->input(kIndex1);
|
||||
MS_EXCEPTION_IF_NULL(eltwise_input);
|
||||
if (CheckDoubleInEltWiseNode(kernel_graph, eltwise_input) && AnfAlgo::GetCNodeName(cnode) == kAddNOpName) {
|
||||
if (CheckDoubleInEltWiseNode(kernel_graph, eltwise_input) && AnfAlgo::GetCNodeName(eltwise_input) == kAddNOpName) {
|
||||
(void)record.insert(eltwise_input);
|
||||
} else {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue