From d621bca4e963555a99be4328c8d49d1813789649 Mon Sep 17 00:00:00 2001 From: Chunosov Date: Fri, 3 Nov 2017 17:33:15 +0700 Subject: COMPMID-661: directconv-uint8 (#20) Change-Id: I84f7a1ce3658be0d3c91e65096467258af48f0b6 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/94341 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- tests/Utils.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tests/Utils.h') 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(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 -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; } -- cgit v1.2.1