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

Method ColocationGraph

tensorflow/core/common_runtime/colocation_graph.cc:571–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569}
570
571ColocationGraph::ColocationGraph(const Graph* graph, const FunctionStack& stack,
572 const FunctionLibraryDefinition* flib_def,
573 const DeviceSet* device_set,
574 const Device* default_local_device,
575 bool allow_soft_placement,
576 bool log_device_placement)
577 : graph_(*graph),
578 stack_(stack),
579 flib_def_(*flib_def),
580 inspecting_placer_(stack, flib_def, device_set, default_local_device,
581 allow_soft_placement, log_device_placement),
582 inspection_required_checker_(graph, flib_def),
583 device_set_(*device_set),
584 device_types_(device_set->PrioritizedDeviceTypeList()),
585 local_address_spec_(
586 LocalAddressSpec(device_set->client_device(), default_local_device)),
587 default_local_device_(default_local_device),
588 allow_soft_placement_(allow_soft_placement),
589 log_device_placement_(log_device_placement) {
590 members_.resize(graph_.num_node_ids());
591}
592
593// Adds each node of the Graph to this ColocationGraph as a singleton.
594//

Callers

nothing calls this directly

Calls 5

LocalAddressSpecFunction · 0.85
client_deviceMethod · 0.80
resizeMethod · 0.45
num_node_idsMethod · 0.45

Tested by

no test coverage detected