| 688 | } |
| 689 | |
| 690 | HloComputation* 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 | |
| 705 | uint64 HloModule::RandomNew64() const { |
| 706 | tensorflow::mutex_lock l(rng_mutex_); |
no test coverage detected