From 63e0beb9fb9646407d123e830165546e9129e95d Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Fri, 24 Sep 2021 14:04:27 +0100 Subject: Add support for non-constant weights and biases in CpuFullyConnected Changing the approach for specifying that weights and biases tensors are non-constant by making it a member of TensorInfo rather than an option of the functions. Resolves: COMPMID-4222, COMPMID-4811 Signed-off-by: Giorgio Arena Change-Id: I9b0081ccbcf8271ce029ba6755563d64c59e1d32 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6313 Tested-by: Arm Jenkins Reviewed-by: Pablo Marquez Tello Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- arm_compute/core/TensorInfo.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arm_compute/core/TensorInfo.h') diff --git a/arm_compute/core/TensorInfo.h b/arm_compute/core/TensorInfo.h index a4330849bf..9bc86806fb 100644 --- a/arm_compute/core/TensorInfo.h +++ b/arm_compute/core/TensorInfo.h @@ -267,6 +267,10 @@ public: { return std::find(std::cbegin(_dims_state), std::cend(_dims_state), get_dynamic_state_value()) != std::cend(_dims_state); } + bool are_values_constant() const override + { + return _are_values_constant; + } ITensorInfo &set_is_resizable(bool is_resizable) override { _is_resizable = is_resizable; @@ -288,6 +292,11 @@ public: { return _data_layout; } + ITensorInfo &set_are_values_constant(bool are_values_constant) override + { + _are_values_constant = are_values_constant; + return *this; + } private: /** Calculates strides, offset and total size resulting from the specified padding around the XY plane. @@ -309,6 +318,7 @@ private: PaddingSize _padding; QuantizationInfo _quantization_info; DataLayout _data_layout; + bool _are_values_constant; }; } // namespace arm_compute #endif /*ARM_COMPUTE_TENSORINFO_H */ -- cgit v1.2.1