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

Method DeepCloneComputation

tensorflow/compiler/xla/service/hlo_module.cc:690–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688}
689
690HloComputation* HloModule::DeepCloneComputation(HloComputation* computation,
691 HloCloneContext* context) {
692 HloComputation* new_computation;
693 if (context != nullptr) {
694 if ((new_computation = context->FindComputation(computation)) != nullptr) {
695 return new_computation;
696 }
697 new_computation =
698 AddEmbeddedComputation(computation->Clone(context->suffix(), context));
699 } else {
700 new_computation = AddEmbeddedComputation(computation->Clone(""));
701 }
702 return new_computation;
703}
704
705uint64 HloModule::RandomNew64() const {
706 tensorflow::mutex_lock l(rng_mutex_);

Callers 6

CloneWithNewOperandsMethod · 0.80
ExpandInstructionMethod · 0.80
ExpandInstructionMethod · 0.80
GetComputationForRngFunction · 0.80
MakeSortHloFunction · 0.80

Calls 2

FindComputationMethod · 0.45
CloneMethod · 0.45

Tested by

no test coverage detected