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

Method Format

tensorflow/core/profiler/internal/tfprof_timeline.cc:127–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127string ChromeTraceFormatter::Format() {
128 Json::Value trace;
129 trace["traceEvents"] = Json::Value(Json::arrayValue);
130 for (const Json::Value& v : metadata_) {
131 trace["traceEvents"].append(v);
132 }
133 for (const Json::Value& v : events_) {
134 trace["traceEvents"].append(v);
135 }
136 Json::FastWriter writer;
137 string trace_str = writer.write(trace);
138 if (trace_str.length() > 200 * 1024 * 1024) {
139 fprintf(stderr,
140 "Trace file is over 200MB. Chrome might not be able to "
141 "display it. Consider to use filters (e.g. -min_micros "
142 "> 1000 or -op_type .*gpu:0.* to reduce the size.\n");
143 }
144 return trace_str;
145}
146
147void MemoryTracker::TrackNode(int64 step, const GraphNode* node) {
148 if (!node->Trackable(step)) {

Callers 1

OutputTimelineMethod · 0.45

Calls 4

ValueFunction · 0.50
appendMethod · 0.45
writeMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected