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

Method _emit_tensor_snapshot

tensorflow/python/client/timeline.py:606–619  ·  view source on GitHub ↗

Generate Chrome Trace snapshot event for a computed Tensor. Args: tensor: A 'TensorTracker' object. timestamp: The timestamp of this snapshot as a long integer. pid: The pid assigned for showing the device where this op ran. tid: The tid of the thread computing the tens

(self, tensor, timestamp, pid, tid, value)

Source from the content-addressed store, hash-verified

604 target_pid, target_tid, flow_id)
605
606 def _emit_tensor_snapshot(self, tensor, timestamp, pid, tid, value):
607 """Generate Chrome Trace snapshot event for a computed Tensor.
608
609 Args:
610 tensor: A 'TensorTracker' object.
611 timestamp: The timestamp of this snapshot as a long integer.
612 pid: The pid assigned for showing the device where this op ran.
613 tid: The tid of the thread computing the tensor snapshot.
614 value: A JSON-compliant snapshot of the object.
615 """
616 desc = str(value.tensor_description).replace('"', '')
617 snapshot = {'tensor_description': desc}
618 self._chrome_trace.emit_obj_snapshot('Tensor', tensor.name, timestamp, pid,
619 tid, tensor.object_id, snapshot)
620
621 def _produce_tensor(self, name, timestamp, tensors_pid, allocator, num_bytes):
622 object_id = len(self._tensors)

Callers 1

_analyze_tensorsMethod · 0.95

Calls 2

replaceMethod · 0.80
emit_obj_snapshotMethod · 0.45

Tested by

no test coverage detected