diff --git a/runtime/onert/core/src/loader/BaseLoader.h b/runtime/onert/core/src/loader/BaseLoader.h index 775f98b472f..227c12a6c9c 100644 --- a/runtime/onert/core/src/loader/BaseLoader.h +++ b/runtime/onert/core/src/loader/BaseLoader.h @@ -1123,7 +1123,6 @@ void BaseLoader::loadCustom(const Operator *op, ir::Graph &subg) ReduceAll, MatrixBandPart, BatchMatMul, - BroadcastTo, FusedBatchNorm, StatelessRandomUniform, Erf, @@ -1137,7 +1136,6 @@ void BaseLoader::loadCustom(const Operator *op, ir::Graph &subg) {"MatrixBandPart", BuiltinOP::MatrixBandPart}, {"BatchMatMulV2", BuiltinOP::BatchMatMul}, {"FusedBatchNormV3", BuiltinOP::FusedBatchNorm}, - {"BroadcastTo", BuiltinOP::BroadcastTo}, {"StatelessRandomUniform", BuiltinOP::StatelessRandomUniform}, {"Erf", BuiltinOP::Erf}, {"TFLite_Detection_PostProcess", BuiltinOP::DetectionPostProcess}, @@ -1161,9 +1159,6 @@ void BaseLoader::loadCustom(const Operator *op, ir::Graph &subg) case BuiltinOP::BatchMatMul: loadBatchMatMul(op, subg); break; - case BuiltinOP::BroadcastTo: - loadOperationTo(op, subg); - break; case BuiltinOP::FusedBatchNorm: loadFusedBatchNorm(op, subg); break; diff --git a/runtime/tests/nnapi/bridge/wrapper/OperationFactory.cc b/runtime/tests/nnapi/bridge/wrapper/OperationFactory.cc index 877df4759ce..1d0dbd4188a 100644 --- a/runtime/tests/nnapi/bridge/wrapper/OperationFactory.cc +++ b/runtime/tests/nnapi/bridge/wrapper/OperationFactory.cc @@ -1566,10 +1566,6 @@ OperationFactory::OperationFactory() return new operation::BatchMatMul{inputs, outputs, param}; }; - // 0 -> Input Tensor Index - // 1 -> int32, int64, An 1-D int tensor Index - _map[ANEURALNETWORKS_BROADCAST_TO_EX] = createSimpleBinaryOp; - _map[ANEURALNETWORKS_STATELESS_RANDOM_UNIFORM_EX] = [](const OperationFactory::Param &init_param, Operands &) { assert(init_param.input_count == 2 && init_param.output_count == 1); diff --git a/runtime/tests/nnapi/nnapi_gtest.skip.armv7l-linux.acl_cl b/runtime/tests/nnapi/nnapi_gtest.skip.armv7l-linux.acl_cl index 46e6862b13f..59725bcd3b8 100644 --- a/runtime/tests/nnapi/nnapi_gtest.skip.armv7l-linux.acl_cl +++ b/runtime/tests/nnapi/nnapi_gtest.skip.armv7l-linux.acl_cl @@ -12,10 +12,6 @@ GeneratedTests.batch_matmul_ex_float_broadcast GeneratedTests.batch_matmul_ex_float_broadcast2_adj_xy GeneratedTests.batch_matmul_ex_float_broadcast_adj_x GeneratedTests.batch_matmul_ex_float_simple -GeneratedTests.broadcast_to_ex_1D_nnfw -GeneratedTests.broadcast_to_ex_2D_nnfw -GeneratedTests.broadcast_to_ex_dynamic_2D_nnfw -GeneratedTests.broadcast_to_ex_dynamic_3D_nnfw GeneratedTests.cast_dynamic_float32_to_int32_nnfw GeneratedTests.cast_float16_to_float16 GeneratedTests.cast_float16_to_float32 diff --git a/runtime/tests/nnapi/nnapi_gtest.skip.armv7l-linux.acl_neon b/runtime/tests/nnapi/nnapi_gtest.skip.armv7l-linux.acl_neon index 881a3b63ec9..3eeff768ad4 100644 --- a/runtime/tests/nnapi/nnapi_gtest.skip.armv7l-linux.acl_neon +++ b/runtime/tests/nnapi/nnapi_gtest.skip.armv7l-linux.acl_neon @@ -12,10 +12,6 @@ GeneratedTests.batch_matmul_ex_float_broadcast GeneratedTests.batch_matmul_ex_float_broadcast2_adj_xy GeneratedTests.batch_matmul_ex_float_broadcast_adj_x GeneratedTests.batch_matmul_ex_float_simple -GeneratedTests.broadcast_to_ex_1D_nnfw -GeneratedTests.broadcast_to_ex_2D_nnfw -GeneratedTests.broadcast_to_ex_dynamic_2D_nnfw -GeneratedTests.broadcast_to_ex_dynamic_3D_nnfw GeneratedTests.cast_dynamic_float32_to_int32_nnfw GeneratedTests.cast_float16_to_float16 GeneratedTests.cast_float16_to_float32 diff --git a/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_1D_nnfw.mod.py b/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_1D_nnfw.mod.py deleted file mode 100644 index 1b7ccb39e1e..00000000000 --- a/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_1D_nnfw.mod.py +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (C) 2018 The Android Open Source Project -# Copyright (C) 2020 Samsung Electronics Co., Ltd. All Rights Reserved -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# This op(broadcast_to)'s output shape is depend for entered shape, -# So the output shape of broadcast_to cannot be decided at compilation time. -# Therefore, its output is "dynamic tensor" -# - -# model - -model = Model() - -i1 = Input("input1", "TENSOR_INT32", "{3}") -i2 = Parameter("input2", "TENSOR_INT32", "{2}", [3, 3]) -o1 = Output("output0", "TENSOR_INT32", "{3, 3}") - -model = model.Operation("BROADCAST_TO_EX", i1, i2).To(o1) - -# Example. -input0 = { - i1: [1, 2, 3], #input 0 -} - -output0 = { - o1: [1, 2, 3, - 1, 2, 3, - 1, 2, 3] -} - -Example((input0, output0)) diff --git a/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_2D_nnfw.mod.py b/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_2D_nnfw.mod.py deleted file mode 100644 index c4901c0e5ba..00000000000 --- a/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_2D_nnfw.mod.py +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2018 The Android Open Source Project -# Copyright (C) 2020 Samsung Electronics Co., Ltd. All Rights Reserved -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# This op(broadcast_to)'s output shape is depend for entered shape, -# So the output shape of broadcast_to cannot be decided at compilation time. -# Therefore, its output is "dynamic tensor" -# - -# model - -model = Model() - -i1 = Input("input1", "TENSOR_INT32", "{2, 2}") -i2 = Parameter("op2", "TENSOR_INT32", "{3}", [3, 2, 2]) -o1 = Output("output0", "TENSOR_INT32", "{3, 2, 2}") - -model = model.Operation("BROADCAST_TO_EX", i1, i2).To(o1) - -# Example. -input0 = { - i1: [1, 2, 3, 4], #input 0 - # i2: -} - -output0 = { - o1: [1, 2, 3, 4, - - 1, 2, 3, 4, - - 1, 2, 3, 4] -} - -Example((input0, output0)) diff --git a/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_dynamic_2D_nnfw.mod.py b/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_dynamic_2D_nnfw.mod.py deleted file mode 100644 index b0818926a74..00000000000 --- a/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_dynamic_2D_nnfw.mod.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (C) 2018 The Android Open Source Project -# Copyright (C) 2020 Samsung Electronics Co., Ltd. All Rights Reserved -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# This op(broadcast_to)'s output shape is depend for entered shape, -# So the output shape of broadcast_to cannot be decided at compilation time. -# Therefore, its output is "dynamic tensor" -# - -# model - -import dynamic_tensor - -model = Model() - -i1_shape = [2, 2] -i1_data = [1, 2, 3, 4] - -i2_data = [3, 2, 2] - -o1_data = [1, 2, 3, 4, - - 1, 2, 3, 4, - - 1, 2, 3, 4] - -dynamic_layer = dynamic_tensor.DynamicInputGenerator(model, i1_shape, "TENSOR_INT32") - -i1 = dynamic_layer.getTestNodeInput() -i2 = Input("input2", "TENSOR_INT32", "{3}") -o1 = Output("output0", "TENSOR_INT32", "{3, 2, 2}") - -model = model.Operation("BROADCAST_TO_EX", i1, i2).To(o1) - -# Example. -input0 = { - dynamic_layer.getModelInput(): i1_data, - dynamic_layer.getShapeInput(): i1_shape, - - i2: i2_data -} - -output0 = { - o1: o1_data -} - -Example((input0, output0)) diff --git a/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_dynamic_3D_nnfw.mod.py b/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_dynamic_3D_nnfw.mod.py deleted file mode 100644 index 59751dd141d..00000000000 --- a/runtime/tests/nnapi/specs/Ex/broadcast_to_ex_dynamic_3D_nnfw.mod.py +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (C) 2018 The Android Open Source Project -# Copyright (C) 2020 Samsung Electronics Co., Ltd. All Rights Reserved -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# This op(broadcast_to)'s output shape is depend for entered shape, -# So the output shape of broadcast_to cannot be decided at compilation time. -# Therefore, its output is "dynamic tensor" -# - -# model - -import dynamic_tensor - -model = Model() - -i1_shape = [2, 1, 2] -i1_data = [1, 2, 3, 4] - -i2_data = [2, 3, 2] - -o1_data = [1, 2, - 1, 2, - 1, 2, - - 3, 4, - 3, 4, - 3, 4,] - -dynamic_layer = dynamic_tensor.DynamicInputGenerator(model, i1_shape, "TENSOR_INT32") - -i1 = dynamic_layer.getTestNodeInput() -i2 = Input("input2", "TENSOR_INT32", "{3}") -o1 = Output("output0", "TENSOR_INT32", "{2, 3, 2}") - -model = model.Operation("BROADCAST_TO_EX", i1, i2).To(o1) - -# Example. -input0 = { - dynamic_layer.getModelInput(): i1_data, - dynamic_layer.getShapeInput(): i1_shape, - - i2: i2_data -} - -output0 = { - o1: o1_data -} - -Example((input0, output0))