| 273 | } |
| 274 | |
| 275 | Status 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. |
no test coverage detected