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

Function MustCompileNode

tensorflow/compiler/jit/partially_decluster_pass.cc:275–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275Status MustCompileNode(const Node* n, bool* must_compile) {
276 DeviceType device_type("");
277 TF_RETURN_IF_ERROR(
278 DeviceNameToDeviceType(n->assigned_device_name(), &device_type));
279
280 if (IsMustCompileDevice(device_type)) {
281 *must_compile = true;
282 return Status::OK();
283 }
284
285 // We must compile `n` if it does not have a TensorFlow kernel.
286 *must_compile = !FindKernelDef(device_type, n->def(), nullptr, nullptr).ok();
287 return Status::OK();
288}
289
290// Declusters nodes to reduce the number of times we think we need to recompile
291// a TensorFlow graph.

Callers 1

PartiallyDeclusterGraphFunction · 0.85

Calls 4

DeviceNameToDeviceTypeFunction · 0.85
IsMustCompileDeviceFunction · 0.85
FindKernelDefFunction · 0.85
okMethod · 0.45

Tested by

no test coverage detected