From 4a1c91767142f76e92bf4575564d7e54fcd0ebf4 Mon Sep 17 00:00:00 2001 From: Pablo Marquez Tello Date: Tue, 18 Jul 2023 14:51:24 +0100 Subject: Add support for input S64/U64 in CpuCastKernel * The kernel now supports the following conversions: S64 -> F32 U64 -> F32 * Resolves MLCE-1089 Change-Id: I277cf58b78d919fde25947520d2056e1412c7f82 Signed-off-by: Pablo Marquez Tello Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9935 Tested-by: Arm Jenkins Reviewed-by: Viet-Hoa Do Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- src/core/Utils.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/Utils.cpp b/src/core/Utils.cpp index ef7186aad1..89f373fc87 100644 --- a/src/core/Utils.cpp +++ b/src/core/Utils.cpp @@ -414,7 +414,7 @@ QuantizationInfo get_softmax_output_quantization_info(DataType input_type, bool return QuantizationInfo(1.f / 256, 0); } -std::pair get_quantized_activation_min_max(const ActivationLayerInfo& act_info, DataType data_type, UniformQuantizationInfo oq_info) +std::pair get_quantized_activation_min_max(const ActivationLayerInfo &act_info, DataType data_type, UniformQuantizationInfo oq_info) { const bool is_qasymm8_signed = is_data_type_quantized_asymmetric_signed(data_type); const auto a = act_info.a(); @@ -497,6 +497,12 @@ void print_consecutive_elements(std::ostream &s, DataType dt, const uint8_t *ptr case DataType::S32: print_consecutive_elements_impl(s, reinterpret_cast(ptr), n, stream_width, element_delim); break; + case DataType::U64: + print_consecutive_elements_impl(s, reinterpret_cast(ptr), n, stream_width, element_delim); + break; + case DataType::S64: + print_consecutive_elements_impl(s, reinterpret_cast(ptr), n, stream_width, element_delim); + break; case DataType::BFLOAT16: print_consecutive_elements_impl(s, reinterpret_cast(ptr), n, stream_width, element_delim); break; @@ -533,6 +539,10 @@ int max_consecutive_elements_display_width(std::ostream &s, DataType dt, const u return max_consecutive_elements_display_width_impl(s, reinterpret_cast(ptr), n); case DataType::S32: return max_consecutive_elements_display_width_impl(s, reinterpret_cast(ptr), n); + case DataType::U64: + return max_consecutive_elements_display_width_impl(s, reinterpret_cast(ptr), n); + case DataType::S64: + return max_consecutive_elements_display_width_impl(s, reinterpret_cast(ptr), n); case DataType::BFLOAT16: return max_consecutive_elements_display_width_impl(s, reinterpret_cast(ptr), n); case DataType::F16: -- cgit v1.2.1