12 explicit MirrorPadFixture(
const std::string& inputShape,
13 const std::string& outputShape,
14 const std::string& padListShape,
15 const std::string& padListData,
16 const std::string& padMode,
17 const std::string& dataType =
"FLOAT32",
18 const std::string& scale =
"1.0",
19 const std::string& offset =
"0")
24 "operator_codes": [ { "builtin_code": "MIRROR_PAD" } ], 28 "shape": )" + inputShape + R"(, 29 "type": )" + dataType + R"(, 31 "name": "inputTensor", 35 "scale": [ )" + scale + R"( ], 36 "zero_point": [ )" + offset + R"( ], 40 "shape": )" + outputShape + R"(, 41 "type": )" + dataType + R"(, 43 "name": "outputTensor", 47 "scale": [ )" + scale + R"( ], 48 "zero_point": [ )" + offset + R"( ], 52 "shape": )" + padListShape + R"( , 71 "builtin_options_type": "MirrorPadOptions", 73 "mode": )" + padMode + R"( , 75 "custom_options_format": "FLEXBUFFERS" 82 { "data": )" + padListData + R"(, }, 90 struct SimpleMirrorPadSymmetricFixture :
public MirrorPadFixture
92 SimpleMirrorPadSymmetricFixture() : MirrorPadFixture(
"[ 3, 3 ]",
"[ 7, 7 ]",
"[ 2, 2 ]",
93 "[ 2,0,0,0, 2,0,0,0, 2,0,0,0, 2,0,0,0 ]",
94 "SYMMETRIC",
"FLOAT32") {}
99 RunTest<2, armnn::DataType::Float32>
101 {{
"inputTensor", { 1.0f, 2.0f, 3.0f,
103 7.0f, 8.0f, 9.0f }}},
105 {{
"outputTensor", { 5.0f, 4.0f, 4.0f, 5.0f, 6.0f, 6.0f, 5.0f,
106 2.0f, 1.0f, 1.0f, 2.0f, 3.0f, 3.0f, 2.0f,
107 2.0f, 1.0f, 1.0f, 2.0f, 3.0f, 3.0f, 2.0f,
108 5.0f, 4.0f, 4.0f, 5.0f, 6.0f, 6.0f, 5.0f,
109 8.0f, 7.0f, 7.0f, 8.0f, 9.0f, 9.0f, 8.0f,
110 8.0f, 7.0f, 7.0f, 8.0f, 9.0f, 9.0f, 8.0f,
111 5.0f, 4.0f, 4.0f, 5.0f, 6.0f, 6.0f, 5.0f }}});
114 struct SimpleMirrorPadReflectFixture :
public MirrorPadFixture
116 SimpleMirrorPadReflectFixture() : MirrorPadFixture(
"[ 3, 3 ]",
"[ 7, 7 ]",
"[ 2, 2 ]",
117 "[ 2,0,0,0, 2,0,0,0, 2,0,0,0, 2,0,0,0 ]",
118 "REFLECT",
"FLOAT32") {}
123 RunTest<2, armnn::DataType::Float32>
125 {{
"inputTensor", { 1.0f, 2.0f, 3.0f,
127 7.0f, 8.0f, 9.0f }}},
129 {{
"outputTensor", { 9.0f, 8.0f, 7.0f, 8.0f, 9.0f, 8.0f, 7.0f,
130 6.0f, 5.0f, 4.0f, 5.0f, 6.0f, 5.0f, 4.0f,
131 3.0f, 2.0f, 1.0f, 2.0f, 3.0f, 2.0f, 1.0f,
132 6.0f, 5.0f, 4.0f, 5.0f, 6.0f, 5.0f, 4.0f,
133 9.0f, 8.0f, 7.0f, 8.0f, 9.0f, 8.0f, 7.0f,
134 6.0f, 5.0f, 4.0f, 5.0f, 6.0f, 5.0f, 4.0f,
135 3.0f, 2.0f, 1.0f, 2.0f, 3.0f, 2.0f, 1.0f }}});
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)