Skip to content

Commit

Permalink
Add kPower case to IsNonNegative
Browse files Browse the repository at this point in the history
  • Loading branch information
apivovarov committed Jun 25, 2024
1 parent 61b0032 commit 65e79cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xla/service/algebraic_simplifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ bool IsNonNegative(const HloInstruction* hlo,
return IsNonNegative(hlo->operand(0), options) ||
IsNonNegative(hlo->operand(1), options);
}
case HloOpcode::kPower: {
return IsNonNegative(hlo->operand(0), options);
}
case HloOpcode::kSelect: {
return IsNonNegative(hlo->operand(1), options) &&
IsNonNegative(hlo->operand(2), options);
Expand Down

0 comments on commit 65e79cd

Please sign in to comment.