diff options
author | Alessandro Navone <alessandro.navone@arm.com> | 2021-02-02 11:39:05 +0000 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2021-02-15 10:46:37 +0000 |
commit | 6413e493b15b04d27304c0e52ccf2ecd2ec9c302 (patch) | |
tree | ea992a31dfcb4c4629f38fb43b88d829a1057b46 /arm_compute/graph/backends | |
parent | 8958167c8d609566a40c9e618158ebcbdcd3e3bb (diff) | |
download | ComputeLibrary-6413e493b15b04d27304c0e52ccf2ecd2ec9c302.tar.gz |
Add DIV to Elementwise layer support at graph level
COMPUTE-12654
Signed-off-by: Alessandro Navone <alessandro.navone@arm.com>
Change-Id: I9e13e24fb3033888a86874528a72425d87b342ec
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5030
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'arm_compute/graph/backends')
-rw-r--r-- | arm_compute/graph/backends/FunctionHelpers.h | 8 | ||||
-rw-r--r-- | arm_compute/graph/backends/ValidateHelpers.h | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/arm_compute/graph/backends/FunctionHelpers.h b/arm_compute/graph/backends/FunctionHelpers.h index ee5dc3e285..9830290d0f 100644 --- a/arm_compute/graph/backends/FunctionHelpers.h +++ b/arm_compute/graph/backends/FunctionHelpers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -873,6 +873,12 @@ std::unique_ptr<IFunction> create_eltwise_layer(EltwiseLayerNode &node) std::string("ElementwiseMaximum"), input1, input2, output, act_info); } + else if(eltwise_op == EltwiseOperation::Div) + { + std::tie(func, func_name) = create_named_function<typename EltwiseFunctions::Division>( + std::string("ArithmeticDivision"), + input1, input2, output, act_info); + } else { ARM_COMPUTE_ERROR("Unsupported element-wise operation!"); diff --git a/arm_compute/graph/backends/ValidateHelpers.h b/arm_compute/graph/backends/ValidateHelpers.h index f8cb1c12e9..93d547b036 100644 --- a/arm_compute/graph/backends/ValidateHelpers.h +++ b/arm_compute/graph/backends/ValidateHelpers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -694,6 +694,10 @@ Status validate_eltwise_Layer(EltwiseLayerNode &node) { return EltwiseLayerFunctions::ElementwiseMax::validate(input1, input2, output, act_info); } + else if(eltwise_op == EltwiseOperation::Div) + { + return EltwiseLayerFunctions::ArithmeticDivision::validate(input1, input2, output, act_info); + } else { ARM_COMPUTE_ERROR("Unsupported element-wise operation!"); |