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

Function GetTraceString

tensorflow/core/profiler/internal/tfprof_code.cc:39–48  ·  view source on GitHub ↗

Convert to Trace proto into a short readable string.

Source from the content-addressed store, hash-verified

37
38// Convert to Trace proto into a short readable string.
39string GetTraceString(const CallStack::Trace& trace) {
40 string ntrace(io::Basename(trace.file()));
41 ntrace += strings::StrCat(":", trace.lineno());
42 if (trace.function().length() < 20) {
43 ntrace += ":" + trace.function();
44 } else {
45 ntrace += ":" + trace.function().substr(0, 17) + "...";
46 }
47 return ntrace;
48}
49
50bool IsGradNode(const string& name, string* forward_name) {
51 // Given a forward operation with name op, its gradient op has the following

Callers 2

AddNodeMethod · 0.85
BuildMethod · 0.85

Calls 6

BasenameFunction · 0.85
StrCatFunction · 0.50
fileMethod · 0.45
linenoMethod · 0.45
lengthMethod · 0.45
functionMethod · 0.45

Tested by

no test coverage detected