X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcore%2FCL%2Fkernels%2FCLDepthwiseVectorToTensorKernel.cpp;h=83fc168f45d6ff21794f458e01bf0b5a13de825e;hb=06ea048f062a50404b1b3998a61a45449c2d1f0f;hp=dc47bb0adcddef825b025e52c94991beee3c1ec7;hpb=292227986edb37b01061afcad6df18ba9d6ccbeb;p=platform%2Fupstream%2Farmcl.git diff --git a/src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp b/src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp index dc47bb0..83fc168 100644 --- a/src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp +++ b/src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -41,7 +41,7 @@ CLDepthwiseVectorToTensorKernel::CLDepthwiseVectorToTensorKernel() void CLDepthwiseVectorToTensorKernel::configure(const ICLTensor *input, ICLTensor *output, size_t conv_w, size_t conv_h) { - ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32); + ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::S32, DataType::F16, DataType::F32); ARM_COMPUTE_ERROR_ON_NULLPTR(output); TensorShape output_shape = input->info()->tensor_shape(); @@ -50,7 +50,7 @@ void CLDepthwiseVectorToTensorKernel::configure(const ICLTensor *input, ICLTenso output_shape.set(2, input->info()->tensor_shape()[0] / (conv_w * conv_h)); // Output auto inizialitation if not yet initialized - auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type(), input->info()->fixed_point_position()); + auto_init_if_empty(*output->info(), input->info()->clone()->set_tensor_shape(output_shape)); ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); @@ -60,12 +60,12 @@ void CLDepthwiseVectorToTensorKernel::configure(const ICLTensor *input, ICLTenso _output = output; // Create kernel - std::set build_opts; - build_opts.emplace("-DDATA_TYPE=" + get_cl_type_from_data_type(input->info()->data_type())); - build_opts.emplace("-DCONV_WIDTH=" + support::cpp11::to_string(conv_w)); - build_opts.emplace("-DCONV_HEIGHT=" + support::cpp11::to_string(conv_h)); + CLBuildOptions build_opts; + build_opts.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(input->info()->data_type())); + build_opts.add_option("-DCONV_WIDTH=" + support::cpp11::to_string(conv_w)); + build_opts.add_option("-DCONV_HEIGHT=" + support::cpp11::to_string(conv_h)); - _kernel = static_cast(CLKernelLibrary::get().create_kernel("depthwise_vector_to_tensor", build_opts)); + _kernel = static_cast(CLKernelLibrary::get().create_kernel("depthwise_vector_to_tensor", build_opts.options())); // Configure kernel window Window win = calculate_max_window(*input->info(), Steps());