diff options
author | Chunosov <N.Chunosov@yandex.ru> | 2017-11-03 17:33:15 +0700 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | d621bca4e963555a99be4328c8d49d1813789649 (patch) | |
tree | 59503f9d4cdbaafefdba5a2569bf3d88082ad09d /tests/Utils.h | |
parent | 5a99ddf2dcf3a5eb49ea85cb8bcc6a43f1496e5e (diff) | |
download | ComputeLibrary-d621bca4e963555a99be4328c8d49d1813789649.tar.gz |
COMPMID-661: directconv-uint8 (#20)
Change-Id: I84f7a1ce3658be0d3c91e65096467258af48f0b6
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/94341
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/Utils.h')
-rw-r--r-- | tests/Utils.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/Utils.h b/tests/Utils.h index 465cba88ab..70def45ec7 100644 --- a/tests/Utils.h +++ b/tests/Utils.h @@ -230,6 +230,7 @@ void store_value_with_data_type(void *ptr, T value, DataType data_type) switch(data_type) { case DataType::U8: + case DataType::QASYMM8: *reinterpret_cast<uint8_t *>(ptr) = value; break; case DataType::S8: @@ -385,14 +386,18 @@ inline bool is_in_valid_region(const ValidRegion &valid_region, Coordinates coor * @param[in] data_type Data type. * @param[in] num_channels (Optional) Number of channels. * @param[in] fixed_point_position (Optional) Number of fractional bits. + * @param[in] quantization_info (Optional) Quantization info for asymmetric quantized types. * * @return Initialized tensor of given type. */ template <typename T> -inline T create_tensor(const TensorShape &shape, DataType data_type, int num_channels = 1, int fixed_point_position = 0) +inline T create_tensor(const TensorShape &shape, DataType data_type, int num_channels = 1, + int fixed_point_position = 0, QuantizationInfo quantization_info = QuantizationInfo()) { - T tensor; - tensor.allocator()->init(TensorInfo(shape, num_channels, data_type, fixed_point_position)); + T tensor; + TensorInfo info(shape, num_channels, data_type, fixed_point_position); + info.set_quantization_info(quantization_info); + tensor.allocator()->init(info); return tensor; } |