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

Function SetDefaultDevice

tensorflow/core/graph/default_device.h:29–36  ·  view source on GitHub ↗

Sets the default device for all nodes in graph_def to "device", only if not already set.

Source from the content-addressed store, hash-verified

27// Sets the default device for all nodes in graph_def to "device",
28// only if not already set.
29inline void SetDefaultDevice(const string& device, GraphDef* graph_def) {
30 for (int i = 0; i < graph_def->node_size(); ++i) {
31 auto node = graph_def->mutable_node(i);
32 if (node->device().empty()) {
33 node->set_device(device);
34 }
35 }
36}
37
38} // namespace graph
39} // namespace tensorflow

Callers 6

BM_HelperFunction · 0.85
TESTFunction · 0.85
TEST_FFunction · 0.85
LoadSavedModelInternalFunction · 0.85
ConcurrentStepsFunction · 0.85

Calls 3

emptyMethod · 0.45
deviceMethod · 0.45
set_deviceMethod · 0.45

Tested by 3

BM_HelperFunction · 0.68
TESTFunction · 0.68
TEST_FFunction · 0.68