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

Function GetXlaClusterForNode

tensorflow/compiler/jit/xla_cluster_util.cc:196–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196absl::optional<absl::string_view> GetXlaClusterForNode(const Node& node) {
197 const AttrValue* attr_value = node.attrs().Find(kXlaClusterAttr);
198 if (attr_value == nullptr) {
199 return absl::nullopt;
200 }
201 Status s = AttrValueHasType(*attr_value, "string");
202 if (!s.ok()) {
203 return absl::nullopt;
204 }
205 return attr_value->s();
206}
207
208bool HasResourceInputOrOutput(const Node& node) {
209 return std::find(node.input_types().begin(), node.input_types().end(),

Callers 15

TESTFunction · 0.85
IsInTheSameClusterFunction · 0.85
FindNodesToDeclusterFunction · 0.85
PartiallyDeclusterNodeFunction · 0.85
IsIntraClusterEdgeFunction · 0.85
PartiallyDeclusterGraphFunction · 0.85

Calls 4

AttrValueHasTypeFunction · 0.85
FindMethod · 0.45
attrsMethod · 0.45
okMethod · 0.45

Tested by 2

TESTFunction · 0.68
SummarizeClusteringFunction · 0.68