Browse Source

!11750 fix resize_base bug & fix fp16subgraph bug when const-input gather exist

From: @hangangqiang
Reviewed-by: @zhanghaibo5,@ddwsky
Signed-off-by: @zhanghaibo5
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 5 years ago
parent
commit
a84a5215ca
3 changed files with 7 additions and 5 deletions
  1. +5
    -2
      mindspore/lite/src/runtime/kernel/arm/base/resize_base.cc
  2. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/base/resize_base.h
  3. +1
    -2
      mindspore/lite/src/tensor.cc

+ 5
- 2
mindspore/lite/src/runtime/kernel/arm/base/resize_base.cc View File

@@ -62,7 +62,7 @@ int ResizeBaseCPUKernel::CheckParameters() {
MS_LOG(INFO) << "Out shape is not assigned";
const_shape_ = false;
} else {
auto ret = CalculateNewHeightWidth();
auto ret = CalculateLinearNewHeightWidth();
if (ret != RET_OK) {
return ret;
}
@@ -78,7 +78,10 @@ int ResizeBaseCPUKernel::CheckParameters() {
return RET_OK;
}

int ResizeBaseCPUKernel::CalculateNewHeightWidth() {
int ResizeBaseCPUKernel::CalculateLinearNewHeightWidth() {
if (method_ != static_cast<int>(schema::ResizeMethod_LINEAR)) {
return RET_OK;
}
if (in_tensors_.size() != 2) {
return RET_ERROR;
}


+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/base/resize_base.h View File

@@ -47,7 +47,7 @@ class ResizeBaseCPUKernel : public LiteKernel {
private:
int CheckParameters();
int CheckInputsOuputs();
int CalculateNewHeightWidth();
int CalculateLinearNewHeightWidth();
};
} // namespace mindspore::kernel



+ 1
- 2
mindspore/lite/src/tensor.cc View File

@@ -282,8 +282,7 @@ int Tensor::set_root_tensor(Tensor *tensor) {
return RET_OK;
}
if (this->root_tensor_ == nullptr) {
MS_LOG(ERROR) << "root tensor is nullptr";
return RET_NULL_PTR;
return RET_OK;
}
this->shape_ = this->root_tensor_->shape_;
this->format_ = this->root_tensor_->format_;


Loading…
Cancel
Save