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

Function TEST

tensorflow/lite/delegates/gpu/gl/kernels/elementwise_test.cc:39–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39TEST(ElementwiseTest, Abs) {
40 OperationType op_type = OperationType::ABS;
41 const BHWC shape(1, 2, 2, 1);
42 SingleOpModel model({/*type=*/ToString(op_type), /*attributes=*/{}},
43 /*inputs=*/{GetTensorRef(0, shape)},
44 /*outputs=*/{GetTensorRef(1, shape)});
45 ASSERT_TRUE(model.PopulateTensor(0, {0.0, -6.2, 2.0, 4.0}));
46 ASSERT_OK(model.Invoke(*NewElementwiseNodeShader(op_type)));
47 EXPECT_THAT(model.GetOutput(0),
48 Pointwise(FloatNear(1e-6), {0.0, 6.2, 2.0, 4.0}));
49}
50
51TEST(ElementwiseTest, Cos) {
52 OperationType op_type = OperationType::COS;

Callers

nothing calls this directly

Calls 6

GetTensorRefFunction · 0.85
NewElementwiseNodeShaderFunction · 0.85
ToStringFunction · 0.50
PopulateTensorMethod · 0.45
InvokeMethod · 0.45
GetOutputMethod · 0.45

Tested by

no test coverage detected