12 explicit SliceFixture(
const std::string & inputShape,
13 const std::string & outputShape,
14 const std::string & beginData,
15 const std::string & sizeData)
22 "builtin_code": "SLICE", 30 "shape": )" + inputShape + R"(, 33 "name": "inputTensor", 42 "quantized_dimension": 0 47 "shape": )" + outputShape + R"(, 50 "name": "outputTensor", 53 "quantized_dimension": 0 64 "name": "beginTensor", 97 mutating_variable_inputs: [ 103 "description": "TOCO Converted.", 107 m_JsonString += R"(,{"data": )" + beginData + R"( })"; 108 m_JsonString += R"(,{"data": )" + sizeData + R"( })"; 117 struct SliceFixtureSingleDim : SliceFixture
119 SliceFixtureSingleDim() : SliceFixture(
"[ 3, 2, 3 ]",
121 "[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]",
122 "[ 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ]") {}
127 RunTest<3, armnn::DataType::Float32>(
129 {{
"inputTensor", { 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6 }}},
130 {{
"outputTensor", { 3, 3, 3 }}});
132 CHECK((m_Parser->GetNetworkOutputBindingInfo(0,
"outputTensor").second.GetShape()
136 struct SliceFixtureD123 : SliceFixture
138 SliceFixtureD123() : SliceFixture(
"[ 3, 2, 3 ]",
140 "[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]",
141 "[ 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0 ]") {}
146 RunTest<3, armnn::DataType::Float32>(
148 {{
"inputTensor", { 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6 }}},
149 {{
"outputTensor", { 3, 3, 3, 4, 4, 4 }}});
151 CHECK((m_Parser->GetNetworkOutputBindingInfo(0,
"outputTensor").second.GetShape()
155 struct SliceFixtureD213 : SliceFixture
157 SliceFixtureD213() : SliceFixture(
"[ 3, 2, 3 ]",
159 "[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]",
160 "[ 2, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ]") {}
165 RunTest<3, armnn::DataType::Float32>(
167 {{
"inputTensor", { 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6 }}},
168 {{
"outputTensor", { 3, 3, 3, 5, 5, 5 }}});
170 CHECK((m_Parser->GetNetworkOutputBindingInfo(0,
"outputTensor").second.GetShape()
174 struct DynamicSliceFixtureD213 : SliceFixture
176 DynamicSliceFixtureD213() : SliceFixture(
"[ 3, 2, 3 ]",
178 "[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]",
179 "[ 255, 255, 255, 255, 1, 0, 0, 0, 255, 255, 255, 255 ]") {}
184 RunTest<3, armnn::DataType::Float32, armnn::DataType::Float32>(
186 {{
"inputTensor", { 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6 }}},
187 {{
"outputTensor", { 3, 3, 3, 5, 5, 5 }}},
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)