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

Function UnionContexts

tensorflow/compiler/xla/service/call_graph.cc:179–191  ·  view source on GitHub ↗

Returns the call context of a computation which is called from contexts 'a' and 'b'.

Source from the content-addressed store, hash-verified

177// Returns the call context of a computation which is called from contexts 'a'
178// and 'b'.
179CallContext UnionContexts(CallContext a, CallContext b) {
180 if (a == CallContext::kNone) {
181 return b;
182 } else if (b == CallContext::kNone) {
183 return a;
184 } else if (a == b) {
185 return a;
186 } else {
187 // Contexts are different and neither is kNone, ie one is kSequential and
188 // the other is kParallel.
189 return CallContext::kBoth;
190 }
191}
192
193} // namespace
194

Callers 1

SetCallContextsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected