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

Method DetermineStates

tensorflow/compiler/tf2xla/functionalize_cond.cc:1289–1303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1287}
1288
1289Status FunctionalizeCond::DetermineStates(std::vector<Node*> rev_topo_order) {
1290 // The state that is propagated along the given edge.
1291 for (auto it = rev_topo_order.rbegin(); it != rev_topo_order.rend(); ++it) {
1292 Node* dst = *it;
1293 TF_RETURN_IF_ERROR(DetermineCondState(dst));
1294 TF_RETURN_IF_ERROR(DetermineAncestorState(dst));
1295 if (IsSwitch(dst)) TF_RETURN_IF_ERROR(RemoveRedundantSwitch(dst));
1296 if (IsMerge(dst)) TF_RETURN_IF_ERROR(RemoveRedundantMerge(dst));
1297
1298 VLOG(5) << dst->name() << " :: " << state_map_.CondStateToString(dst)
1299 << " @ " << state_map_.AncestorStateToString(dst);
1300 if (VLOG_IS_ON(10)) DumpGraphWithCondState("it");
1301 }
1302 return Status::OK();
1303}
1304
1305Status FunctionalizeCond::DetermineAncestorState(Node* dst) {
1306 StateMap::AncestorId id = nullptr;

Callers

nothing calls this directly

Calls 7

rbeginMethod · 0.80
rendMethod · 0.80
CondStateToStringMethod · 0.80
AncestorStateToStringMethod · 0.80
nameMethod · 0.65
IsSwitchFunction · 0.50
IsMergeFunction · 0.50

Tested by

no test coverage detected