mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-07 12:20:24 +01:00
Update WorkerCacheLogger::RecordDataTransfer to not modify the details if provided.
PiperOrigin-RevId: 163761089
This commit is contained in:
parent
d03ba54f72
commit
2e2a8536d7
|
|
@ -102,13 +102,18 @@ void WorkerCacheLogger::RecordDataTransfer(int64 step_id, int64 start_usecs,
|
|||
const string& transfer_method_name){
|
||||
NodeExecStats* ns = new NodeExecStats;
|
||||
ns->set_node_name(transfer_method_name);
|
||||
string byte_string = strings::StrCat("[", bytes, "B] ");
|
||||
if (details.empty()) {
|
||||
auto byte_string = strings::StrCat("[", bytes, "B] ");
|
||||
if (bytes >= 0.1 * 1048576.0) {
|
||||
byte_string = strings::Printf("[%.1fMB] ", bytes / 1048576.0);
|
||||
}
|
||||
ns->set_timeline_label(strings::StrCat(byte_string, tensor_name, " from ",
|
||||
src_device, " to ", dst_device,
|
||||
details));
|
||||
auto label = strings::StrCat(byte_string, tensor_name, " from ", src_device,
|
||||
" to ", dst_device);
|
||||
ns->set_timeline_label(label);
|
||||
} else {
|
||||
ns->set_timeline_label(details);
|
||||
}
|
||||
|
||||
ns->set_all_start_micros(start_usecs);
|
||||
ns->set_op_start_rel_micros(0);
|
||||
int64 elapsed = end_usecs - start_usecs;
|
||||
|
|
@ -123,4 +128,5 @@ void WorkerCacheLogger::RecordDataTransfer(int64 step_id, int64 start_usecs,
|
|||
->set_requested_bytes(bytes);
|
||||
Save(dst_device, step_id, ns);
|
||||
}
|
||||
|
||||
} // namespace tensorflow
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user