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

Function PropagateDebugInfoToNode

tensorflow/core/common_runtime/function.cc:1704–1721  ·  view source on GitHub ↗

Propagate the debug info of `nodes` in function `func` to the `target` node. If the debug info of any node is missing, its node name and function name is used.

Source from the content-addressed store, hash-verified

1702// If the debug info of any node is missing, its node name and function name
1703// is used.
1704void PropagateDebugInfoToNode(const string& func,
1705 const std::vector<const Node*>& nodes,
1706 NodeDef* target) {
1707 if (nodes.empty() || target->has_experimental_debug_info()) {
1708 return;
1709 }
1710 for (const Node* node : nodes) {
1711 const auto& node_def = node->def();
1712 if (node_def.has_experimental_debug_info()) {
1713 target->mutable_experimental_debug_info()->MergeFrom(
1714 node_def.experimental_debug_info());
1715 } else {
1716 target->mutable_experimental_debug_info()->add_original_node_names(
1717 node_def.name());
1718 target->mutable_experimental_debug_info()->add_original_func_names(func);
1719 }
1720 }
1721}
1722} // namespace
1723
1724string InlineFunctionBodyOptions::DebugString() const {

Callers 1

InlineFunctionBodyFunction · 0.85

Calls 2

nameMethod · 0.65
emptyMethod · 0.45

Tested by

no test coverage detected