MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / HandleAbs

Method HandleAbs

tensorflow/compiler/xla/service/algebraic_simplifier.cc:575–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575Status AlgebraicSimplifierVisitor::HandleAbs(HloInstruction* abs) {
576 HloInstruction* abs_operand = abs->mutable_operand(0);
577 VLOG(10) << "trying transform [Abs(A) => A] " << abs->ToString()
578 << " Abs operand is: " << abs_operand->ToString();
579 if (IsNonNegative(abs->operand(0), options_)) {
580 return ReplaceInstruction(abs, abs_operand);
581 }
582 return Status::OK();
583}
584
585Status AlgebraicSimplifierVisitor::HandleAdd(HloInstruction* add) {
586 HloInstruction *lhs, *rhs;

Callers 1

VisitMethod · 0.45

Calls 4

IsNonNegativeFunction · 0.85
mutable_operandMethod · 0.80
ToStringMethod · 0.45
operandMethod · 0.45

Tested by

no test coverage detected