diff options
author | Sang-Hoon Park <sang-hoon.park@arm.com> | 2020-03-11 23:21:14 +0000 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-03-13 08:33:24 +0000 |
commit | 797b76b1aef38ea3be6f68ae2bf323048e9beff8 (patch) | |
tree | f78bb65ef0fe49bbb7d06225a4e7e4f2cc43cb45 /src/graph/nodes | |
parent | 470bc1eea65560d13001e60a7f7b22b12ec89bbc (diff) | |
download | ComputeLibrary-797b76b1aef38ea3be6f68ae2bf323048e9beff8.tar.gz |
COMPMID-3221: Add EltwiseLayerDescriptor
A new descriptor struct for EltwiseLayerNode is added to have better
extendability.
Change-Id: I3d0a4b3cec1f2425f39157cee6b5c344336412a3
Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2876
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'src/graph/nodes')
-rw-r--r-- | src/graph/nodes/EltwiseLayerNode.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/graph/nodes/EltwiseLayerNode.cpp b/src/graph/nodes/EltwiseLayerNode.cpp index 7970bad5f7..a83a5fb3b2 100644 --- a/src/graph/nodes/EltwiseLayerNode.cpp +++ b/src/graph/nodes/EltwiseLayerNode.cpp @@ -30,8 +30,8 @@ namespace arm_compute { namespace graph { -EltwiseLayerNode::EltwiseLayerNode(EltwiseOperation op, QuantizationInfo out_quant_info, ConvertPolicy c_policy, RoundingPolicy r_policy) - : _op(op), _out_quant_info(out_quant_info), _convert_policy(c_policy), _rounding_policy(r_policy) +EltwiseLayerNode::EltwiseLayerNode(const descriptors::EltwiseLayerDescriptor &descriptor) + : descriptor(descriptor) { _input_edges.resize(2, EmptyEdgeID); _outputs.resize(1, NullTensorID); @@ -39,17 +39,17 @@ EltwiseLayerNode::EltwiseLayerNode(EltwiseOperation op, QuantizationInfo out_qua EltwiseOperation EltwiseLayerNode::eltwise_operation() const { - return _op; + return descriptor.op; } ConvertPolicy EltwiseLayerNode::convert_policy() const { - return _convert_policy; + return descriptor.c_policy; } RoundingPolicy EltwiseLayerNode::rounding_policy() const { - return _rounding_policy; + return descriptor.r_policy; } bool EltwiseLayerNode::forward_descriptors() @@ -66,16 +66,16 @@ bool EltwiseLayerNode::forward_descriptors() TensorDescriptor EltwiseLayerNode::configure_output(size_t idx) const { - ARM_COMPUTE_UNUSED(idx, _op, _convert_policy, _rounding_policy); + ARM_COMPUTE_UNUSED(idx); const Tensor *src = input(0); ARM_COMPUTE_ERROR_ON(src == nullptr); auto output_info = src->desc(); - if(!_out_quant_info.empty()) + if(!descriptor.out_quant_info.empty()) { - output_info.set_quantization_info(_out_quant_info); + output_info.set_quantization_info(descriptor.out_quant_info); } return output_info; |