aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Types.h
diff options
context:
space:
mode:
authorPablo Marquez Tello <pablo.tello@arm.com>2022-07-21 13:55:27 +0100
committerGunes Bayir <gunes.bayir@arm.com>2022-08-04 12:56:07 +0000
commit93581a524a8e66ed29ace892bc5cb297287802af (patch)
treec585e366b4504f29f10326b0b34768574741eb82 /arm_compute/core/Types.h
parentf67903b8ab8205b47f0ee2c27aeca8bed405c58e (diff)
downloadComputeLibrary-93581a524a8e66ed29ace892bc5cb297287802af.tar.gz
[ONCPUML-970] Fast math mode for fixed format kernels
Minor tweaks and test for running fixed format kernels with BF16 operations when specified by the user. Change-Id: Ic8167f67b86b1298da65e46cfebed9f3b86940e4 Signed-off-by: Milos Puzovic <milos.puzovic@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8000 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/Types.h')
-rw-r--r--arm_compute/core/Types.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 66e1c8ab1f..952c174194 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -1987,16 +1987,20 @@ enum class WeightFormat
// OHWIo<interleave_by>i<block_by>
inline int interleave_by(const WeightFormat wf)
{
- return ((int)wf >> 8) & 0xFFF;
+ return (static_cast<int>(wf) >> 8) & 0xFFF;
}
inline int block_by(const WeightFormat wf)
{
- return ((int)wf >> 20) & 0xF;
+ return (static_cast<int>(wf) >> 20) & 0xF;
}
-inline bool is_fixed_format(const WeightFormat wf)
+inline bool is_fixed_format(const WeightFormat &wf)
{
return wf != WeightFormat::UNSPECIFIED && wf != WeightFormat::ANY;
}
+inline bool is_fixed_format_fast_math(const WeightFormat &wf)
+{
+ return (static_cast<int>(wf) >> 4) & 0x1;
+}
/** Convolution Layer Weights Information class. This class stores the necessary information to compute convolution layer when the weights are already reshaped */
class WeightsInfo