diff options
author | Diego Lopez Recas <Diego.LopezRecas@arm.com> | 2018-02-22 13:08:01 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:49:16 +0000 |
commit | 00854295ac18e1a79d99e6f1692432503cc71448 (patch) | |
tree | 63fddeb83468367fe90325e72368a868db05b98d /tests/validation/fixtures | |
parent | 5c8e05c6c2726739d9c7ce0b7f6533be5be5fabd (diff) | |
download | ComputeLibrary-00854295ac18e1a79d99e6f1692432503cc71448.tar.gz |
COMPMID-959: Fix valid region for Scale
Change-Id: Ic9ce52d772a178916dfa60fbb6456d295c06b83d
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/122647
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/fixtures')
-rw-r--r-- | tests/validation/fixtures/ScaleFixture.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/validation/fixtures/ScaleFixture.h b/tests/validation/fixtures/ScaleFixture.h index fe24f5bac5..604bfb2622 100644 --- a/tests/validation/fixtures/ScaleFixture.h +++ b/tests/validation/fixtures/ScaleFixture.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -74,7 +74,16 @@ protected: template <typename U> void fill(U &&tensor) { - library->fill_tensor_uniform(tensor, 0); + if(is_data_type_float(_data_type)) + { + library->fill_tensor_uniform(tensor, 0); + } + else + { + // Restrict range for float to avoid any floating point issues + std::uniform_real_distribution<> distribution(-5.0f, 5.0f); + library->fill(tensor, distribution, 0); + } } TensorType compute_target(const TensorShape &shape, const float scale_x, const float scale_y, |