13 explicit FloorDivFixture(
const std::string& inputShape1,
14 const std::string& inputShape2,
15 const std::string& outputShape,
16 const std::string& inputShapeSignature1,
17 const std::string& inputShapeSignature2,
18 const std::string& outputShapeSignature,
19 const std::string& dataType =
"FLOAT32")
26 "deprecated_builtin_code": 90, 28 "builtin_code": "FLOOR_DIV" 35 "shape": )" + inputShape1 + R"(, 36 "type": )" + dataType + R"(, 38 "name": "inputTensor1", 40 "details_type": "NONE", 41 "quantized_dimension": 0 44 "shape_signature": )" + inputShapeSignature1 + R"(, 47 "shape": )" + inputShape2 + R"(, 48 "type": )" + dataType + R"(, 50 "name": "inputTensor2", 52 "details_type": "NONE", 53 "quantized_dimension": 0 56 "shape_signature": )" + inputShapeSignature2 + R"(, 59 "shape": )" + outputShape + R"(, 60 "type": )" + dataType + R"(, 62 "name": "outputTensor", 64 "details_type": "NONE", 65 "quantized_dimension": 0 68 "shape_signature": )" + outputShapeSignature + R"(, 88 "builtin_options_type": "NONE", 89 "custom_options_format": "FLEXBUFFERS" 95 "description": "MLIR Converted.", 96 "buffers": [ {}, {}, {}, {}, 120 "name": "min_runtime_version", 133 struct SimpleFloorDivFixture :
public FloorDivFixture
135 SimpleFloorDivFixture() : FloorDivFixture(
"[ 1, 3, 4 ]",
"[ 1, 3, 4 ]",
"[ 1, 3, 4 ]",
136 "[ -1, 3, 4 ]",
"[ -1, 3, 4 ]",
"[ -1, 3, 4 ]") {}
142 float Inf = std::numeric_limits<float>::infinity();
143 float NaN = std::numeric_limits<float>::quiet_NaN();
145 RunTest<3, DataType::Float32>(0, {{
"inputTensor1", { 0.0f, 1.0f, 2.0f,
148 9.0f, 10.0f, -11.0f } },
149 {
"inputTensor2", { 0.0f, 0.0f, 4.0f,
152 9.0f, 10.0f, 11.0f} } },
153 {{
"outputTensor", { NaN, Inf, 0.0f,
156 1.0f, 1.0f, -1.0f } } });
159 struct SimpleFloorDivInt32Fixture :
public FloorDivFixture
161 SimpleFloorDivInt32Fixture() : FloorDivFixture(
"[ 1, 3, 4 ]",
"[ 1, 3, 4 ]",
"[ 1, 3, 4 ]",
162 "[ -1, 3, 4 ]",
"[ -1, 3, 4 ]",
"[ -1, 3, 4 ]",
"INT32") {}
168 RunTest<3, DataType::Signed32>(0, {{
"inputTensor1", { 1, 1, 2,
172 {
"inputTensor2", { 1, 1, 4,
176 {{
"outputTensor", { 1, 1, 0,
183 struct DynamicFloorDivFixture :
public FloorDivFixture
185 DynamicFloorDivFixture() : FloorDivFixture(
"[ 1, 3, 4 ]",
"[ 1, 3, 4 ]",
"[ 1, 3, 4 ]",
186 "[ -1, 3, 4 ]",
"[ -1, 3, 4 ]",
"[ -1, 3, 4 ]") {}
192 float Inf = std::numeric_limits<float>::infinity();
193 float NaN = std::numeric_limits<float>::quiet_NaN();
195 RunTest<3, DataType::Float32, DataType::Float32>(0, {{
"inputTensor1", { 0.0f, 1.0f, 2.0f,
198 9.0f, 10.0f, -11.0f } },
199 {
"inputTensor2", { 0.0f, 0.0f, 4.0f,
202 9.0f, 10.0f, 11.0f} } },
203 {{
"outputTensor", { NaN, Inf, 0.0f,
206 1.0f, 1.0f, -1.0f } } },
true);
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")
void Setup(bool testDynamic=true)
TEST_SUITE("TensorflowLiteParser_FloorDiv")