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

Function TEST

tensorflow/lite/delegates/flex/delegate_data_test.cc:26–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24namespace {
25
26TEST(DelegateDataTest, Basic) {
27 DelegateData data;
28 // We only check for success because it is hard to make initialization fail.
29 // It only happens if we manage to not link the CPU device factory into the
30 // binary.
31 tensorflow::SessionOptions session_options;
32 session_options.config.set_intra_op_parallelism_threads(2);
33 EXPECT_TRUE(data.Prepare(session_options).ok());
34
35 TfLiteContext dummy_context1 = {};
36 TfLiteContext dummy_context2 = {};
37 EXPECT_NE(data.GetEagerContext(), nullptr);
38 EXPECT_NE(data.GetBufferMap(&dummy_context1), nullptr);
39 EXPECT_NE(data.GetBufferMap(&dummy_context1),
40 data.GetBufferMap(&dummy_context2));
41}
42
43} // namespace
44} // namespace flex

Callers

nothing calls this directly

Calls 5

GetEagerContextMethod · 0.80
GetBufferMapMethod · 0.80
okMethod · 0.45
PrepareMethod · 0.45

Tested by

no test coverage detected