Go to the source code of this file.
◆ TEST_SUITE()
TEST_SUITE |
( |
"TensorflowLiteParser_Div" |
| ) |
|
Definition at line 9 of file Div.cpp.
References ParserFlatbuffersFixture::Setup(), and TEST_CASE_FIXTURE().
13 explicit DivFixture(
const std::string & inputShape1,
14 const std::string & inputShape2,
15 const std::string & outputShape,
16 const std::string & activation=
"NONE")
21 "operator_codes": [ { "builtin_code": "DIV" } ], 25 "shape": )" + inputShape1 + R"(, 28 "name": "inputTensor1", 37 "shape": )" + inputShape2 + R"(, 40 "name": "inputTensor2", 49 "shape": )" + outputShape + R"( , 52 "name": "outputTensor", 68 "builtin_options_type": "DivOptions", 70 "fused_activation_function": )" + activation + R"( 72 "custom_options_format": "FLEXBUFFERS" 86 struct SimpleDivFixture :
public DivFixture
88 SimpleDivFixture() : DivFixture(
"[ 1, 2, 2, 3 ]",
"[ 1, 2, 2, 3 ]",
"[ 1, 2, 2, 3 ]") {}
94 float Inf = std::numeric_limits<float>::infinity();
95 float NaN = std::numeric_limits<float>::quiet_NaN();
97 RunTest<4, DataType::Float32>(0, {{
"inputTensor1", { 0.0f, 1.0f, 2.0f,
100 9.0f, 10.0f, -11.0f } },
101 {
"inputTensor2", { 0.0f, 0.0f, 4.0f,
104 9.0f, 10.0f, 11.0f} } },
105 {{
"outputTensor", { NaN, Inf, 0.5f,
108 1.0f, 1.0f, -1.0f } } });
112 struct DynamicDivFixture :
public DivFixture
114 DynamicDivFixture() : DivFixture(
"[ 1, 2, 2, 3 ]",
"[ 1, 2, 2, 3 ]",
"[ ]") {}
120 float Inf = std::numeric_limits<float>::infinity();
121 float NaN = std::numeric_limits<float>::quiet_NaN();
123 RunTest<4, DataType::Float32, DataType::Float32>(0, {{
"inputTensor1", { 0.0f, 1.0f, 2.0f,
126 9.0f, 10.0f, -11.0f } },
127 {
"inputTensor2", { 0.0f, 0.0f, 4.0f,
130 9.0f, 10.0f, 11.0f} } },
131 {{
"outputTensor", { NaN, Inf, 0.5f,
134 1.0f, 1.0f, -1.0f } } },
true);
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")
void Setup(bool testDynamic=true)