From d17e9726d7e38f35668226b76d856e8bae463127 Mon Sep 17 00:00:00 2001 From: Hoai Linh Tran Date: Mon, 17 Aug 2020 22:44:29 -0400 Subject: [PATCH] Update compare of X in Greater op --- .../ccsrc/frontend/optimizer/irpass/value_based_eliminate.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/ccsrc/frontend/optimizer/irpass/value_based_eliminate.cc b/mindspore/ccsrc/frontend/optimizer/irpass/value_based_eliminate.cc index 95656c70849..2184d48c232 100644 --- a/mindspore/ccsrc/frontend/optimizer/irpass/value_based_eliminate.cc +++ b/mindspore/ccsrc/frontend/optimizer/irpass/value_based_eliminate.cc @@ -98,10 +98,10 @@ AnfNodePtr ValueBasedEliminate::operator()(const OptimizerPtr &, const AnfNodePt PConstant zero_scalar_(node, false, 0, true); // {prim::kPrimSelect, {prim::kPrimGreater, X, 0}, Y, Z}} -> Y when X is always greater than 0 - MATCH_REPLACE_IF(node, PPrimitive(prim::kPrimSelect, PPrimitive(prim::kPrimGreater, x, zero_), y, z), y, + MATCH_REPLACE_IF(node, PPrimitive(prim::kPrimSelect, PPrimitive(prim::kPrimGreaterEqual, x, zero_), y, z), y, IsCNodePositive(x.GetNode(node))); - MATCH_REPLACE_IF(node, PPrimitive(prim::kPrimSelect, PPrimitive(prim::kPrimGreater, x, zero_scalar_), y, z), y, + MATCH_REPLACE_IF(node, PPrimitive(prim::kPrimSelect, PPrimitive(prim::kPrimGreaterEqual, x, zero_scalar_), y, z), y, IsCNodePositive(x.GetNode(node))); // {prim::kPrimMaximum, X, LOWER_FLT_LIMIT}} -> X