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

Method HandleComplex

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

Complex(Real(c), Imag(c)) -> c

Source from the content-addressed store, hash-verified

2642
2643// Complex(Real(c), Imag(c)) -> c
2644Status AlgebraicSimplifierVisitor::HandleComplex(HloInstruction* complex) {
2645 HloInstruction *c0, *c1;
2646 if (Match(complex, m::Complex(m::Real(m::Op(&c0)), m::Imag(m::Op(&c1)))) &&
2647 c0 == c1) {
2648 return ReplaceInstruction(complex, c0);
2649 }
2650 return Status::OK();
2651}
2652
2653// Real(Complex(r, i)) -> r
2654Status AlgebraicSimplifierVisitor::HandleReal(HloInstruction* real) {

Callers

nothing calls this directly

Calls 5

MatchFunction · 0.70
OpFunction · 0.70
ComplexFunction · 0.50
RealFunction · 0.50
ImagFunction · 0.50

Tested by

no test coverage detected