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

Method ToString

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

Source from the content-addressed store, hash-verified

217}
218
219string HloModule::ToString(const HloPrintOptions& options) const {
220 std::ostringstream s;
221 s << "HloModule " << PrintName(name(), options.print_ids());
222 if (has_schedule()) {
223 TF_CHECK_OK(schedule().Verify());
224 s << ", is_scheduled=true";
225 }
226 s << "\n\n";
227 const auto& computations = options.canonicalize_computations()
228 ? MakeComputationSortedByContent()
229 : MakeComputationPostOrder();
230 for (const HloComputation* computation : computations) {
231 if (!options.print_computation(computation)) {
232 continue;
233 }
234 if (computation == entry_computation()) {
235 s << "ENTRY ";
236 }
237 if (has_schedule() && schedule().is_computation_scheduled(computation)) {
238 s << computation->ToString(
239 options, schedule().sequence(computation).instructions())
240 << "\n\n";
241 } else {
242 s << computation->ToString(options) << "\n\n";
243 }
244 }
245 return s.str();
246}
247
248HloModuleProto HloModule::ToProto() const {
249 HloModuleProto proto;

Calls 9

PrintNameFunction · 0.85
nameFunction · 0.85
print_idsMethod · 0.80
print_computationMethod · 0.80
instructionsMethod · 0.80
sequenceMethod · 0.80
VerifyMethod · 0.45

Tested by

no test coverage detected