forked from mindspore-Ecosystem/mindspore
!23629 code check
Merge pull request !23629 from zhaozhenlong/lite/issue/0916-codecheck
This commit is contained in:
commit
c715193c1d
|
@ -147,6 +147,5 @@ int ConvolutionDepthwise3x3Fp16CPUKernel::Run() {
|
|||
}
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
} // namespace mindspore::kernel
|
||||
#endif
|
||||
|
|
|
@ -33,7 +33,7 @@ int SparseToDenseCPUKernel::Init() {
|
|||
MS_CHECK_TRUE_RET(in_tensors_.size() == kInputSize2, RET_ERROR);
|
||||
CHECK_NULL_RETURN(in_tensors_[0]);
|
||||
CHECK_NULL_RETURN(in_tensors_[1]);
|
||||
CHECK_NULL_RETURN(in_tensors_[2]);
|
||||
CHECK_NULL_RETURN(in_tensors_[DIMENSION_2D]);
|
||||
MS_CHECK_TRUE_RET(out_tensors_.size() == 1, RET_ERROR);
|
||||
CHECK_NULL_RETURN(out_tensors_.front());
|
||||
auto input2 = in_tensors_.at(2);
|
||||
|
|
|
@ -55,7 +55,7 @@ int SparseToDenseOpenCLKernel::InitOutputToDefault() {
|
|||
|
||||
int SparseToDenseOpenCLKernel::InitWeights() {
|
||||
auto allocator = ocl_runtime_->GetAllocator();
|
||||
MS_CHECK_GE(in_tensors_.size(), 3, RET_ERROR);
|
||||
MS_CHECK_GE(in_tensors_.size(), DIMENSION_3D, RET_ERROR);
|
||||
auto weight_tensor = in_tensors_[2];
|
||||
size_t size = 1;
|
||||
for (int i = 0; i < weight_tensor->shape().size(); ++i) {
|
||||
|
@ -176,7 +176,7 @@ void SparseToDenseOpenCLKernel::SetGlobalLocal() {
|
|||
int SparseToDenseOpenCLKernel::Prepare() {
|
||||
enable_fp16_ = ocl_runtime_->GetFp16Enable();
|
||||
input_dim_ = in_tensors_[0]->shape().size();
|
||||
MS_CHECK_GE(input_dim_, 2, RET_ERROR);
|
||||
MS_CHECK_GE(input_dim_, DIMENSION_2D, RET_ERROR);
|
||||
inshapeindex1_dim = in_tensors_[0]->shape()[1];
|
||||
weight_scalar_ = in_tensors_[2]->IsScalar();
|
||||
const std::string kernel_name = "SparseToDense" + std::string(weight_scalar_ ? "Scalar" : "Vector");
|
||||
|
|
Loading…
Reference in New Issue