From d035f1bac2cfe14e22c68b26ef70f82e2bf89005 Mon Sep 17 00:00:00 2001 From: MyPandaShaoxiang Date: Sun, 12 Jan 2020 21:23:42 -0500 Subject: [PATCH] fix: fix transformer run problem test=develop --- lite/kernels/arm/fill_constant_compute.cc | 17 ++++------------- lite/kernels/arm/lookup_table_compute.cc | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/lite/kernels/arm/fill_constant_compute.cc b/lite/kernels/arm/fill_constant_compute.cc index ad47553857..641f625500 100644 --- a/lite/kernels/arm/fill_constant_compute.cc +++ b/lite/kernels/arm/fill_constant_compute.cc @@ -60,25 +60,16 @@ class FillConstantCompute : public KernelLite { auto& param = *param_.get_mutable(); auto& context = ctx_->As(); - if (param.dtype == static_cast(lite::core::FluidType::FP32)) { - auto data = param.Out->template mutable_data(); - for (int i = 0; i < param.Out->numel(); i++) { - data[i] = param.value; - } - } else if (param.dtype == - static_cast(lite::core::FluidType::INT32)) { - auto data = param.Out->template mutable_data(); + if (param.dtype == static_cast(lite::core::FluidType::INT8)) { + auto data = param.Out->template mutable_data(); for (int i = 0; i < param.Out->numel(); i++) { data[i] = param.value; } - } else if (param.dtype == - static_cast(lite::core::FluidType::INT8)) { - auto data = param.Out->template mutable_data(); + } else { + auto data = param.Out->template mutable_data(); for (int i = 0; i < param.Out->numel(); i++) { data[i] = param.value; } - } else { - LOG(FATAL) << "not supported dtype " << param.dtype; } } diff --git a/lite/kernels/arm/lookup_table_compute.cc b/lite/kernels/arm/lookup_table_compute.cc index ba58b378f4..660a4b1522 100644 --- a/lite/kernels/arm/lookup_table_compute.cc +++ b/lite/kernels/arm/lookup_table_compute.cc @@ -36,7 +36,7 @@ void LookupTableCompute::Run() { auto table_dim = w->dims(); int64_t ids_numel = ids->numel(); - auto ids_data = ids->data(); + auto ids_data = ids->data(); int64_t row_number = table_dim[0]; int64_t row_width = table_dim[1]; -- GitLab