/third_party/mindspore/mindspore/lite/src/ops/populate/v0/ |
D | arithmetic_populate_v0.cc | 38 param->op_parameter_.type_ = primitive->value_type(); in PopulateArithmeticV0CommonPara() 48 int type = param->op_parameter_.type_; in PopulateArithmeticV0() 50 param->op_parameter_.type_ = schema::PrimitiveType_RealDiv; in PopulateArithmeticV0() 52 param->op_parameter_.type_ = schema::PrimitiveType_LogicalAnd; in PopulateArithmeticV0() 54 param->op_parameter_.type_ = schema::PrimitiveType_LogicalOr; in PopulateArithmeticV0() 56 param->op_parameter_.type_ = schema::PrimitiveType_Equal; in PopulateArithmeticV0() 58 param->op_parameter_.type_ = schema::PrimitiveType_NotEqual; in PopulateArithmeticV0() 60 param->op_parameter_.type_ = schema::PrimitiveType_Less; in PopulateArithmeticV0() 62 param->op_parameter_.type_ = schema::PrimitiveType_LessEqual; in PopulateArithmeticV0() 64 param->op_parameter_.type_ = schema::PrimitiveType_Greater; in PopulateArithmeticV0() [all …]
|
D | arithmetic_self_populate_v0.cc | 36 arithmetic_self_param->op_parameter_.type_ = schema::PrimitiveType_Abs; in PopulateArithmeticSelfV0() 38 arithmetic_self_param->op_parameter_.type_ = schema::PrimitiveType_Cos; in PopulateArithmeticSelfV0() 40 arithmetic_self_param->op_parameter_.type_ = schema::PrimitiveType_Sin; in PopulateArithmeticSelfV0() 42 arithmetic_self_param->op_parameter_.type_ = schema::PrimitiveType_Log; in PopulateArithmeticSelfV0() 44 arithmetic_self_param->op_parameter_.type_ = schema::PrimitiveType_Neg; in PopulateArithmeticSelfV0() 46 arithmetic_self_param->op_parameter_.type_ = schema::PrimitiveType_NegGrad; in PopulateArithmeticSelfV0() 48 arithmetic_self_param->op_parameter_.type_ = schema::PrimitiveType_LogGrad; in PopulateArithmeticSelfV0() 50 arithmetic_self_param->op_parameter_.type_ = schema::PrimitiveType_Sqrt; in PopulateArithmeticSelfV0() 52 arithmetic_self_param->op_parameter_.type_ = schema::PrimitiveType_Square; in PopulateArithmeticSelfV0() 54 arithmetic_self_param->op_parameter_.type_ = schema::PrimitiveType_Rsqrt; in PopulateArithmeticSelfV0() [all …]
|
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/serializers/nnacl_serializer/ |
D | nnacl_fp32_serializer.cc | 27 … pooling_parameter.op_parameter_, pooling_parameter.pool_mode_, pooling_parameter.round_mode_, in CodeStruct() 41 …CodeBaseStruct("BatchNormParameter", name, batch_norm_parameter.op_parameter_, batch_norm_paramete… in CodeStruct() 47 …CodeBaseStruct("ArithmeticParameter", name, arithmetic_parameter.op_parameter_, arithmetic_paramet… in CodeStruct() 58 CodeBaseStruct("SoftmaxParameter", name, softmax_parameter.op_parameter_, softmax_parameter.axis_, in CodeStruct() 65 …"ConvParameter", name, conv_parameter.op_parameter_, "{}", conv_parameter.kernel_h_, conv_paramete… in CodeStruct() 77 …"MatMulParameter", name, mat_mul_parameter.op_parameter_, mat_mul_parameter.has_bias_, mat_mul_par… in CodeStruct() 86 CodeBaseStruct("ScaleParameter", name, scale_parameter.op_parameter_, scale_parameter.outer_size_, in CodeStruct() 92 …CodeBaseStruct("SliceParameter", name, slice_parameter.op_parameter_, ToString(slice_parameter.sha… in CodeStruct() 98 …CodeBaseStruct("TileParameter", name, tile_parameter.op_parameter_, ToString(tile_parameter.multip… in CodeStruct() 105 …"TransposeParameter", name, transpose_parameter.op_parameter_, ToString(transpose_parameter.perm_), in CodeStruct() [all …]
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/ |
D | convolution_delegate_fp32.cc | 142 auto conv_param = reinterpret_cast<ConvParameter *>(op_parameter_); in SetInputOutputShapeInfo() 156 conv_param->op_parameter_.thread_num_ = op_parameter_->thread_num_; in SetInputOutputShapeInfo() 161 if (conv_param->input_channel_ / op_parameter_->thread_num_ <= 64 && in CheckAvxUseSWConv() 173 auto conv_param = reinterpret_cast<ConvParameter *>(op_parameter_); in CpuConvFp32KernelSelect() 180 …op_parameter_, in_tensors_, out_tensors_, static_cast<const lite::InnerContext *>(this->ms_context… in CpuConvFp32KernelSelect() 184 …op_parameter_, in_tensors_, out_tensors_, static_cast<const lite::InnerContext *>(this->ms_context… in CpuConvFp32KernelSelect() 189 …op_parameter_, in_tensors_, out_tensors_, static_cast<const lite::InnerContext *>(this->ms_context… in CpuConvFp32KernelSelect() 196 …op_parameter_, in_tensors_, out_tensors_, static_cast<const lite::InnerContext *>(this->ms_context… in CpuConvFp32KernelSelect() 202 …op_parameter_, in_tensors_, out_tensors_, static_cast<const lite::InnerContext *>(this->ms_context… in CpuConvFp32KernelSelect() 206 …op_parameter_, in_tensors_, out_tensors_, static_cast<const lite::InnerContext *>(this->ms_context… in CpuConvFp32KernelSelect() [all …]
|
D | batchnorm_fp32.cc | 36 CHECK_NULL_RETURN(op_parameter_); in Init() 66 auto param = reinterpret_cast<BatchNormParameter *>(op_parameter_); in FillParam() 101 auto ret = ParallelLaunch(this->ms_context_, BatchNormRun, this, op_parameter_->thread_num_); in Run() 109 auto param = reinterpret_cast<BatchNormParameter *>(op_parameter_); in DoExecute() 129 auto param = reinterpret_cast<BatchNormParameter *>(op_parameter_); in set_momentum() 136 auto param = reinterpret_cast<BatchNormParameter *>(op_parameter_); in get_momentum()
|
D | glu_fp32.cc | 92 usable_thread_num_ = MSMIN(op_parameter_->thread_num_, num_unit_); in ReSize() 121 MS_CHECK_TRUE_RET(op_parameter_->thread_num_ != 0, RET_ERROR); in Sigmoid() 122 int stride = UP_DIV(length, op_parameter_->thread_num_); in Sigmoid() 136 MS_CHECK_TRUE_RET(op_parameter_->thread_num_ != 0, RET_ERROR); in Mul() 137 int stride = UP_DIV(length, op_parameter_->thread_num_); in Mul() 176 ret = ParallelLaunch(this->ms_context_, SigmoidRun, this, op_parameter_->thread_num_); in Run() 183 ret = ParallelLaunch(this->ms_context_, MulRun, this, op_parameter_->thread_num_); in Run()
|
D | l2_norm_fp32.cc | 93 int unit = UP_DIV(l2_norm_param_->data_num_, op_parameter_->thread_num_); in CalcSquareSum() 104 int unit = UP_DIV(l2_norm_param_->data_num_, op_parameter_->thread_num_); in DivSqrtSum() 121 int unit = UP_DIV(outer_size, op_parameter_->thread_num_); in CalcL2NormTrailingAxis() 170 ret = ParallelLaunch(this->ms_context_, SquareSumRun, this, op_parameter_->thread_num_); in Run() 176 for (int i = 0; i < op_parameter_->thread_num_; ++i) { in Run() 180 ret = ParallelLaunch(this->ms_context_, L2NormRun, this, op_parameter_->thread_num_); in Run() 186 … ret = ParallelLaunch(this->ms_context_, L2NormTrailingAxisRun, this, op_parameter_->thread_num_); in Run()
|
D | addn_fp32.cc | 49 int count_per_thread = UP_DIV(elements_num_, op_parameter_->thread_num_); in AddNParallelRun() 68 if (static_cast<int>(elements_num_) < op_parameter_->thread_num_) { in Run() 99 auto ret = ParallelLaunch(this->ms_context_, AddNLaunch, this, op_parameter_->thread_num_); in Run() 108 ret = ParallelLaunch(this->ms_context_, AddNLaunch, this, op_parameter_->thread_num_); in Run()
|
/third_party/mindspore/mindspore/lite/src/ |
D | inner_kernel.h | 42 : op_parameter_(parameter), in InnerKernel() 48 if (op_parameter_ != nullptr) { in ~InnerKernel() 49 free(op_parameter_); in ~InnerKernel() 50 op_parameter_ = nullptr; in ~InnerKernel() 77 OpParameter *op_parameter() const { return op_parameter_; } in op_parameter() 92 return (this->op_parameter_ != nullptr) ? schema::PrimitiveType(this->op_parameter_->type_) in type() 174 OpParameter *op_parameter_ = nullptr;
|
/third_party/mindspore/mindspore/lite/src/train/ |
D | train_populate_parameter.cc | 52 p->op_parameter_.type_ = primitive->value_type(); in PopulateSmoothL1LossParameter() 67 p->op_parameter_.type_ = primitive->value_type(); in PopulateSmoothL1LossGradParameter() 81 p->op_parameter_.type_ = primitive->value_type(); in PopulateApplyMomentumParameter() 123 p->op_parameter_.type_ = primitive->value_type(); in PopulateAdamParameter() 138 p->op_parameter_.type_ = primitive->value_type(); in PopulateSgdParameter() 157 sce_param->op_parameter_.type_ = primitive->value_type(); in PopulateSparseSoftmaxCrossEntropyWithLogitsParameter() 171 sce_param->op_parameter_.type_ = primitive->value_type(); in PopulateSoftmaxCrossEntropyParameter() 186 pooling_param->op_parameter_.type_ = primitive->value_type(); in PopulateMaxPoolGradParameter() 225 pooling_param->op_parameter_.type_ = primitive->value_type(); in PopulateAvgPoolGradParameter() 275 act_param->op_parameter_.type_ = primitive->value_type(); in PopulateActivationGradParameter() [all …]
|
D | train_populate_parameter_v0.cc | 106 p->op_parameter_.type_ = schema::PrimitiveType_SmoothL1Loss; in PopulateSmoothL1LossParameter() 126 p->op_parameter_.type_ = schema::PrimitiveType_SmoothL1LossGrad; in PopulateSmoothL1LossGradParameter() 146 p->op_parameter_.type_ = schema::PrimitiveType_ApplyMomentum; in PopulateApplyMomentumParameter() 194 p->op_parameter_.type_ = schema::PrimitiveType_Adam; in PopulateAdamParameter() 214 p->op_parameter_.type_ = schema::PrimitiveType_SGD; in PopulateSgdParameter() 242 sce_param->op_parameter_.type_ = schema::PrimitiveType_SparseSoftmaxCrossEntropyWithLogits; in PopulateSparseSoftmaxCrossEntropyParameter() 259 sce_param->op_parameter_.type_ = schema::PrimitiveType_SoftmaxCrossEntropyWithLogits; in PopulateSoftmaxCrossEntropyParameter() 295 pooling_param->op_parameter_.type_ = schema::PrimitiveType_MaxPoolGrad; in PopulatePoolingGradParameter() 299 pooling_param->op_parameter_.type_ = schema::PrimitiveType_AvgPoolGrad; in PopulatePoolingGradParameter() 333 act_param->op_parameter_.type_ = schema::PrimitiveType_ActivationGrad; in PopulateActivationGradParameter() [all …]
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16/ |
D | pad_fp16.cc | 32 PadFp16(input_, output_, in_, out_, pad_param_->paddings_, task_id, op_parameter_->thread_num_); in RunImpl() 49 …PadFp16(input_data, output_data, in_, out_, pad_param_->paddings_, task_id, op_parameter_->thread_… in RunMirrorPadImpl() 52 for (size_t i = task_id; i < mirror_pad_block_.size(); i += op_parameter_->thread_num_) { in RunMirrorPadImpl() 74 MS_CHECK_FALSE(op_parameter_->thread_num_ == 0, RET_ERROR); in RunMirrorPadImpl() 75 int unit = UP_DIV(out_tensors_.at(0)->ElementsNum(), op_parameter_->thread_num_); in RunMirrorPadImpl() 116 ret = ParallelLaunch(this->ms_context_, PadImpl, this, op_parameter_->thread_num_); in Run() 128 ret = ParallelLaunch(this->ms_context_, MirrorPadImpl, this, op_parameter_->thread_num_); in Run()
|
D | addn_fp16.cc | 45 int count_per_thread = UP_DIV(elements_num_, op_parameter_->thread_num_); in AddNParallelRun() 64 if (static_cast<int>(elements_num_) < op_parameter_->thread_num_) { in Run() 95 auto ret = ParallelLaunch(this->ms_context_, AddNLaunch, this, op_parameter_->thread_num_); in Run() 104 ret = ParallelLaunch(this->ms_context_, AddNLaunch, this, op_parameter_->thread_num_); in Run()
|
D | cast_fp16.cc | 57 op_parameter_->thread_num_ = MSMIN(op_parameter_->thread_num_, data_num_); in ReSize() 58 stride_ = UP_DIV(data_num_, op_parameter_->thread_num_); in ReSize() 148 return ParallelLaunch(this->ms_context_, CastFp16Run, this, op_parameter_->thread_num_); in Run()
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32_grad/ |
D | optimizer.h | 23 OpParameter op_parameter_; member 29 OpParameter op_parameter_; member 36 OpParameter op_parameter_; member
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/int8/ |
D | arithmetic_int8.cc | 57 switch (op_parameter_->type_) { in Init() 77 MS_LOG(ERROR) << "Error Operator type " << op_parameter_->type_; in Init() 116 auto param = reinterpret_cast<ArithmeticParameter *>(op_parameter_); in DoArithmetic() 119 MS_ASSERT(op_parameter_->thread_num_ != 0); in DoArithmetic() 120 int stride = UP_DIV(element_num, op_parameter_->thread_num_); in DoArithmetic() 146 auto param = reinterpret_cast<ArithmeticParameter *>(op_parameter_); in Run() 162 …auto ret = ParallelLaunch(this->ms_context_, ArithmeticsInt8Launch, this, op_parameter_->thread_nu… in Run()
|
D | topk_int8.cc | 37 TopkParameter *parameter = reinterpret_cast<TopkParameter *>(op_parameter_); in ReSize() 57 TopkParameter *parameter = reinterpret_cast<TopkParameter *>(op_parameter_); in Run() 63 TopkInt8(input_data, output_data, output_index, reinterpret_cast<TopkParameter *>(op_parameter_)); in Run()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/string/ |
D | lsh_projection.cc | 67 …param_->thread_stride_ = op_parameter_->thread_num_ > 1 ? UP_DIV(param_->hash_shape_[0], op_parame… in Run() 73 ret = ParallelLaunch(this->ms_context_, LshProjectionRun, this, op_parameter_->thread_num_); in Run() 83 … static_cast<char **>(ms_context_->allocator->Malloc(op_parameter_->thread_num_ * sizeof(char *))); in MallocKeys() 88 for (int i = 0; i < op_parameter_->thread_num_; i++) { in MallocKeys() 101 for (int i = 0; i < op_parameter_->thread_num_; i++) { in FreeKeys()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/base/ |
D | tile_base.cc | 42 tile_parameter_ = reinterpret_cast<TileParameter *>(op_parameter_); in ReSize() 121 CHECK_LESS_RETURN(static_cast<size_t>(op_parameter_->thread_num_), 1); in SimpleTileImpl() 122 …size_t unit = UP_DIV(tile_parameter_->fast_outer_size_, static_cast<size_t>(op_parameter_->thread_… in SimpleTileImpl() 134 auto ret = ParallelLaunch(this->ms_context_, SimpleTile, this, op_parameter_->thread_num_); in RunSimpleTile() 152 Tile(input_addr_, output_addr_, reinterpret_cast<TileParameter *>(op_parameter_)); in Run()
|
D | one_hot_base.cc | 51 thread_num_ = op_parameter_->thread_num_; in Init() 53 auto param = reinterpret_cast<OneHotParameter *>(op_parameter_); in Init() 118 auto one_hot_param = reinterpret_cast<OneHotParameter *>(op_parameter_); in OneHotImpl() 137 auto one_hot_param = reinterpret_cast<OneHotParameter *>(op_parameter_); in InitParamsAndOnOffValue() 266 int error_code = ParallelLaunch(this->ms_context_, RunOneHot, this, op_parameter_->thread_num_); in Run()
|
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/fp32/ |
D | crop_fp32_test.cc | 39 crop_param.op_parameter_.thread_num_ = 1; in TEST_F() 62 crop_param.op_parameter_.thread_num_ = 1; in TEST_F() 82 crop_param.op_parameter_.thread_num_ = 1; in TEST_F() 102 crop_param.op_parameter_.thread_num_ = 2; in TEST_F() 187 crop_param.op_parameter_.thread_num_ = 2; in TEST_F() 213 crop_param.op_parameter_.thread_num_ = 2; in TEST_F() 237 crop_param.op_parameter_.thread_num_ = 2; in TEST_F()
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/ |
D | batchnorm_fp32.c | 24 if (param->op_parameter_.thread_num_ == 0) { in BatchNormFp32() 27 int units_per_thread = UP_DIV(param->unit_, param->op_parameter_.thread_num_); in BatchNormFp32() 44 if (param->op_parameter_.thread_num_ == 0) { in FusedBatchNormFp32() 47 int units_per_thread = UP_DIV(param->unit_, param->op_parameter_.thread_num_); in FusedBatchNormFp32()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32_grad/ |
D | convolution_grad_input.cc | 40 auto conv_param = reinterpret_cast<ConvParameter *>(op_parameter_); in ReSize() 57 int thread_num = op_parameter_->thread_num_; in ReSize() 80 auto conv_param = reinterpret_cast<ConvParameter *>(op_parameter_); in Execute() 101 int thread_num = op_parameter_->thread_num_; in Execute() 171 auto conv_param = reinterpret_cast<ConvParameter *>(op_parameter_); in Run() 179 …int error_code = ParallelLaunch(this->ms_context_, ConvolutionGradInputRun, this, op_parameter_->t… in Run()
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp16/ |
D | batchnorm_fp16.c | 22 NNACL_CHECK_ZERO_RETURN(param->op_parameter_.thread_num_); in BatchNormFp16() 23 int units_per_thread = UP_DIV(param->unit_, param->op_parameter_.thread_num_); in BatchNormFp16() 41 NNACL_CHECK_ZERO_RETURN(param->op_parameter_.thread_num_); in FusedBatchNormFp16() 42 int units_per_thread = UP_DIV(param->unit_, param->op_parameter_.thread_num_); in FusedBatchNormFp16()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/kernel/ |
D | fusion_eltwise.h | 108 OpParameter op_parameter_{"FusionEltwiseParameter", true, PrimitiveType_FusionEltwise, 1}; 156 if (op_parameter_ != nullptr) { in ~FusionEltwiseOpenCLKernel() 157 delete reinterpret_cast<FusionEltwiseParameter *>(op_parameter_); in ~FusionEltwiseOpenCLKernel() 158 op_parameter_ = nullptr; in ~FusionEltwiseOpenCLKernel() 168 void ClearParameter() { op_parameter_ = nullptr; } in ClearParameter()
|