diff --git a/mindspore/lite/src/runtime/kernel/npu/arithmetic_npu.cc b/mindspore/lite/src/runtime/kernel/npu/arithmetic_npu.cc index aa9322d989..f7ac613bf2 100644 --- a/mindspore/lite/src/runtime/kernel/npu/arithmetic_npu.cc +++ b/mindspore/lite/src/runtime/kernel/npu/arithmetic_npu.cc @@ -49,6 +49,15 @@ int ArithmeticNPUKernel::IsSupport(const std::vector &inputs, << " shape 1 is:" << inputs[0]->shape() << " shape 2 is:" << inputs[1]->shape(); return RET_ERROR; } + auto type = static_cast(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; }