Browse Source

!14040 fix make equal less npu-unsupported case

From: @zhaozhenlong
Reviewed-by: @zhanghaibo5,@zhang_xue_tong
Signed-off-by: @zhang_xue_tong
pull/14040/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
16b746f703
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      mindspore/lite/src/runtime/kernel/npu/arithmetic_npu.cc

+ 9
- 0
mindspore/lite/src/runtime/kernel/npu/arithmetic_npu.cc View File

@@ -49,6 +49,15 @@ int ArithmeticNPUKernel::IsSupport(const std::vector<lite::Tensor *> &inputs,
<< " shape 1 is:" << inputs[0]->shape() << " shape 2 is:" << inputs[1]->shape();
return RET_ERROR;
}
auto type = static_cast<schema::PrimitiveType>(opParameter->type_);
if (type == mindspore::schema::PrimitiveType_Less && inputs[0]->shape().size() == 1) {
MS_LOG(WARNING) << name_ << " not support input 1d";
return RET_ERROR;
}
if (type == mindspore::schema::PrimitiveType_Equal && inputs[0]->shape().size() == 2) {
MS_LOG(WARNING) << name_ << " not support input 2d";
return RET_ERROR;
}
return RET_OK;
}



Loading…
Cancel
Save