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

Function MayCallFunction

tensorflow/compiler/jit/xla_cluster_util.cc:304–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304bool MayCallFunction(const Node& n, const FunctionLibraryDefinition* flib_def) {
305 if (flib_def->Contains(n.type_string())) {
306 return true;
307 }
308
309 // This is a conservative check: there may be nodes with a `func`
310 // attribute that do not make function calls.
311 return absl::c_any_of(n.def().attr(),
312 [](const std::pair<string, AttrValue>& name_attr_pair) {
313 return name_attr_pair.second.has_func();
314 });
315}
316bool IsShapeConsumerOp(const Node& node) {
317 return node.type_string() == "Shape" || node.type_string() == "Rank" ||
318 node.type_string() == "Size";

Callers 3

XlaResourceOpKindForNodeFunction · 0.85

Calls 2

attrMethod · 0.80
ContainsMethod · 0.45

Tested by

no test coverage detected