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

Method HandleBitcast

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

Source from the content-addressed store, hash-verified

747}
748
749Status AlgebraicSimplifierVisitor::HandleBitcast(HloInstruction* bitcast) {
750 // If a bitcast feeds a bitcast, make it a single bitcast.
751 HloInstruction* op;
752 if (Match(bitcast, m::Bitcast(m::Bitcast(m::Op(&op))))) {
753 return ReplaceWithNewInstruction(
754 bitcast, HloInstruction::CreateBitcast(bitcast->shape(), op));
755 }
756 // All bitcasts can be eliminated (assuming layout constraints are
757 // satisfied).
758 ReplaceInstructionIfSameShape(bitcast, bitcast->mutable_operand(0));
759 return Status::OK();
760}
761
762Status AlgebraicSimplifierVisitor::HandleBitcastConvert(
763 HloInstruction* bitcast) {

Callers

nothing calls this directly

Calls 5

BitcastFunction · 0.85
mutable_operandMethod · 0.80
MatchFunction · 0.70
OpFunction · 0.70
shapeMethod · 0.45

Tested by

no test coverage detected