diff options
author | Abe Mbise <abe.mbise@arm.com> | 2017-09-27 18:39:19 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 4bd2cb8aec96de89eb9cf652b83298bf89486bca (patch) | |
tree | 33605a193813778611f8abe6f586297875257c3b /tests/validation_old/Reference.cpp | |
parent | f6705ec6ed137233680929e941c674af6baae1dc (diff) | |
download | ComputeLibrary-4bd2cb8aec96de89eb9cf652b83298bf89486bca.tar.gz |
COMPMID-511: Port FixedPoint arithmetic to new validation
Change-Id: Iae85c195a4ecdaf6df1d0055f3ad09582d128dc1
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88669
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/validation_old/Reference.cpp')
-rw-r--r-- | tests/validation_old/Reference.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/validation_old/Reference.cpp b/tests/validation_old/Reference.cpp index a3beee5906..628bd11f4b 100644 --- a/tests/validation_old/Reference.cpp +++ b/tests/validation_old/Reference.cpp @@ -186,45 +186,6 @@ RawTensor Reference::compute_reference_roi_pooling_layer(const TensorShape &shap return ref_dst; } -RawTensor Reference::compute_reference_fixed_point_operation(const TensorShape &shape, DataType dt_in, DataType dt_out, FixedPointOp op, int fixed_point_position) -{ - // Create reference - RawTensor ref_src(shape, dt_in, 1, fixed_point_position); - RawTensor ref_dst(shape, dt_out, 1, fixed_point_position); - - // Fill reference - int min = 0; - int max = 0; - switch(op) - { - case(FixedPointOp::INV_SQRT): - min = 1; - max = (dt_in == DataType::QS8) ? 0x7F : 0x7FFF; - break; - case(FixedPointOp::LOG): - min = (1 << (fixed_point_position - 1)); - max = (dt_in == DataType::QS8) ? 0x3F : 0x3FFF; - break; - case(FixedPointOp::EXP): - min = -(1 << (fixed_point_position - 1)); - max = (1 << (fixed_point_position - 1)); - break; - case(FixedPointOp::RECIPROCAL): - min = 15; - max = (dt_in == DataType::QS8) ? 0x7F : 0x7FFF; - break; - default: - ARM_COMPUTE_ERROR("Fixed point operation not supported"); - } - std::uniform_int_distribution<> distribution(min, max); - library->fill(ref_src, distribution, 0); - - // Compute reference - ReferenceCPP::fixed_point_operation(ref_src, ref_dst, op); - - return ref_dst; -} - } // namespace validation } // namespace test } // namespace arm_compute |