aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Types.h
diff options
context:
space:
mode:
authorcfRod <crefeda.rodrigues@arm.com>2021-11-05 11:29:53 +0000
committerGian Marco Iodice <gianmarco.iodice@arm.com>2021-11-09 10:19:03 +0000
commitf2c022e54ae65467cca4bc698b5b94e5b3c62c47 (patch)
treedcf3f38e85ff9761573d2e7e37cc746291f828af /arm_compute/core/Types.h
parentf349655cf75a686ed97e90d193a45602d6e82e6f (diff)
downloadComputeLibrary-f2c022e54ae65467cca4bc698b5b94e5b3c62c47.tar.gz
Enable fast_math in CpuFullyConnected
ONCPUML-529 * Add support for passing fast_math for fullyconnected layers via fc_info. * Add support for passing fast_math to run ACL benchmark graphs. * Add validation test and accuracy tests (updated fixtures). Note: abs and rel. tolerance for fast math mode are set based on experimental data. Signed-off-by: cfRod <crefeda.rodrigues@arm.com> change-Id: Ib107d6264d3ae5e36555334f39a13e678f8618df Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6521 Reviewed-by: SiCong Li <sicong.li@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/Types.h')
-rw-r--r--arm_compute/core/Types.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index bff672c361..47df44cb67 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -1578,6 +1578,7 @@ struct FullyConnectedLayerInfo
bool transpose_weights{ true }; /**< Transpose weights if true. */
bool are_weights_reshaped{ false }; /**< Reshape the weights tensor if false. */
bool retain_internal_weights{ false }; /**< Retain internal reshaped weights. */
+ bool enable_fast_math{ false }; /**< Enable fast math computation. */
/* Other parameters */
bool fp_mixed_precision{ false }; /**< Use wider accumulators (32 bit instead of 16 for FP16) to improve accuracy. */
@@ -2107,6 +2108,14 @@ public:
{
return _fast_math;
};
+ /** Set fast math flag
+ *
+ * @param[in] fast_math Flag to set
+ */
+ void set_fast_math(bool fast_math)
+ {
+ _fast_math = fast_math;
+ }
/** Flag which specifies whether to broadcast the shape of the bias tensor.
*
* @return True if the shape of the bias tensor is to be broadcasted.