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

Function DumpExecutionOptions

tensorflow/compiler/xla/service/dump.cc:326–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326void DumpExecutionOptions(const ExecutionOptions& execution_options,
327 const DebugOptions& debug_options) {
328 CanonicalDebugOptions opts(debug_options);
329 tensorflow::Env* env = tensorflow::Env::Default();
330 const string& dir = opts.dump_to;
331 if (env->IsDirectory(dir).ok()) {
332 string filename = tensorflow::io::JoinPath(dir, "execution_options");
333 Status status;
334 if (opts.dump_as_text) {
335 status = tensorflow::WriteTextProto(env, absl::StrCat(filename, ".txt"),
336 execution_options);
337 } else {
338 status = tensorflow::WriteBinaryProto(env, absl::StrCat(filename, ".pb"),
339 execution_options);
340 }
341 if (!status.ok()) {
342 LOG(ERROR) << "Could not write XLA debug data to " << filename << ": "
343 << status;
344 }
345 }
346}
347
348void DumpHloModuleIfEnabled(const HloModule& module, string_view name) {
349 CanonicalDebugOptions opts(module.config().debug_options());

Callers 1

CompileAheadOfTimeMethod · 0.85

Calls 7

DefaultFunction · 0.85
WriteTextProtoFunction · 0.85
WriteBinaryProtoFunction · 0.85
JoinPathFunction · 0.50
StrCatFunction · 0.50
okMethod · 0.45
IsDirectoryMethod · 0.45

Tested by

no test coverage detected