aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/TensorInfo.h
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2021-07-26 13:18:50 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-09-07 13:44:08 +0000
commitaed63ee175e0d64c934389e9d1b2edd0cb1a5cdd (patch)
tree8f025f849e863b9cdec1d6b889bc463e6c4f78d1 /arm_compute/core/TensorInfo.h
parent58d3c5a7df769def499806e4d26cea518add161a (diff)
downloadComputeLibrary-aed63ee175e0d64c934389e9d1b2edd0cb1a5cdd.tar.gz
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 Change-Id: I96e6f3868f51785c9700a3ef6a1fe7b05747862c Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6162 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/TensorInfo.h')
-rw-r--r--arm_compute/core/TensorInfo.h10
1 files changed, 10 insertions, 0 deletions
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 */