Browse Source

!3847 modify populate op parameter

Merge pull request !3847 from yangruoqi713/lite
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
ecb8738524
4 changed files with 654 additions and 631 deletions
  1. +638
    -628
      mindspore/lite/src/populate_parameter.cc
  2. +14
    -1
      mindspore/lite/src/populate_parameter.h
  3. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/opclib/arithmetic_common.h
  4. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/opclib/fp32/softmax.h

+ 638
- 628
mindspore/lite/src/populate_parameter.cc
File diff suppressed because it is too large
View File


+ 14
- 1
mindspore/lite/src/populate_parameter.h View File

@@ -22,7 +22,20 @@
#include "src/runtime/kernel/arm/opclib/op_base.h" #include "src/runtime/kernel/arm/opclib/op_base.h"


namespace mindspore::kernel { namespace mindspore::kernel {
typedef OpParameter *(*PopulateParameterFunc)(const lite::Primitive *);

class PopulateParameterRegistry {
public:
PopulateParameterRegistry();
~PopulateParameterRegistry() = default;

static PopulateParameterRegistry *GetInstance();
PopulateParameterFunc GetParameterFunc(const schema::PrimitiveType &type);

protected:
PopulateParameterFunc populate_parameter_funcs_[schema::PrimitiveType_MAX + 1];
};

OpParameter *PopulateParameter(const lite::Primitive *primitive); OpParameter *PopulateParameter(const lite::Primitive *primitive);
} // namespace mindspore::kernel } // namespace mindspore::kernel
#endif // MINDSPORE_LITE_SRC_POPULATE_PARAMETER_H_ #endif // MINDSPORE_LITE_SRC_POPULATE_PARAMETER_H_


+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/opclib/arithmetic_common.h View File

@@ -24,7 +24,7 @@
#include "src/runtime/kernel/arm/opclib/arithmetic_common.h" #include "src/runtime/kernel/arm/opclib/arithmetic_common.h"


struct ArithmeticParameter { struct ArithmeticParameter {
OpParameter op_parameter;
OpParameter op_parameter_;
bool broadcasting_; bool broadcasting_;
size_t ndim_; size_t ndim_;
int in_shape0_[5]; int in_shape0_[5];


+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/opclib/fp32/softmax.h View File

@@ -20,7 +20,7 @@
#include "src/runtime/kernel/arm/opclib/op_base.h" #include "src/runtime/kernel/arm/opclib/op_base.h"


struct SoftmaxParameter { struct SoftmaxParameter {
OpParameter op_parameter;
OpParameter op_parameter_;
int32_t axis_; int32_t axis_;
int element_size_; int element_size_;
int n_dim_; int n_dim_;


Loading…
Cancel
Save