!14607 [MS_LITE] fix ios to master

From: @YeFeng_24
Reviewed-by: @hangangqiang,@zhanghaibo5
Signed-off-by: @hangangqiang
This commit is contained in:
mindspore-ci-bot 2021-04-06 09:22:54 +08:00 committed by Gitee
commit 08fe1dbee8
123 changed files with 1645 additions and 210 deletions

View File

@ -15,12 +15,364 @@
*/
#include "nnacl/infer/infer_register.h"
#ifdef MS_COMPILE_IOS
extern void _AudioSpectrogramPrimType_AudioSpectrogram();
extern void _EqualPrimType_Equal();
extern void _GreaterPrimType_Greater();
extern void _GreaterEqualPrimType_GreaterEqual();
extern void _LessPrimType_Less();
extern void _LessEqualPrimType_LessEqual();
extern void _NotEqualPrimType_NotEqual();
extern void _DivGradPrimType_DivGrad();
extern void _MulGradPrimType_MulGrad();
extern void _MinimumGradPrimType_MinimumGrad();
extern void _FullConnectionPrimType_FullConnection();
extern void _AdamPrimType_Adam();
extern void _SlicePrimType_SliceFusion();
extern void _LSTMPrimType_LSTM();
extern void _TilePrimType_TileFusion();
extern void _EmbeddingLookupPrimType_EmbeddingLookupFusion();
extern void _AssignAddPrimType_AssignAdd();
extern void _LinSpacePrimType_LinSpace();
extern void _AddGradPrimType_AddGrad();
extern void _SubGradPrimType_SubGrad();
extern void _OneHotPrimType_OneHot();
extern void _RandomStandardNormalPrimType_RandomStandardNormal();
extern void _StridedSlicePrimType_StridedSlice();
extern void _FillPrimType_Fill();
extern void _CastPrimType_Cast();
extern void _SGDPrimType_SGD();
extern void _UniquePrimType_Unique();
extern void _BatchToSpacePrimType_BatchToSpace();
extern void _TensorListFromTensorPrimType_TensorListFromTensor();
extern void _TensorListGetItemPrimType_TensorListGetItem();
extern void _SoftmaxCrossEntropyWithLogitsPrimType_SoftmaxCrossEntropyWithLogits();
extern void _ExpandDimsPrimType_ExpandDims();
extern void _InvertPermutationPrimType_InvertPermutation();
extern void _MergePrimType_Merge();
extern void _RfftPrimType_Rfft();
extern void _Conv2DBackpropInputFusionPrimType_Conv2DBackpropInputFusion();
extern void _ScatterNdPrimType_ScatterNd();
extern void _FusedBatchNormPrimType_FusedBatchNorm();
extern void _PartialPrimType_PartialFusion();
extern void _HashtableLookupPrimType_HashtableLookup();
extern void _ReducePrimType_ReduceFusion();
extern void _GatherPrimType_Gather();
extern void _SplitPrimType_Split();
extern void _RangePrimType_Range();
extern void _BroadcastToPrimType_BroadcastTo();
extern void _UnsortedSegmentSumPrimType_UnsortedSegmentSum();
extern void _SqueezePrimType_Squeeze();
extern void _MaximumGradPrimType_MaximumGrad();
extern void _PowPrimType_PowFusion();
extern void _PriorBoxPrimType_PriorBox();
extern void _SpaceToDepthPrimType_SpaceToDepth();
extern void _RankPrimType_Rank();
extern void _MfccPrimType_Mfcc();
extern void _BinaryCrossEntropyPrimType_BinaryCrossEntropy();
extern void _Conv2DBackpropFilterFusionPrimType_Conv2DBackpropFilterFusion();
extern void _WherePrimType_Where();
extern void _DetectionPostProcessPrimType_DetectionPostProcess();
extern void _FlattenGradPrimType_FlattenGrad();
extern void _ConstantOfShapePrimType_ConstantOfShape();
extern void _SelectPrimType_Select();
extern void _ConcatPrimType_Concat();
extern void _StackPrimType_Stack();
extern void _SwitchPrimType_Switch();
extern void _NonMaxSuppressionPrimType_NonMaxSuppression();
extern void _SkipGramPrimType_SkipGram();
extern void _AddNPrimType_AddN();
extern void _ArgMinPrimType_ArgMinFusion();
extern void _ArgMaxPrimType_ArgMaxFusion();
extern void _LayerNormFusionPrimType_LayerNormFusion();
extern void _MaxPoolPrimType_MaxPoolFusion();
extern void _AvgPoolPrimType_AvgPoolFusion();
extern void _AssignPrimType_Assign();
extern void _CropPrimType_Crop();
extern void _UnsqueezePrimType_Unsqueeze();
extern void _AbsPrimType_Abs();
extern void _AbsGradPrimType_AbsGrad();
extern void _ActivationPrimType_Activation();
extern void _ActivationGradPrimType_ActivationGrad();
extern void _BatchNormPrimType_BatchNorm();
extern void _BinaryCrossEntropyGradPrimType_BinaryCrossEntropyGrad();
extern void _BiasAddPrimType_BiasAdd();
extern void _CeilPrimType_Ceil();
extern void _ClipPrimType_Clip();
extern void _ControlDependPrimType_ControlDepend();
extern void _CosPrimType_Cos();
extern void _DependPrimType_Depend();
extern void _EluPrimType_Elu();
extern void _ErfPrimType_Erf();
extern void _ExpPrimType_ExpFusion();
extern void _FakeQuantWithMinMaxVarsPrimType_FakeQuantWithMinMaxVars();
extern void _FloorPrimType_Floor();
extern void _IfPrimType_If();
extern void _InstanceNormPrimType_InstanceNorm();
extern void _IsFinitePrimType_IsFinite();
extern void _LeakyReluPrimType_LeakyRelu();
extern void _LogPrimType_Log();
extern void _LogGradPrimType_LogGrad();
extern void _LogicalNotPrimType_LogicalNot();
extern void _LRNPrimType_LRN();
extern void _L2NormalizePrimType_L2NormalizeFusion();
extern void _NegPrimType_Neg();
extern void _NegGradPrimType_NegGrad();
extern void _PowerGradPrimType_PowerGrad();
extern void _PReLUPrimType_PReLUFusion();
extern void _ReciprocalPrimType_Reciprocal();
extern void _ReverseSequencePrimType_ReverseSequence();
extern void _ReversePrimType_ReverseV2();
extern void _RoundPrimType_Round();
extern void _RsqrtPrimType_Rsqrt();
extern void _ScalePrimType_ScaleFusion();
extern void _SigmoidCrossEntropyWithLogitsPrimType_SigmoidCrossEntropyWithLogits();
extern void _SigmoidCrossEntropyWithLogitsGradPrimType_SigmoidCrossEntropyWithLogitsGrad();
extern void _SinPrimType_Sin();
extern void _SmoothL1LossPrimType_SmoothL1Loss();
extern void _SmoothL1LossGradPrimType_SmoothL1LossGrad();
extern void _SqrtPrimType_Sqrt();
extern void _SquarePrimType_Square();
extern void _ZerosLikePrimType_ZerosLike();
extern void _AssertPrimType_Assert();
extern void _TensorListSetItemPrimType_TensorListSetItem();
extern void _SplicePrimType_Splice();
extern void _SparseSoftmaxCrossEntropyWithLogitsPrimType_SparseSoftmaxCrossEntropyWithLogits();
extern void _GRUPrimType_GRU();
extern void _SizeOpPrimType_Size();
extern void _CustomExtractFeaturesPrimType_CustomExtractFeatures();
extern void _CustomPredictPrimType_CustomPredict();
extern void _WhilePrimType_While();
extern void _StridedSliceGradPrimType_StridedSliceGrad();
extern void _LshProjectionPrimType_LshProjection();
extern void _SoftmaxPrimType_Softmax();
extern void _CustomNormalizePrimType_CustomNormalize();
extern void _UnstackPrimType_Unstack();
extern void _ROIPoolingPrimType_ROIPooling();
extern void _LayerNormGradPrimType_LayerNormGrad();
extern void _DropoutGradPrimType_DropoutGrad();
extern void _TopKPrimType_TopKFusion();
extern void _ApplyMomentumPrimType_ApplyMomentum();
extern void _AdderPrimType_AdderFusion();
extern void _Conv2DPrimType_Conv2DFusion();
extern void _UniformRealPrimType_UniformReal();
extern void _AvgPoolGradPrimType_AvgPoolGrad();
extern void _MaxPoolGradPrimType_MaxPoolGrad();
extern void _DepthToSpacePrimType_DepthToSpace();
extern void _Conv2dTransposePrimType_Conv2dTransposeFusion();
extern void _QuantDTypeCastPrimType_QuantDTypeCast();
extern void _FftImagPrimType_FftImag();
extern void _FftRealPrimType_FftReal();
extern void _ResizePrimType_Resize();
extern void _SpaceToBatchNDPrimType_SpaceToBatchND();
extern void _TransposePrimType_Transpose();
extern void _TensorListReservePrimType_TensorListReserve();
extern void _ShapePrimType_Shape();
extern void _BiasAddGradPrimType_BiasAddGrad();
extern void _MatMulPrimType_MatMul();
extern void _DropoutPrimType_Dropout();
extern void _ReshapePrimType_Reshape();
extern void _PadPrimType_PadFusion();
extern void _TensorListStackPrimType_TensorListStack();
extern void _FlattenPrimType_Flatten();
extern void _BatchNormGradPrimType_BatchNormGrad();
extern void _SpaceToBatchPrimType_SpaceToBatch();
extern void _GatherNdPrimType_GatherNd();
extern void _CropAndResizePrimType_CropAndResize();
extern void _SparseToDensePrimType_SparseToDense();
extern void _AddPrimType_AddFusion();
extern void _DivPrimType_DivFusion();
extern void _EltwisePrimType_Eltwise();
extern void _FloorDivPrimType_FloorDiv();
extern void _FloorModPrimType_FloorMod();
extern void _LogicalAndPrimType_LogicalAnd();
extern void _LogicalOrPrimType_LogicalOr();
extern void _MaximumPrimType_Maximum();
extern void _MinimumPrimType_Minimum();
extern void _ModPrimType_Mod();
extern void _MulPrimType_MulFusion();
extern void _RealDivPrimType_RealDiv();
extern void _SubPrimType_SubFusion();
extern void _SquaredDifferencePrimType_SquaredDifference();
void RegisterInfer() {
_AudioSpectrogramPrimType_AudioSpectrogram();
_EqualPrimType_Equal();
_GreaterPrimType_Greater();
_GreaterEqualPrimType_GreaterEqual();
_LessPrimType_Less();
_LessEqualPrimType_LessEqual();
_NotEqualPrimType_NotEqual();
_DivGradPrimType_DivGrad();
_MulGradPrimType_MulGrad();
_MinimumGradPrimType_MinimumGrad();
_FullConnectionPrimType_FullConnection();
_AdamPrimType_Adam();
_SlicePrimType_SliceFusion();
_LSTMPrimType_LSTM();
_TilePrimType_TileFusion();
_EmbeddingLookupPrimType_EmbeddingLookupFusion();
_AssignAddPrimType_AssignAdd();
_LinSpacePrimType_LinSpace();
_AddGradPrimType_AddGrad();
_SubGradPrimType_SubGrad();
_OneHotPrimType_OneHot();
_RandomStandardNormalPrimType_RandomStandardNormal();
_StridedSlicePrimType_StridedSlice();
_FillPrimType_Fill();
_CastPrimType_Cast();
_SGDPrimType_SGD();
_UniquePrimType_Unique();
_BatchToSpacePrimType_BatchToSpace();
_TensorListFromTensorPrimType_TensorListFromTensor();
_TensorListGetItemPrimType_TensorListGetItem();
_SoftmaxCrossEntropyWithLogitsPrimType_SoftmaxCrossEntropyWithLogits();
_ExpandDimsPrimType_ExpandDims();
_InvertPermutationPrimType_InvertPermutation();
_MergePrimType_Merge();
_RfftPrimType_Rfft();
_Conv2DBackpropInputFusionPrimType_Conv2DBackpropInputFusion();
_ScatterNdPrimType_ScatterNd();
_FusedBatchNormPrimType_FusedBatchNorm();
_PartialPrimType_PartialFusion();
_HashtableLookupPrimType_HashtableLookup();
_ReducePrimType_ReduceFusion();
_GatherPrimType_Gather();
_SplitPrimType_Split();
_RangePrimType_Range();
_BroadcastToPrimType_BroadcastTo();
_UnsortedSegmentSumPrimType_UnsortedSegmentSum();
_SqueezePrimType_Squeeze();
_MaximumGradPrimType_MaximumGrad();
_PowPrimType_PowFusion();
_PriorBoxPrimType_PriorBox();
_SpaceToDepthPrimType_SpaceToDepth();
_RankPrimType_Rank();
_MfccPrimType_Mfcc();
_BinaryCrossEntropyPrimType_BinaryCrossEntropy();
_Conv2DBackpropFilterFusionPrimType_Conv2DBackpropFilterFusion();
_WherePrimType_Where();
_DetectionPostProcessPrimType_DetectionPostProcess();
_FlattenGradPrimType_FlattenGrad();
_ConstantOfShapePrimType_ConstantOfShape();
_SelectPrimType_Select();
_ConcatPrimType_Concat();
_StackPrimType_Stack();
_SwitchPrimType_Switch();
_NonMaxSuppressionPrimType_NonMaxSuppression();
_SkipGramPrimType_SkipGram();
_AddNPrimType_AddN();
_ArgMinPrimType_ArgMinFusion();
_ArgMaxPrimType_ArgMaxFusion();
_LayerNormFusionPrimType_LayerNormFusion();
_MaxPoolPrimType_MaxPoolFusion();
_AvgPoolPrimType_AvgPoolFusion();
_AssignPrimType_Assign();
_CropPrimType_Crop();
_UnsqueezePrimType_Unsqueeze();
_AbsPrimType_Abs();
_AbsGradPrimType_AbsGrad();
_ActivationPrimType_Activation();
_ActivationGradPrimType_ActivationGrad();
_BatchNormPrimType_BatchNorm();
_BinaryCrossEntropyGradPrimType_BinaryCrossEntropyGrad();
_BiasAddPrimType_BiasAdd();
_CeilPrimType_Ceil();
_ClipPrimType_Clip();
_ControlDependPrimType_ControlDepend();
_CosPrimType_Cos();
_DependPrimType_Depend();
_EluPrimType_Elu();
_ErfPrimType_Erf();
_ExpPrimType_ExpFusion();
_FakeQuantWithMinMaxVarsPrimType_FakeQuantWithMinMaxVars();
_FloorPrimType_Floor();
_IfPrimType_If();
_InstanceNormPrimType_InstanceNorm();
_IsFinitePrimType_IsFinite();
_LeakyReluPrimType_LeakyRelu();
_LogPrimType_Log();
_LogGradPrimType_LogGrad();
_LogicalNotPrimType_LogicalNot();
_LRNPrimType_LRN();
_L2NormalizePrimType_L2NormalizeFusion();
_NegPrimType_Neg();
_NegGradPrimType_NegGrad();
_PowerGradPrimType_PowerGrad();
_PReLUPrimType_PReLUFusion();
_ReciprocalPrimType_Reciprocal();
_ReverseSequencePrimType_ReverseSequence();
_ReversePrimType_ReverseV2();
_RoundPrimType_Round();
_RsqrtPrimType_Rsqrt();
_ScalePrimType_ScaleFusion();
_SigmoidCrossEntropyWithLogitsPrimType_SigmoidCrossEntropyWithLogits();
_SigmoidCrossEntropyWithLogitsGradPrimType_SigmoidCrossEntropyWithLogitsGrad();
_SinPrimType_Sin();
_SmoothL1LossPrimType_SmoothL1Loss();
_SmoothL1LossGradPrimType_SmoothL1LossGrad();
_SqrtPrimType_Sqrt();
_SquarePrimType_Square();
_ZerosLikePrimType_ZerosLike();
_AssertPrimType_Assert();
_TensorListSetItemPrimType_TensorListSetItem();
_SplicePrimType_Splice();
_SparseSoftmaxCrossEntropyWithLogitsPrimType_SparseSoftmaxCrossEntropyWithLogits();
_GRUPrimType_GRU();
_SizeOpPrimType_Size();
_CustomExtractFeaturesPrimType_CustomExtractFeatures();
_CustomPredictPrimType_CustomPredict();
_WhilePrimType_While();
_StridedSliceGradPrimType_StridedSliceGrad();
_LshProjectionPrimType_LshProjection();
_SoftmaxPrimType_Softmax();
_CustomNormalizePrimType_CustomNormalize();
_UnstackPrimType_Unstack();
_ROIPoolingPrimType_ROIPooling();
_LayerNormGradPrimType_LayerNormGrad();
_DropoutGradPrimType_DropoutGrad();
_TopKPrimType_TopKFusion();
_ApplyMomentumPrimType_ApplyMomentum();
_AdderPrimType_AdderFusion();
_Conv2DPrimType_Conv2DFusion();
_UniformRealPrimType_UniformReal();
_AvgPoolGradPrimType_AvgPoolGrad();
_MaxPoolGradPrimType_MaxPoolGrad();
_DepthToSpacePrimType_DepthToSpace();
_Conv2dTransposePrimType_Conv2dTransposeFusion();
_QuantDTypeCastPrimType_QuantDTypeCast();
_FftImagPrimType_FftImag();
_FftRealPrimType_FftReal();
_ResizePrimType_Resize();
_SpaceToBatchNDPrimType_SpaceToBatchND();
_TransposePrimType_Transpose();
_TensorListReservePrimType_TensorListReserve();
_ShapePrimType_Shape();
_BiasAddGradPrimType_BiasAddGrad();
_MatMulPrimType_MatMul();
_DropoutPrimType_Dropout();
_ReshapePrimType_Reshape();
_PadPrimType_PadFusion();
_TensorListStackPrimType_TensorListStack();
_FlattenPrimType_Flatten();
_BatchNormGradPrimType_BatchNormGrad();
_SpaceToBatchPrimType_SpaceToBatch();
_GatherNdPrimType_GatherNd();
_CropAndResizePrimType_CropAndResize();
_SparseToDensePrimType_SparseToDense();
_AddPrimType_AddFusion();
_DivPrimType_DivFusion();
_EltwisePrimType_Eltwise();
_FloorDivPrimType_FloorDiv();
_FloorModPrimType_FloorMod();
_LogicalAndPrimType_LogicalAnd();
_LogicalOrPrimType_LogicalOr();
_MaximumPrimType_Maximum();
_MinimumPrimType_Minimum();
_ModPrimType_Mod();
_MulPrimType_MulFusion();
_RealDivPrimType_RealDiv();
_SubPrimType_SubFusion();
_SquaredDifferencePrimType_SquaredDifference();
}
#endif
InferShape *g_infer_func = NULL;

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32_grad/activation_grad.h"
using mindspore::schema::PrimitiveType_ActivationGrad;
namespace mindspore {
namespace lite {
@ -34,7 +35,6 @@ OpParameter *PopulateActivationGradParameter(const void *prim) {
act_param->alpha_ = value->alpha();
return reinterpret_cast<OpParameter *>(act_param);
}
Registry ActivationGradParameterRegistry(schema::PrimitiveType_ActivationGrad, PopulateActivationGradParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_ActivationGrad, PopulateActivationGradParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/activation_fp32.h"
using mindspore::schema::PrimitiveType_Activation;
namespace mindspore {
namespace lite {
@ -37,6 +38,6 @@ OpParameter *PopulateRelu6Parameter(const void *prim) {
}
} // namespace
Registry g_relu6ParameterRegistry(schema::PrimitiveType_Activation, PopulateRelu6Parameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Activation, PopulateRelu6Parameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Adam;
namespace mindspore {
namespace lite {
@ -29,6 +30,6 @@ OpParameter *PopulateAdamParameter(const void *prim) {
return param;
}
Registry AdamParameterRegistry(schema::PrimitiveType_Adam, PopulateAdamParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Adam, PopulateAdamParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -16,6 +16,7 @@
#include "src/ops/populate/populate_register.h"
#include "nnacl/arithmetic.h"
#include "src/ops/populate/arithmetic_populate.h"
using mindspore::schema::PrimitiveType_AddFusion;
namespace mindspore {
namespace lite {
@ -33,6 +34,6 @@ OpParameter *PopulateAddParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(param);
}
} // namespace
Registry g_addParameterRegistry(schema::PrimitiveType_AddFusion, PopulateAddParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_AddFusion, PopulateAddParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -16,6 +16,7 @@
#include "src/common/log_adapter.h"
#include "nnacl/conv_parameter.h"
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_AdderFusion;
namespace mindspore {
namespace lite {
@ -57,6 +58,6 @@ OpParameter *PopulateAdderParameter(const void *prim) {
}
return reinterpret_cast<OpParameter *>(conv_param);
}
Registry g_AdderParameterRegistry(schema::PrimitiveType_AdderFusion, PopulateAdderParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_AdderFusion, PopulateAdderParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/op_base.h"
using mindspore::schema::PrimitiveType_AddN;
namespace mindspore {
namespace lite {
@ -31,6 +32,6 @@ OpParameter *PopulateAddNParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(addn_param);
}
} // namespace
Registry g_addNParameterRegistry(schema::PrimitiveType_AddN, PopulateAddNParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_AddN, PopulateAddNParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/arg_min_max_parameter.h"
using mindspore::schema::PrimitiveType_ArgMaxFusion;
namespace mindspore {
namespace lite {
@ -38,6 +39,6 @@ OpParameter *PopulateArgMaxParameter(const void *prim) {
}
} // namespace
Registry g_argMaxParameterRegistry(schema::PrimitiveType_ArgMaxFusion, PopulateArgMaxParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_ArgMaxFusion, PopulateArgMaxParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/arg_min_max_parameter.h"
using mindspore::schema::PrimitiveType_ArgMinFusion;
namespace mindspore {
namespace lite {
@ -38,6 +39,6 @@ OpParameter *PopulateArgMinParameter(const void *prim) {
}
} // namespace
Registry g_argMinParameterRegistry(schema::PrimitiveType_ArgMinFusion, PopulateArgMinParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_ArgMinFusion, PopulateArgMinParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,23 @@
*/
#include "src/ops/populate/arithmetic_populate.h"
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Equal;
using mindspore::schema::PrimitiveType_FloorDiv;
using mindspore::schema::PrimitiveType_FloorMod;
using mindspore::schema::PrimitiveType_Greater;
using mindspore::schema::PrimitiveType_GreaterEqual;
using mindspore::schema::PrimitiveType_Less;
using mindspore::schema::PrimitiveType_LessEqual;
using mindspore::schema::PrimitiveType_LogicalAnd;
using mindspore::schema::PrimitiveType_LogicalOr;
using mindspore::schema::PrimitiveType_Maximum;
using mindspore::schema::PrimitiveType_MaximumGrad;
using mindspore::schema::PrimitiveType_Minimum;
using mindspore::schema::PrimitiveType_MinimumGrad;
using mindspore::schema::PrimitiveType_Mod;
using mindspore::schema::PrimitiveType_NotEqual;
using mindspore::schema::PrimitiveType_RealDiv;
using mindspore::schema::PrimitiveType_SquaredDifference;
namespace mindspore {
namespace lite {
@ -42,22 +59,22 @@ OpParameter *PopulateArithmetic(const void *primitive) {
return reinterpret_cast<OpParameter *>(param);
}
Registry g_MinimunGradParameterRegistry(schema::PrimitiveType_MinimumGrad, PopulateArithmetic, SCHEMA_CUR);
Registry g_MaximunGradParameterRegistry(schema::PrimitiveType_MaximumGrad, PopulateArithmetic, SCHEMA_CUR);
Registry g_realDivParameterRegistry(schema::PrimitiveType_RealDiv, PopulateArithmetic, SCHEMA_CUR);
Registry g_logicalAndParameterRegistry(schema::PrimitiveType_LogicalAnd, PopulateArithmetic, SCHEMA_CUR);
Registry g_parameterRegistry(schema::PrimitiveType_LogicalOr, PopulateArithmetic, SCHEMA_CUR);
Registry g_equalParameterRegistry(schema::PrimitiveType_Equal, PopulateArithmetic, SCHEMA_CUR);
Registry g_notEqualParameterRegistry(schema::PrimitiveType_NotEqual, PopulateArithmetic, SCHEMA_CUR);
Registry g_essParameterRegistry(schema::PrimitiveType_Less, PopulateArithmetic, SCHEMA_CUR);
Registry g_lessEqualParameterRegistry(schema::PrimitiveType_LessEqual, PopulateArithmetic, SCHEMA_CUR);
Registry g_greaterParameterRegistry(schema::PrimitiveType_Greater, PopulateArithmetic, SCHEMA_CUR);
Registry g_greaterEqualParameterRegistry(schema::PrimitiveType_GreaterEqual, PopulateArithmetic, SCHEMA_CUR);
Registry g_maximumParameterRegistry(schema::PrimitiveType_Maximum, PopulateArithmetic, SCHEMA_CUR);
Registry g_minimumParameterRegistry(schema::PrimitiveType_Minimum, PopulateArithmetic, SCHEMA_CUR);
Registry g_floorDivParameterRegistry(schema::PrimitiveType_FloorDiv, PopulateArithmetic, SCHEMA_CUR);
Registry g_floorModParameterRegistry(schema::PrimitiveType_FloorMod, PopulateArithmetic, SCHEMA_CUR);
Registry g_modParameterRegistry(schema::PrimitiveType_Mod, PopulateArithmetic, SCHEMA_CUR);
Registry g_squaredDifferenceParameterRegistry(schema::PrimitiveType_SquaredDifference, PopulateArithmetic, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_MinimumGrad, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_MaximumGrad, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_RealDiv, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_LogicalAnd, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_LogicalOr, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Equal, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_NotEqual, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Less, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_LessEqual, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Greater, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_GreaterEqual, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Maximum, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Minimum, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_FloorDiv, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_FloorMod, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Mod, PopulateArithmetic, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_SquaredDifference, PopulateArithmetic, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -16,6 +16,21 @@
#include "src/common/log_adapter.h"
#include "nnacl/arithmetic_self_parameter.h"
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Abs;
using mindspore::schema::PrimitiveType_Ceil;
using mindspore::schema::PrimitiveType_Cos;
using mindspore::schema::PrimitiveType_Floor;
using mindspore::schema::PrimitiveType_Log;
using mindspore::schema::PrimitiveType_LogGrad;
using mindspore::schema::PrimitiveType_LogicalNot;
using mindspore::schema::PrimitiveType_Neg;
using mindspore::schema::PrimitiveType_NegGrad;
using mindspore::schema::PrimitiveType_Reciprocal;
using mindspore::schema::PrimitiveType_Round;
using mindspore::schema::PrimitiveType_Rsqrt;
using mindspore::schema::PrimitiveType_Sin;
using mindspore::schema::PrimitiveType_Sqrt;
using mindspore::schema::PrimitiveType_Square;
namespace mindspore {
namespace lite {
@ -32,20 +47,20 @@ OpParameter *PopulateArithmeticSelf(const void *prim) {
return reinterpret_cast<OpParameter *>(arithmetic_self_param);
}
Registry g_absParameterRegistry(schema::PrimitiveType_Abs, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_cosParameterRegistry(schema::PrimitiveType_Cos, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_sinParameterRegistry(schema::PrimitiveType_Sin, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_logParameterRegistry(schema::PrimitiveType_Log, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_negParameterRegistry(schema::PrimitiveType_Neg, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_negGradParameterRegistry(schema::PrimitiveType_NegGrad, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_logGradParameterRegistry(schema::PrimitiveType_LogGrad, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_sqrtParameterRegistry(schema::PrimitiveType_Sqrt, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_squareParameterRegistry(schema::PrimitiveType_Square, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_rsqrtParameterRegistry(schema::PrimitiveType_Rsqrt, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_logicalNotParameterRegistry(schema::PrimitiveType_LogicalNot, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_floorParameterRegistry(schema::PrimitiveType_Floor, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_ceilParameterRegistry(schema::PrimitiveType_Ceil, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_roundParameterRegistry(schema::PrimitiveType_Round, PopulateArithmeticSelf, SCHEMA_CUR);
Registry g_reciprocalParameterRegistry(schema::PrimitiveType_Reciprocal, PopulateArithmeticSelf, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Abs, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Cos, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Sin, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Log, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Neg, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_NegGrad, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_LogGrad, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Sqrt, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Square, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Rsqrt, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_LogicalNot, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Floor, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Ceil, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Round, PopulateArithmeticSelf, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Reciprocal, PopulateArithmeticSelf, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Assert;
namespace mindspore {
namespace lite {
@ -30,6 +31,6 @@ OpParameter *PopulateAssertParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(assert_parameter);
}
Registry AssertParameterRegistry(schema::PrimitiveType_Assert, PopulateAssertParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Assert, PopulateAssertParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_AssignAdd;
namespace mindspore {
namespace lite {
@ -29,6 +30,6 @@ OpParameter *PopulateAssignAddParameter(const void *prim) {
return param;
}
Registry AssignAddParameterRegistry(schema::PrimitiveType_AssignAdd, PopulateAssignAddParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_AssignAdd, PopulateAssignAddParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Assign;
namespace mindspore {
namespace lite {
@ -30,6 +31,6 @@ OpParameter *PopulateAssignParameter(const void *prim) {
return param;
}
Registry AssignParameterRegistry(schema::PrimitiveType_Assign, PopulateAssignParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Assign, PopulateAssignParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/infer/audio_spectrogram_infer.h"
using mindspore::schema::PrimitiveType_AudioSpectrogram;
namespace mindspore {
namespace lite {
@ -36,7 +37,6 @@ OpParameter *PopulateAudioSpectrogramParameter(const void *prim) {
}
} // namespace
Registry g_audioSpectrogramParameterRegistry(schema::PrimitiveType_AudioSpectrogram, PopulateAudioSpectrogramParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_AudioSpectrogram, PopulateAudioSpectrogramParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/batchnorm_parameter.h"
using mindspore::schema::PrimitiveType_BatchNorm;
namespace mindspore {
namespace lite {
@ -35,7 +36,6 @@ OpParameter *PopulateBatchNorm(const void *prim) {
}
} // namespace
Registry g_batchNormParameterRegistry(schema::PrimitiveType_BatchNorm, PopulateBatchNorm, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_BatchNorm, PopulateBatchNorm, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,8 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/batch_to_space.h"
using mindspore::schema::PrimitiveType_BatchToSpace;
using mindspore::schema::PrimitiveType_BatchToSpaceND;
namespace mindspore {
namespace lite {
@ -63,7 +65,7 @@ OpParameter *PopulateBatchToSpaceParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(batch_space_param);
}
} // namespace
Registry g_batchToSpaceRegistry(schema::PrimitiveType_BatchToSpace, PopulateBatchToSpaceParameter, SCHEMA_CUR);
Registry g_batchToSpaceNDRegistry(schema::PrimitiveType_BatchToSpaceND, PopulateBatchToSpaceParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_BatchToSpace, PopulateBatchToSpaceParameter, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_BatchToSpaceND, PopulateBatchToSpaceParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/arithmetic.h"
using mindspore::schema::PrimitiveType_BiasAdd;
namespace mindspore {
namespace lite {
@ -32,7 +33,6 @@ OpParameter *PopulateBiasAddParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(arithmetic_param);
}
} // namespace
Registry g_biasAddParameterRegistry(schema::PrimitiveType_BiasAdd, PopulateBiasAddParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_BiasAdd, PopulateBiasAddParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/arithmetic.h"
using mindspore::schema::PrimitiveType_BiasAddGrad;
namespace mindspore {
namespace lite {
@ -33,7 +34,6 @@ OpParameter *PopulateBiasAddGradParameter(const void *prim) {
}
} // namespace
Registry g_populateBiasGradParameterParameterRegistry(schema::PrimitiveType_BiasAddGrad, PopulateBiasAddGradParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_BiasAddGrad, PopulateBiasAddGradParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32_grad/binary_cross_entropy_grad.h"
using mindspore::schema::PrimitiveType_BinaryCrossEntropyGrad;
namespace mindspore {
namespace lite {
@ -35,7 +36,6 @@ OpParameter *PopulateBinaryCrossEntropyGradParameter(const void *prim) {
}
} // namespace
Registry g_binaryCrossEntropyGradParameterRegistry(schema::PrimitiveType_BinaryCrossEntropyGrad,
PopulateBinaryCrossEntropyGradParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_BinaryCrossEntropyGrad, PopulateBinaryCrossEntropyGradParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32_grad/binary_cross_entropy.h"
using mindspore::schema::PrimitiveType_BinaryCrossEntropy;
namespace mindspore {
namespace lite {
@ -33,7 +34,6 @@ OpParameter *PopulateBinaryCrossEntropyParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(bce_param);
}
Registry BinaryCrossEntropyParameterRegistry(schema::PrimitiveType_BinaryCrossEntropy,
PopulateBinaryCrossEntropyParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_BinaryCrossEntropy, PopulateBinaryCrossEntropyParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/broadcast_to_fp32.h"
using mindspore::schema::PrimitiveType_BroadcastTo;
namespace mindspore {
namespace lite {
@ -37,6 +38,6 @@ OpParameter *PopulateBroadcastToParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(broadcast_param);
}
Registry BroadcastToParameterRegistry(schema::PrimitiveType_BroadcastTo, PopulateBroadcastToParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_BroadcastTo, PopulateBroadcastToParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Cast;
namespace mindspore {
namespace lite {
@ -31,6 +32,6 @@ OpParameter *PopulateCastParameter(const void *prim) {
}
} // namespace
Registry g_castParameterRegistry(schema::PrimitiveType_Cast, PopulateCastParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Cast, PopulateCastParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Clip;
namespace mindspore {
namespace lite {
@ -31,7 +32,6 @@ OpParameter *PopulateClipParameter(const void *prim) {
}
} // namespace
Registry g_clipParameterRegistry(schema::PrimitiveType_Clip, PopulateClipParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Clip, PopulateClipParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,8 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Depend;
using mindspore::schema::PrimitiveType_ZerosLike;
namespace mindspore {
namespace lite {
@ -31,7 +33,7 @@ OpParameter *PopulateCommonParameter(const void *prim) {
}
} // namespace
Registry g_zerosLikeParameterRegistry(schema::PrimitiveType_ZerosLike, PopulateCommonParameter, SCHEMA_CUR);
Registry g_dependParameterRegistry(schema::PrimitiveType_Depend, PopulateCommonParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_ZerosLike, PopulateCommonParameter, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_Depend, PopulateCommonParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/concat_parameter.h"
using mindspore::schema::PrimitiveType_Concat;
namespace mindspore {
namespace lite {
@ -33,6 +34,6 @@ OpParameter *PopulateConcatParameter(const void *prim) {
}
} // namespace
Registry g_concatParameterRegistry(schema::PrimitiveType_Concat, PopulateConcatParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Concat, PopulateConcatParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/constant_of_shape_parameter.h"
using mindspore::schema::PrimitiveType_ConstantOfShape;
namespace mindspore::lite {
namespace {
@ -46,8 +47,7 @@ OpParameter *PopulateConstantOfShapeParameter(const void *prim) {
}
}
return reinterpret_cast<OpParameter *>(param);
}
} // namespace
Registry g_constantOfShapeParameterRegistry(schema::PrimitiveType_ConstantOfShape, PopulateConstantOfShapeParameter,
SCHEMA_CUR);
} // namespace
REG_POPULATE(PrimitiveType_ConstantOfShape, PopulateConstantOfShapeParameter, SCHEMA_CUR);
} // namespace mindspore::lite

View File

@ -16,6 +16,7 @@
#include "nnacl/conv_parameter.h"
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Conv2DFusion;
namespace mindspore {
namespace lite {
@ -74,6 +75,6 @@ OpParameter *PopulateConvParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(conv_param);
}
} // namespace
Registry g_conv2DParameterRegistry(schema::PrimitiveType_Conv2DFusion, PopulateConvParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Conv2DFusion, PopulateConvParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/resize_parameter.h"
using mindspore::schema::PrimitiveType_CropAndResize;
namespace mindspore {
namespace lite {
namespace {
@ -35,7 +36,6 @@ OpParameter *PopulateCropAndResizeParameter(const void *prim) {
}
} // namespace
Registry g_cropAndResizeParameterRegistry(schema::PrimitiveType_CropAndResize, PopulateCropAndResizeParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_CropAndResize, PopulateCropAndResizeParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/crop_parameter.h"
using mindspore::schema::PrimitiveType_Crop;
namespace mindspore {
namespace lite {
@ -43,6 +44,6 @@ OpParameter *PopulateCropParameter(const void *prim) {
}
} // namespace
Registry g_cropParameterRegistry(schema::PrimitiveType_Crop, PopulateCropParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Crop, PopulateCropParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_CustomExtractFeatures;
namespace mindspore {
namespace lite {
@ -30,7 +31,6 @@ OpParameter *PopulateExtractFeaturesParameter(const void *prim) {
return param;
}
} // namespace
Registry g_customExtractFeaturesParameterRegistry(schema::PrimitiveType_CustomExtractFeatures,
PopulateExtractFeaturesParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_CustomExtractFeatures, PopulateExtractFeaturesParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_CustomNormalize;
namespace mindspore {
namespace lite {
@ -29,8 +30,7 @@ OpParameter *PopulateCustomNormalizeParameter(const void *prim) {
param->type_ = primitive->value_type();
return param;
}
Registry CustomNormalizeParameterRegistry(schema::PrimitiveType_CustomNormalize, PopulateCustomNormalizeParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_CustomNormalize, PopulateCustomNormalizeParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/predict_parameter.h"
using mindspore::schema::PrimitiveType_CustomPredict;
namespace mindspore {
namespace lite {
@ -33,8 +34,7 @@ OpParameter *PopulateCustomPredictParameter(const void *prim) {
param->weight_threshold = value->weight_threshold();
return reinterpret_cast<OpParameter *>(param);
}
Registry CustomPredictParameterRegistry(schema::PrimitiveType_CustomPredict, PopulateCustomPredictParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_CustomPredict, PopulateCustomPredictParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -16,6 +16,7 @@
#include "src/common/log_adapter.h"
#include "src/ops/populate/populate_register.h"
#include "nnacl/conv_parameter.h"
using mindspore::schema::PrimitiveType_Conv2dTransposeFusion;
namespace mindspore {
namespace lite {
@ -77,6 +78,6 @@ OpParameter *PopulateDeconvParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(conv_param);
}
Registry g_Deconv2DParameterRegistry(schema::PrimitiveType_Conv2dTransposeFusion, PopulateDeconvParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Conv2dTransposeFusion, PopulateDeconvParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/depth_to_space_parameter.h"
using mindspore::schema::PrimitiveType_DepthToSpace;
namespace mindspore {
namespace lite {
@ -35,6 +36,6 @@ OpParameter *PopulateDepthToSpaceParameter(const void *prim) {
}
} // namespace
Registry g_depthToSpaceParamRegistry(schema::PrimitiveType_DepthToSpace, PopulateDepthToSpaceParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_DepthToSpace, PopulateDepthToSpaceParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/detection_post_process_parameter.h"
using mindspore::schema::PrimitiveType_DetectionPostProcess;
namespace mindspore {
namespace lite {
@ -44,8 +45,7 @@ OpParameter *PopulateDetectionPostProcessParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(detection_post_process_parameter);
}
} // namespace
Registry g_detectionPostProcessParameterRegistry(schema::PrimitiveType_DetectionPostProcess,
PopulateDetectionPostProcessParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_DetectionPostProcess, PopulateDetectionPostProcessParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/arithmetic_populate.h"
using mindspore::schema::PrimitiveType_DivFusion;
namespace mindspore {
namespace lite {
@ -27,7 +28,6 @@ OpParameter *PopulateDivParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(param);
}
Registry g_divParameterRegistry(schema::PrimitiveType_DivFusion, PopulateDivParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_DivFusion, PopulateDivParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/arithmetic_populate.h"
using mindspore::schema::PrimitiveType_Eltwise;
namespace mindspore {
namespace lite {
@ -31,6 +32,6 @@ OpParameter *PopulateEltwiseParameter(const void *prim) {
}
} // namespace
Registry g_eltwiseParameterRegistry(schema::PrimitiveType_Eltwise, PopulateEltwiseParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Eltwise, PopulateEltwiseParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "nnacl/fp32/elu_fp32.h"
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Elu;
namespace mindspore {
namespace lite {
@ -33,6 +34,6 @@ OpParameter *PopulateEluParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(elu_parameter);
}
} // namespace
Registry g_eluParameterRegistry(schema::PrimitiveType_Elu, PopulateEluParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Elu, PopulateEluParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/embedding_lookup_fp32.h"
using mindspore::schema::PrimitiveType_EmbeddingLookupFusion;
namespace mindspore {
namespace lite {
@ -40,8 +41,7 @@ OpParameter *PopulateEmbeddingLookupParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(param);
}
Registry EmbeddingLookupParameterRegistry(schema::PrimitiveType_EmbeddingLookupFusion, PopulateEmbeddingLookupParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_EmbeddingLookupFusion, PopulateEmbeddingLookupParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,9 +15,10 @@
*/
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/default_populate.h"
using mindspore::schema::PrimitiveType_Erf;
namespace mindspore {
namespace lite {
Registry g_erfParameterRegistry(schema::PrimitiveType_Erf, DefaultPopulateParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Erf, DefaultPopulateParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/exp_fp32.h"
using mindspore::schema::PrimitiveType_ExpFusion;
namespace mindspore {
namespace lite {
@ -40,6 +41,6 @@ OpParameter *PopulateExpParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(exp_parameter);
}
Registry ExpParameterRegistry(schema::PrimitiveType_ExpFusion, PopulateExpParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_ExpFusion, PopulateExpParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_ExpandDims;
namespace mindspore {
namespace lite {
@ -31,6 +32,6 @@ OpParameter *PopulateExpandDimsParameter(const void *prim) {
}
} // namespace
Registry g_expandDimsParameterRegistry(schema::PrimitiveType_ExpandDims, PopulateExpandDimsParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_ExpandDims, PopulateExpandDimsParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Fill;
namespace mindspore {
namespace lite {
@ -31,7 +32,6 @@ OpParameter *PopulateFillParameter(const void *prim) {
}
} // namespace
Registry g_fillParameterRegistry(schema::PrimitiveType_Fill, PopulateFillParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Fill, PopulateFillParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Flatten;
namespace mindspore {
namespace lite {
@ -30,7 +31,6 @@ OpParameter *PopulateFlattenParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(flatten_param);
}
Registry FlattenParameterRegistry(schema::PrimitiveType_Flatten, PopulateFlattenParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Flatten, PopulateFlattenParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/matmul_parameter.h"
using mindspore::schema::PrimitiveType_FullConnection;
namespace mindspore {
namespace lite {
@ -45,6 +46,6 @@ OpParameter *PopulateFullconnectionParameter(const void *prim) {
}
} // namespace
Registry g_fullConnRegistry(schema::PrimitiveType_FullConnection, PopulateFullconnectionParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_FullConnection, PopulateFullconnectionParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/batchnorm_parameter.h"
using mindspore::schema::PrimitiveType_FusedBatchNorm;
namespace mindspore {
namespace lite {
@ -35,7 +36,6 @@ OpParameter *PopulateFusedBatchNorm(const void *prim) {
return reinterpret_cast<OpParameter *>(batch_norm_param);
}
Registry FusedBatchNormParameterRegistry(schema::PrimitiveType_FusedBatchNorm, PopulateFusedBatchNorm, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_FusedBatchNorm, PopulateFusedBatchNorm, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/gatherNd_fp32.h"
using mindspore::schema::PrimitiveType_GatherNd;
namespace mindspore {
namespace lite {
@ -32,6 +33,6 @@ OpParameter *PopulateGatherNdParameter(const void *prim) {
}
} // namespace
Registry g_gatherNdParameterRegistry(schema::PrimitiveType_GatherNd, PopulateGatherNdParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_GatherNd, PopulateGatherNdParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/gather_parameter.h"
using mindspore::schema::PrimitiveType_Gather;
namespace mindspore {
namespace lite {
@ -33,6 +34,6 @@ OpParameter *PopulateGatherParameter(const void *prim) {
}
} // namespace
Registry g_gatherParameterRegistry(schema::PrimitiveType_Gather, PopulateGatherParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Gather, PopulateGatherParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/gru_fp32.h"
using mindspore::schema::PrimitiveType_GRU;
namespace mindspore {
namespace lite {
@ -39,6 +40,6 @@ OpParameter *PopulateGruParameter(const void *prim) {
}
} // namespace
Registry g_gruParameterRegistry(schema::PrimitiveType_GRU, PopulateGruParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_GRU, PopulateGruParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_HashtableLookup;
namespace mindspore {
namespace lite {
@ -29,8 +30,7 @@ OpParameter *PopulateHashtableLookupParameter(const void *prim) {
param->type_ = primitive->value_type();
return param;
}
Registry HashtableLookupParameterRegistry(schema::PrimitiveType_HashtableLookup, PopulateHashtableLookupParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_HashtableLookup, PopulateHashtableLookupParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,9 +15,10 @@
*/
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/default_populate.h"
using mindspore::schema::PrimitiveType_If;
namespace mindspore {
namespace lite {
Registry g_ifParameterRegistry(schema::PrimitiveType_If, DefaultPopulateParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_If, DefaultPopulateParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/instance_norm_parameter.h"
using mindspore::schema::PrimitiveType_InstanceNorm;
namespace mindspore {
namespace lite {
@ -34,6 +35,6 @@ OpParameter *PopulateInstanceNormParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(instance_norm_param);
}
Registry InstanceNormParameterRegistry(schema::PrimitiveType_InstanceNorm, PopulateInstanceNormParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_InstanceNorm, PopulateInstanceNormParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,10 +15,10 @@
*/
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/default_populate.h"
using mindspore::schema::PrimitiveType_InvertPermutation;
namespace mindspore {
namespace lite {
Registry g_invertPermutationParameterRegistry(schema::PrimitiveType_InvertPermutation, DefaultPopulateParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_InvertPermutation, DefaultPopulateParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,9 +15,10 @@
*/
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/default_populate.h"
using mindspore::schema::PrimitiveType_IsFinite;
namespace mindspore {
namespace lite {
Registry g_isFiniteParameterRegistry(schema::PrimitiveType_IsFinite, DefaultPopulateParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_IsFinite, DefaultPopulateParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -16,6 +16,7 @@
#include <cstdint>
#include "src/ops/populate/populate_register.h"
#include "nnacl/l2_norm_parameter.h"
using mindspore::schema::PrimitiveType_L2NormalizeFusion;
namespace mindspore {
namespace lite {
@ -53,7 +54,6 @@ OpParameter *PopulateL2NormParameter(const void *prim) {
}
return reinterpret_cast<OpParameter *>(l2_norm_parameter);
}
Registry L2NormParameterRegistry(schema::PrimitiveType_L2NormalizeFusion, PopulateL2NormParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_L2NormalizeFusion, PopulateL2NormParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -16,6 +16,7 @@
#include "nnacl/fp32_grad/layernormgrad_parameter.h"
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_LayerNormGrad;
namespace mindspore {
namespace lite {
@ -34,7 +35,6 @@ OpParameter *PopulateLayerNormGradParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(layer_norm_grad_parameter);
}
Registry g_layerNormGradParameterRegistry(schema::PrimitiveType_LayerNormGrad, PopulateLayerNormGradParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_LayerNormGrad, PopulateLayerNormGradParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -16,6 +16,7 @@
#include "nnacl/layer_norm_parameter.h"
#include <cstdint>
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_LayerNormFusion;
namespace mindspore {
namespace lite {
OpParameter *PopulateLayerNormParameter(const void *prim) {
@ -35,6 +36,6 @@ OpParameter *PopulateLayerNormParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(layer_norm_parameter);
}
Registry g_layerNormParameterRegistry(schema::PrimitiveType_LayerNormFusion, PopulateLayerNormParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_LayerNormFusion, PopulateLayerNormParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,9 +15,10 @@
*/
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/default_populate.h"
using mindspore::schema::PrimitiveType_LinSpace;
namespace mindspore {
namespace lite {
Registry g_linSpaceParameterRegistry(schema::PrimitiveType_LinSpace, DefaultPopulateParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_LinSpace, DefaultPopulateParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/local_response_norm_fp32.h"
using mindspore::schema::PrimitiveType_LRN;
namespace mindspore {
namespace lite {
@ -37,8 +38,7 @@ OpParameter *PopulateLocalResponseNormParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(lrn_param);
}
Registry LocalResponseNormalizationParameterRegistry(schema::PrimitiveType_LRN, PopulateLocalResponseNormParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_LRN, PopulateLocalResponseNormParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "nnacl/lsh_projection_parameter.h"
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_LshProjection;
namespace mindspore {
namespace lite {
@ -34,8 +35,7 @@ OpParameter *PopulateLshProjectionParameter(const void *prim) {
lsh_project_param->lsh_type_ = value->type();
return reinterpret_cast<OpParameter *>(lsh_project_param);
}
Registry LshProjectionParameterRegistry(schema::PrimitiveType_LshProjection, PopulateLshProjectionParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_LshProjection, PopulateLshProjectionParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/lstm_fp32.h"
using mindspore::schema::PrimitiveType_LSTM;
namespace mindspore {
namespace lite {
@ -41,6 +42,6 @@ OpParameter *PopulateLstmParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(lstm_param);
}
} // namespace
Registry g_lstmParameterRegistry(schema::PrimitiveType_LSTM, PopulateLstmParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_LSTM, PopulateLstmParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/matmul_parameter.h"
using mindspore::schema::PrimitiveType_MatMul;
namespace mindspore {
namespace lite {
@ -34,7 +35,6 @@ OpParameter *PopulateMatMulParameter(const void *prim) {
matmul_param->act_type_ = ActType_No;
return reinterpret_cast<OpParameter *>(matmul_param);
}
Registry MatMulParameterRegistry(schema::PrimitiveType_MatMul, PopulateMatMulParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_MatMul, PopulateMatMulParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Merge;
namespace mindspore {
namespace lite {
@ -29,6 +30,6 @@ OpParameter *PopulateMergeParameter(const void *prim) {
merge_parameter->type_ = primitive->value_type();
return reinterpret_cast<OpParameter *>(merge_parameter);
}
Registry MergeParameterRegistry(schema::PrimitiveType_Merge, PopulateMergeParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Merge, PopulateMergeParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/infer/mfcc_infer.h"
using mindspore::schema::PrimitiveType_Mfcc;
namespace mindspore {
namespace lite {
@ -34,6 +35,6 @@ OpParameter *PopulateMfccParameter(const void *prim) {
}
} // namespace
Registry g_mfccParameterRegistry(schema::PrimitiveType_Mfcc, PopulateMfccParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Mfcc, PopulateMfccParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -16,6 +16,7 @@
#include "nnacl/arithmetic.h"
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/arithmetic_populate.h"
using mindspore::schema::PrimitiveType_MulFusion;
namespace mindspore {
namespace lite {
@ -34,6 +35,6 @@ OpParameter *PopulateMulParameter(const void *prim) {
}
} // namespace
Registry g_mulParameterRegistry(schema::PrimitiveType_MulFusion, PopulateMulParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_MulFusion, PopulateMulParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/non_max_suppression_parameter.h"
using mindspore::schema::PrimitiveType_NonMaxSuppression;
namespace mindspore {
namespace lite {
@ -32,8 +33,7 @@ OpParameter *PopulateNonMaxSuppressionParameter(const void *prim) {
param->center_point_box_ = value->center_point_box();
return reinterpret_cast<OpParameter *>(param);
}
Registry NonMaxSuppressionParameterRegistry(schema::PrimitiveType_NonMaxSuppression, PopulateNonMaxSuppressionParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_NonMaxSuppression, PopulateNonMaxSuppressionParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,9 +15,10 @@
*/
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/default_populate.h"
using mindspore::schema::PrimitiveType_NonZero;
namespace mindspore {
namespace lite {
Registry g_nonZeroParameterRegistry(schema::PrimitiveType_NonZero, DefaultPopulateParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_NonZero, DefaultPopulateParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/one_hot_fp32.h"
using mindspore::schema::PrimitiveType_OneHot;
namespace mindspore {
namespace lite {
@ -33,7 +34,6 @@ OpParameter *PopulateOneHotParameter(const void *prim) {
one_hot_param->axis_ = value->axis();
return reinterpret_cast<OpParameter *>(one_hot_param);
}
Registry OneHotParameterRegistry(schema::PrimitiveType_OneHot, PopulateOneHotParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_OneHot, PopulateOneHotParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_OnesLike;
namespace mindspore {
namespace lite {
@ -29,6 +30,6 @@ OpParameter *PopulateOnesLikeParameter(const void *prim) {
return param;
}
Registry OnesLikeParameterRegistry(schema::PrimitiveType_OnesLike, PopulateOnesLikeParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_OnesLike, PopulateOnesLikeParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/prelu_parameter.h"
using mindspore::schema::PrimitiveType_PReLUFusion;
namespace mindspore {
namespace lite {
@ -32,6 +33,6 @@ OpParameter *PopulatePReLUParameter(const void *prim) {
param->channelShared = value->channel_shared();
return reinterpret_cast<OpParameter *>(param);
}
Registry PReLUParameterRegistry(schema::PrimitiveType_PReLUFusion, PopulatePReLUParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_PReLUFusion, PopulatePReLUParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/pad_parameter.h"
using mindspore::schema::PrimitiveType_PadFusion;
namespace mindspore {
namespace lite {
@ -33,7 +34,6 @@ OpParameter *PopulatePadParameter(const void *prim) {
pad_param->constant_value_ = value->constant_value();
return reinterpret_cast<OpParameter *>(pad_param);
}
Registry PadParameterRegistry(schema::PrimitiveType_PadFusion, PopulatePadParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_PadFusion, PopulatePadParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_PartialFusion;
namespace mindspore {
namespace lite {
@ -36,6 +37,6 @@ OpParameter *PopulatePartialParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(partial_parameter);
}
Registry PartialParameterRegistry(schema::PrimitiveType_PartialFusion, PopulatePartialParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_PartialFusion, PopulatePartialParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,8 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/pooling_parameter.h"
using mindspore::schema::PrimitiveType_AvgPoolFusion;
using mindspore::schema::PrimitiveType_MaxPoolFusion;
namespace mindspore {
namespace lite {
@ -140,7 +142,7 @@ OpParameter *PopulateMaxPoolParameter(const void *primitive) {
}
} // namespace
Registry g_avgPoolParameterRegistry(schema::PrimitiveType_AvgPoolFusion, PopulateAvgPoolParameter, SCHEMA_CUR);
Registry g_maxPoolParameterRegistry(schema::PrimitiveType_MaxPoolFusion, PopulateMaxPoolParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_AvgPoolFusion, PopulateAvgPoolParameter, SCHEMA_CUR)
REG_POPULATE(PrimitiveType_MaxPoolFusion, PopulateMaxPoolParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/power_parameter.h"
using mindspore::schema::PrimitiveType_PowFusion;
namespace mindspore {
namespace lite {
@ -35,6 +36,6 @@ OpParameter *PopulatePowerParameter(const void *prim) {
}
} // namespace
Registry g_powerParameterRegistry(schema::PrimitiveType_PowFusion, PopulatePowerParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_PowFusion, PopulatePowerParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/prior_box_parameter.h"
using mindspore::schema::PrimitiveType_PriorBox;
namespace mindspore {
namespace lite {
@ -69,7 +70,6 @@ OpParameter *PopulatePriorBoxParameter(const void *prim) {
prior_box_param->step_w = value->step_w();
return reinterpret_cast<OpParameter *>(prior_box_param);
}
Registry PriorBoxParameterRegistry(schema::PrimitiveType_PriorBox, PopulatePriorBoxParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_PriorBox, PopulatePriorBoxParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/int8/quant_dtype_cast_int8.h"
using mindspore::schema::PrimitiveType_QuantDTypeCast;
namespace mindspore {
namespace lite {
@ -34,8 +35,7 @@ OpParameter *PopulateQuantDTypeCastParameter(const void *prim) {
parameter->dstT = value->dst_t();
return reinterpret_cast<OpParameter *>(parameter);
}
Registry QuantDTypeCastParameterRegistry(schema::PrimitiveType_QuantDTypeCast, PopulateQuantDTypeCastParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_QuantDTypeCast, PopulateQuantDTypeCastParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -16,6 +16,7 @@
#include "src/ops/populate/populate_register.h"
#include "nnacl/random_parameter.h"
using mindspore::schema::PrimitiveType_RandomStandardNormal;
namespace mindspore {
namespace lite {
@ -35,7 +36,6 @@ OpParameter *PopulateRandomStandardNormalParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(random_parameter);
}
} // namespace
Registry g_randomStandardNormalParameterRegistry(schema::PrimitiveType_RandomStandardNormal,
PopulateRandomStandardNormalParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_RandomStandardNormal, PopulateRandomStandardNormalParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/range_fp32.h"
using mindspore::schema::PrimitiveType_Range;
namespace mindspore {
namespace lite {
@ -36,7 +37,6 @@ OpParameter *PopulateRangeParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(range_param);
}
} // namespace
Registry g_rangeParameterRegistry(schema::PrimitiveType_Range, PopulateRangeParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Range, PopulateRangeParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_Rank;
namespace mindspore {
namespace lite {
@ -31,6 +32,6 @@ OpParameter *PopulateRankParameter(const void *prim) {
}
} // namespace
Registry g_rankParameterRegistry(schema::PrimitiveType_Rank, PopulateRankParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Rank, PopulateRankParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/reshape_parameter.h"
using mindspore::schema::PrimitiveType_Reshape;
namespace mindspore {
namespace lite {
@ -32,6 +33,6 @@ OpParameter *PopulateReshapeParameter(const void *prim) {
}
} // namespace
Registry g_reshapeParameterRegistry(schema::PrimitiveType_Reshape, PopulateReshapeParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Reshape, PopulateReshapeParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/resize_parameter.h"
using mindspore::schema::PrimitiveType_Resize;
namespace mindspore {
namespace lite {
@ -39,7 +40,7 @@ OpParameter *PopulateResizeParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(resize_param);
}
Registry ResizeParameterRegistry(schema::PrimitiveType_Resize, PopulateResizeParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Resize, PopulateResizeParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/reverse_fp32.h"
using mindspore::schema::PrimitiveType_ReverseV2;
namespace mindspore {
namespace lite {
@ -39,7 +40,6 @@ OpParameter *PopulateReverseParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(reverse_param);
}
Registry ReverseParameterRegistry(schema::PrimitiveType_ReverseV2, PopulateReverseParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_ReverseV2, PopulateReverseParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/reverse_sequence_parameter.h"
using mindspore::schema::PrimitiveType_ReverseSequence;
namespace mindspore {
namespace lite {
@ -36,8 +37,7 @@ OpParameter *PopulateReverseSequenceParameter(const void *prim) {
}
} // namespace
Registry ReverseSequenceParameterRegistry(schema::PrimitiveType_ReverseSequence, PopulateReverseSequenceParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_ReverseSequence, PopulateReverseSequenceParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/roi_pooling_fp32.h"
using mindspore::schema::PrimitiveType_ROIPooling;
namespace mindspore {
namespace lite {
@ -37,6 +38,6 @@ OpParameter *PopulateROIPoolingParameter(const void *prim) {
}
} // namespace
Registry g_ROIPoolingParameterRegistry(schema::PrimitiveType_ROIPooling, PopulateROIPoolingParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_ROIPooling, PopulateROIPoolingParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/scale.h"
using mindspore::schema::PrimitiveType_ScaleFusion;
namespace mindspore {
namespace lite {
@ -35,6 +36,6 @@ OpParameter *PopulateScaleParameter(const void *prim) {
}
} // namespace
Registry g_scaleParameterRegistry(schema::PrimitiveType_ScaleFusion, PopulateScaleParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_ScaleFusion, PopulateScaleParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "src/ops/populate/populate_register.h"
using mindspore::schema::PrimitiveType_ScatterNd;
namespace mindspore {
namespace lite {
@ -30,7 +31,6 @@ OpParameter *PopulateScatterNDParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(scatter_nd_param);
}
} // namespace
Registry g_scatterNDParameterRegistry(schema::PrimitiveType_ScatterNd, PopulateScatterNDParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_ScatterNd, PopulateScatterNDParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,9 +15,10 @@
*/
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/default_populate.h"
using mindspore::schema::PrimitiveType_Select;
namespace mindspore {
namespace lite {
Registry g_selectParameterRegistry(schema::PrimitiveType_Select, DefaultPopulateParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Select, DefaultPopulateParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -16,6 +16,7 @@
#include "src/ops/populate/populate_register.h"
#include "src/common/log_adapter.h"
#include "src/tensor.h"
using mindspore::schema::PrimitiveType_Shape;
namespace mindspore {
namespace lite {
@ -33,6 +34,6 @@ OpParameter *PopulateShapeParameter(const void *prim) {
}
} // namespace
Registry g_shapeParameterRegistry(schema::PrimitiveType_Shape, PopulateShapeParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Shape, PopulateShapeParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,9 +15,10 @@
*/
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/default_populate.h"
using mindspore::schema::PrimitiveType_Size;
namespace mindspore {
namespace lite {
Registry g_sizeParameterRegistry(schema::PrimitiveType_Size, DefaultPopulateParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Size, DefaultPopulateParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/skip_gram_parameter.h"
using mindspore::schema::PrimitiveType_SkipGram;
namespace mindspore {
namespace lite {
@ -34,7 +35,6 @@ OpParameter *PopulateSkipGramParameter(const void *prim) {
skipGramParameter->include_all_ngrams = value->include_all_grams();
return reinterpret_cast<OpParameter *>(skipGramParameter);
}
Registry SkipGramParameterRegistry(schema::PrimitiveType_SkipGram, PopulateSkipGramParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_SkipGram, PopulateSkipGramParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/slice_parameter.h"
using mindspore::schema::PrimitiveType_SliceFusion;
namespace mindspore {
namespace lite {
@ -34,7 +35,6 @@ OpParameter *PopulateSliceParameter(const void *prim) {
}
return reinterpret_cast<OpParameter *>(slice_param);
}
Registry SliceParameterRegistry(schema::PrimitiveType_SliceFusion, PopulateSliceParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_SliceFusion, PopulateSliceParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/softmax_parameter.h"
using mindspore::schema::PrimitiveType_Softmax;
namespace mindspore {
namespace lite {
@ -39,6 +40,6 @@ OpParameter *PopulateSoftmaxParameter(const void *prim) {
}
} // namespace
Registry g_softmaxParameterRegistry(schema::PrimitiveType_Softmax, PopulateSoftmaxParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Softmax, PopulateSoftmaxParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/space_to_batch_fp32.h"
using mindspore::schema::PrimitiveType_SpaceToBatchND;
namespace mindspore {
namespace lite {
@ -67,6 +68,6 @@ OpParameter *PopulateSpaceToBatchNDParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(space_batch_param_nd);
}
} // namespace
Registry g_spaceToBatchNDRegistry(schema::PrimitiveType_SpaceToBatchND, PopulateSpaceToBatchNDParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_SpaceToBatchND, PopulateSpaceToBatchNDParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32/space_to_batch_fp32.h"
using mindspore::schema::PrimitiveType_SpaceToBatch;
namespace mindspore {
namespace lite {
@ -63,6 +64,6 @@ OpParameter *PopulateSpaceToBatchParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(space_batch_param);
}
} // namespace
Registry g_spaceToBatchRegistry(schema::PrimitiveType_SpaceToBatch, PopulateSpaceToBatchParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_SpaceToBatch, PopulateSpaceToBatchParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/space_to_depth_parameter.h"
using mindspore::schema::PrimitiveType_SpaceToDepth;
namespace mindspore {
namespace lite {
@ -37,6 +38,6 @@ OpParameter *PopulateSpaceToDepthParameter(const void *prim) {
}
return reinterpret_cast<OpParameter *>(space_depth_param);
}
Registry SpaceToDepthParameterRegistry(schema::PrimitiveType_SpaceToDepth, PopulateSpaceToDepthParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_SpaceToDepth, PopulateSpaceToDepthParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/fp32_grad/softmax_grad.h"
using mindspore::schema::PrimitiveType_SparseSoftmaxCrossEntropyWithLogits;
namespace mindspore {
namespace lite {
@ -30,8 +31,7 @@ OpParameter *PopulateSparseSoftmaxCrossEntropyWithLogitsParameter(const void *pr
softmax_cross_entropy_param_->op_parameter_.type_ = primitive->value_type();
return reinterpret_cast<OpParameter *>(softmax_cross_entropy_param_);
}
Registry SparseSoftmaxCrossEntropyWithLogitsParameterRegistry(schema::PrimitiveType_SparseSoftmaxCrossEntropyWithLogits,
PopulateSparseSoftmaxCrossEntropyWithLogitsParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_SparseSoftmaxCrossEntropyWithLogits, PopulateSparseSoftmaxCrossEntropyWithLogitsParameter,
SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/sparse_to_dense_parameter.h"
using mindspore::schema::PrimitiveType_SparseToDense;
namespace mindspore {
namespace lite {
@ -32,7 +33,6 @@ OpParameter *PopulateSparseToDenseParameter(const void *prim) {
}
} // namespace
Registry g_sparseToDenseParameterRegistry(schema::PrimitiveType_SparseToDense, PopulateSparseToDenseParameter,
SCHEMA_CUR);
REG_POPULATE(PrimitiveType_SparseToDense, PopulateSparseToDenseParameter, SCHEMA_CUR);
} // namespace lite
} // namespace mindspore

View File

@ -16,6 +16,7 @@
#include "src/ops/populate/populate_register.h"
#include "nnacl/op_base.h"
#include "nnacl/splice_parameter.h"
using mindspore::schema::PrimitiveType_Splice;
namespace mindspore {
namespace lite {
OpParameter *PopulateSpliceParameter(const void *prim) {
@ -67,6 +68,6 @@ OpParameter *PopulateSpliceParameter(const void *prim) {
splice_parameter->output_dim_ = splice_primitive->output_dim();
return reinterpret_cast<OpParameter *>(splice_parameter);
}
Registry g_SpliceParameterRegistry(schema::PrimitiveType_Splice, PopulateSpliceParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Splice, PopulateSpliceParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

View File

@ -15,6 +15,7 @@
*/
#include "src/ops/populate/populate_register.h"
#include "nnacl/split_parameter.h"
using mindspore::schema::PrimitiveType_Split;
namespace mindspore {
namespace lite {
@ -59,6 +60,6 @@ OpParameter *PopulateSplitParameter(const void *prim) {
return reinterpret_cast<OpParameter *>(split_param);
}
} // namespace
Registry g_splitParameterRegistry(schema::PrimitiveType_Split, PopulateSplitParameter, SCHEMA_CUR);
REG_POPULATE(PrimitiveType_Split, PopulateSplitParameter, SCHEMA_CUR)
} // namespace lite
} // namespace mindspore

Some files were not shown because too many files have changed in this diff Show More