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

Method ToProto

tensorflow/compiler/xla/service/hlo_schedule.cc:68–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68StatusOr<HloScheduleProto> HloSchedule::ToProto() const {
69 TF_RETURN_IF_ERROR(Verify());
70 HloScheduleProto proto;
71 for (const auto& id_sequence : sequences_) {
72 int64 computation_id = id_sequence.first;
73 const HloInstructionSequence& sequence = id_sequence.second;
74 HloScheduleProto::InstructionSequence& proto_sequence =
75 (*proto.mutable_sequences())[computation_id];
76 proto_sequence.mutable_instruction_ids()->Reserve(sequence.size());
77 for (const int64 id : sequence.ids()) {
78 proto_sequence.add_instruction_ids(id);
79 }
80 }
81 return std::move(proto);
82}
83
84void HloSchedule::set_sequence(const HloComputation* computation,
85 absl::Span<HloInstruction* const> sequence) {

Callers

nothing calls this directly

Calls 4

idsMethod · 0.80
VerifyFunction · 0.50
ReserveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected