static*/
| 91 | |
| 92 | /*static*/ |
| 93 | StatusOr<HeapSimulator::Result> HeapSimulator::Run( |
| 94 | std::unique_ptr<HeapAlgorithm> algorithm, const HloModule& module, |
| 95 | const HloSchedule& schedule, const HloAliasAnalysis& alias_analysis, |
| 96 | const BufferValue::SizeFunction& size_fn, const Options& options) { |
| 97 | HeapSimulator heap(std::move(algorithm), size_fn, options, &schedule); |
| 98 | const HloComputation* entry_computation = module.entry_computation(); |
| 99 | const HloInstructionSequence& instruction_sequence = |
| 100 | schedule.sequence(entry_computation); |
| 101 | TF_ASSIGN_OR_RETURN( |
| 102 | std::unique_ptr<HloLiveRange> hlo_live_range, |
| 103 | HloLiveRange::Run(schedule, alias_analysis, entry_computation)); |
| 104 | TF_RETURN_IF_ERROR(heap.RunComputation(*entry_computation, |
| 105 | instruction_sequence, alias_analysis, |
| 106 | hlo_live_range.get())); |
| 107 | return heap.Finish(); |
| 108 | } |
| 109 | |
| 110 | /*static*/ |
| 111 | StatusOr<HeapSimulator::Result> HeapSimulator::Run( |
nothing calls this directly
no test coverage detected