Change the prefix of xprof arguments from "$" to "_".
PiperOrigin-RevId: 316166741 Change-Id: I3a83f550755e6c34a179781d61ab6c24b03cca13
This commit is contained in:
parent
cd6a929e30
commit
287a60c12a
tensorflow/core
common_runtime
distributed_runtime
profiler
@ -511,11 +511,11 @@ Status DirectSession::RunInternal(
|
|||||||
model_metadata.version());
|
model_metadata.version());
|
||||||
return profiler::TraceMeEncode("SessionRun",
|
return profiler::TraceMeEncode("SessionRun",
|
||||||
{{"id", step_id},
|
{{"id", step_id},
|
||||||
{"$r", 1} /*root_event*/,
|
{"_r", 1} /*root_event*/,
|
||||||
{"model_id", model_id}});
|
{"model_id", model_id}});
|
||||||
} else {
|
} else {
|
||||||
return profiler::TraceMeEncode(
|
return profiler::TraceMeEncode(
|
||||||
"SessionRun", {{"id", step_id}, {"$r", 1} /*root_event*/});
|
"SessionRun", {{"id", step_id}, {"_r", 1} /*root_event*/});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
profiler::ContextType::kTfExecutor, step_id,
|
profiler::ContextType::kTfExecutor, step_id,
|
||||||
|
@ -387,7 +387,7 @@ void KernelAndDeviceFunc::RunAsync(
|
|||||||
// To TraceMeConsumers in ExecutorState::Process/Finish.
|
// To TraceMeConsumers in ExecutorState::Process/Finish.
|
||||||
[&] {
|
[&] {
|
||||||
return profiler::TraceMeEncode(
|
return profiler::TraceMeEncode(
|
||||||
"FunctionRun", {{"id", opts->step_id}, {"$r", 1} /*root_event*/});
|
"FunctionRun", {{"id", opts->step_id}, {"_r", 1} /*root_event*/});
|
||||||
},
|
},
|
||||||
profiler::ContextType::kTfExecutor, opts->step_id,
|
profiler::ContextType::kTfExecutor, opts->step_id,
|
||||||
profiler::TraceMeLevel::kInfo);
|
profiler::TraceMeLevel::kInfo);
|
||||||
|
@ -424,7 +424,7 @@ void GraphMgr::ExecuteAsync(const string& handle, const int64 step_id,
|
|||||||
// To TraceMeConsumers in ExecutorState::Process/Finish or RunGraphDone.
|
// To TraceMeConsumers in ExecutorState::Process/Finish or RunGraphDone.
|
||||||
[step_id] {
|
[step_id] {
|
||||||
return profiler::TraceMeEncode(
|
return profiler::TraceMeEncode(
|
||||||
"RunGraph", {{"id", step_id}, {"$r", 1} /*root_event*/});
|
"RunGraph", {{"id", step_id}, {"_r", 1} /*root_event*/});
|
||||||
},
|
},
|
||||||
profiler::ContextType::kTfExecutor, step_id,
|
profiler::ContextType::kTfExecutor, step_id,
|
||||||
profiler::TraceMeLevel::kInfo);
|
profiler::TraceMeLevel::kInfo);
|
||||||
|
@ -88,8 +88,7 @@ class TraceMeProducer {
|
|||||||
trace_me_.AppendMetadata([&] {
|
trace_me_.AppendMetadata([&] {
|
||||||
context_id_ =
|
context_id_ =
|
||||||
context_id.has_value() ? *context_id : TraceMe::NewActivityId();
|
context_id.has_value() ? *context_id : TraceMe::NewActivityId();
|
||||||
return TraceMeEncode(
|
return TraceMeEncode({{"_pt", context_type}, {"_p", context_id_}});
|
||||||
{{"$pt", static_cast<int>(context_type)}, {"$p", context_id_}});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,8 +106,7 @@ class TraceMeConsumer {
|
|||||||
int level = 2)
|
int level = 2)
|
||||||
: trace_me_(name, level) {
|
: trace_me_(name, level) {
|
||||||
trace_me_.AppendMetadata([&] {
|
trace_me_.AppendMetadata([&] {
|
||||||
return TraceMeEncode(
|
return TraceMeEncode({{"_ct", context_type}, {"_c", context_id}});
|
||||||
{{"$ct", static_cast<int>(context_type)}, {"$c", context_id}});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,12 +148,12 @@ const StatTypeMap& GetStatTypeMap() {
|
|||||||
{"kpi_name", kKpiName},
|
{"kpi_name", kKpiName},
|
||||||
{"kpi_value", kKpiValue},
|
{"kpi_value", kKpiValue},
|
||||||
// XPlane semantics related.
|
// XPlane semantics related.
|
||||||
{"$pt", kProducerType},
|
{"_pt", kProducerType},
|
||||||
{"$ct", kConsumerType},
|
{"_ct", kConsumerType},
|
||||||
{"$p", kProducerId},
|
{"_p", kProducerId},
|
||||||
{"$c", kConsumerId},
|
{"_c", kConsumerId},
|
||||||
{"$r", kIsRoot},
|
{"_r", kIsRoot},
|
||||||
{"$a", kIsAsync},
|
{"_a", kIsAsync},
|
||||||
// Device trace arguments.
|
// Device trace arguments.
|
||||||
{"device_id", kDeviceId},
|
{"device_id", kDeviceId},
|
||||||
{"context_id", kContextId},
|
{"context_id", kContextId},
|
||||||
|
Loading…
Reference in New Issue
Block a user