From 5cb37732db883e2fb9d96fc3698df8837dbcc8db Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Fri, 8 Jun 2018 18:07:08 +0100 Subject: COMPMID-1278: Make intermediate tensors resizable in CLSoftmaxLayer::validate() Change-Id: I42bdb9f71f14f0d82306a990f7d8a066947a4290 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/135129 Tested-by: Jenkins Reviewed-by: Giorgio Arena Reviewed-by: Anthony Barbier --- src/runtime/CL/functions/CLSoftmaxLayer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/runtime/CL/functions/CLSoftmaxLayer.cpp') diff --git a/src/runtime/CL/functions/CLSoftmaxLayer.cpp b/src/runtime/CL/functions/CLSoftmaxLayer.cpp index a92fbce498..d6ab941b80 100644 --- a/src/runtime/CL/functions/CLSoftmaxLayer.cpp +++ b/src/runtime/CL/functions/CLSoftmaxLayer.cpp @@ -80,12 +80,12 @@ Status CLSoftmaxLayer::validate(const ITensorInfo *input, const ITensorInfo *out // Create intermediate tensor info DataType tmp_data_type = is_data_type_quantized_asymmetric(input->data_type()) ? DataType::S32 : input->data_type(); - TensorInfo tensor_info_tmp(input->clone()->set_data_type(tmp_data_type)); + TensorInfo tensor_info_tmp(input->clone()->set_data_type(tmp_data_type).set_is_resizable(true)); TensorShape max_sum_shape = input->tensor_shape(); max_sum_shape.set(0, 1); - TensorInfo tensor_info_max(input->clone()->set_tensor_shape(max_sum_shape)); - TensorInfo tensor_info_sum(input->clone()->set_tensor_shape(max_sum_shape).set_data_type(tmp_data_type).set_quantization_info(QuantizationInfo())); + TensorInfo tensor_info_max(input->clone()->set_tensor_shape(max_sum_shape).set_is_resizable(true)); + TensorInfo tensor_info_sum(input->clone()->set_tensor_shape(max_sum_shape).set_data_type(tmp_data_type).set_quantization_info(QuantizationInfo()).set_is_resizable(true)); ARM_COMPUTE_RETURN_ON_ERROR(CLLogits1DMaxShiftExpSumKernel::validate(input, &tensor_info_max, &tensor_info_tmp, &tensor_info_sum)); ARM_COMPUTE_RETURN_ON_ERROR(CLLogits1DNormKernel::validate(&tensor_info_tmp, &tensor_info_sum, output)); -- cgit v1.2.1