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

Function TEST

tensorflow/core/common_runtime/graph_runner_test.cc:46–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44using test::internal::ExpectEqual;
45
46TEST(GraphRunnerTest, SingleConst) {
47 Scope root = Scope::NewRootScope();
48 auto c = ops::Const(root, 42.0f);
49 GraphRunner graph_runner(Env::Default());
50 std::vector<Tensor> outputs;
51 Status s = graph_runner.Run(root.graph(), nullptr, {}, {c.name()}, &outputs);
52 TF_ASSERT_OK(s);
53 ExpectEqual(42.0f, outputs[0].scalar<float>()());
54}
55
56// If not using DeepCopy, and the allocator is deleted with the cpu-device,
57// this test will seg-fault.

Callers

nothing calls this directly

Calls 10

DefaultFunction · 0.85
WithOpNameMethod · 0.80
nameMethod · 0.65
ConstFunction · 0.50
ExpectEqualFunction · 0.50
PlaceholderFunction · 0.50
AddFunction · 0.50
TensorShapeClass · 0.50
RunMethod · 0.45
graphMethod · 0.45

Tested by

no test coverage detected