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

Function SetDevice

tensorflow/core/debug/grpc_session_debug_test.cc:215–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215void SetDevice(GraphDef* graph, const string& name, const string& dev) {
216 for (size_t i = 0; i < graph->node_size(); ++i) {
217 if (graph->node(i).name() == name) {
218 graph->mutable_node(i)->set_device(dev);
219 return;
220 }
221 }
222 LOG(FATAL) << "Name '" << name << "' not found.";
223}
224
225TEST_F(GrpcSessionDebugTest, MultiDevices_String) {
226 std::unique_ptr<test::TestCluster> cluster;

Callers 15

TEST_FFunction · 0.70
RunComposedOpMethod · 0.50
TEST_FFunction · 0.50
AddSimpleTrtOpMethod · 0.50
TEST_FFunction · 0.50
GpuPrimHelpersTestMethod · 0.50
TEST_FFunction · 0.50
SetUpMethod · 0.50
MakeOpMethod · 0.50
MakeOpMethod · 0.50
MakeOpMethod · 0.50
TEST_FFunction · 0.50

Calls 3

nameMethod · 0.65
nodeMethod · 0.45
set_deviceMethod · 0.45

Tested by

no test coverage detected