code check edit

This commit is contained in:
xuanyue 2021-08-17 16:34:30 +08:00
parent debf4d8ece
commit 69506ad00c
6 changed files with 8 additions and 5 deletions

View File

@ -16,7 +16,7 @@
#include "nnacl/int8/power_int8.h"
int PowerInt8(const int8_t *input, const int8_t *exp_ptr, int8_t *output, int count, PowerParameter *param) {
int PowerInt8(const int8_t *input, const int8_t *exp_ptr, int8_t *output, int count, const PowerParameter *param) {
double input_scale = param->quant_arg_.in_args_.scale_;
int input_zp = param->quant_arg_.in_args_.zp_;
double output_scale = param->quant_arg_.out_args_.scale_;

View File

@ -24,7 +24,8 @@
#ifdef __cplusplus
extern "C" {
#endif
int PowerInt8(const int8_t *input_ptr, const int8_t *exp_ptr, int8_t *output_ptr, int count, PowerParameter *parameter);
int PowerInt8(const int8_t *input_ptr, const int8_t *exp_ptr, int8_t *output_ptr, int count,
const PowerParameter *parameter);
#ifdef __cplusplus
}
#endif

View File

@ -17,7 +17,7 @@
#include "nnacl/int8/unsqueeze_int8.h"
#include "nnacl/unsqueeze_parameter.h"
int Int8Unsqueeze(const int8_t *input_ptr, int8_t *output_ptr, UnSqueezeParameter *para_, size_t data_size,
int Int8Unsqueeze(const int8_t *input_ptr, int8_t *output_ptr, const UnSqueezeParameter *para_, size_t data_size,
int task_id) {
float output_scale = para_->quant_arg.out_quant_args_.scale_;
int8_t output_zp = para_->quant_arg.out_quant_args_.zp_;

View File

@ -24,7 +24,7 @@
#ifdef __cplusplus
extern "C" {
#endif
int Int8Unsqueeze(const int8_t *input_ptr, int8_t *output_ptr, UnSqueezeParameter *para_, size_t data_size,
int Int8Unsqueeze(const int8_t *input_ptr, int8_t *output_ptr, const UnSqueezeParameter *para_, size_t data_size,
int task_id);
#ifdef __cplusplus
}

View File

@ -33,6 +33,8 @@ class CustomAddKernel : public Kernel {
CustomAddKernel(const std::vector<MSTensor> &inputs, const std::vector<MSTensor> &outputs,
const schema::Primitive *primitive, const mindspore::Context *ctx)
: Kernel(inputs, outputs, primitive, ctx) {}
~CustomAddKernel() = default;
// Prepare will be called during graph compilation
int Prepare() override { return lite::RET_OK; }

View File

@ -41,7 +41,7 @@ CNodePtr GeLUFusion::CreateGeLUNode(const FuncGraphPtr &func_graph, const AnfNod
const float GeLUFusion::GetParameterValue(const EquivPtr &equiv, const VarPtr &input) const {
MS_ASSERT(equiv != nullptr);
MS_ASSERT(input != nullptr);
float value = -1;
const float value = -1;
auto node = utils::cast<AnfNodePtr>((*equiv)[input]);
if (node == nullptr || !utils::isa<ParameterPtr>(node)) {
return value;