diff --git a/lite/kernels/arm/fill_constant_compute.cc b/lite/kernels/arm/fill_constant_compute.cc index ad475538576b9cc73a43bac49cba1a6cf1c73edb..641f625500c908e984d8788f6415b9815fddb911 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 ba58b378f4dda22fd78ce76b80bdbca8d8f284a3..660a4b1522df5bc2237df378f9025f4e30682643 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];