!4654 ReviewBotCheck

Merge pull request !4654 from gongdaguo/ReviewBotCheck
pull/4654/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit 250ebbc96c

@ -122,7 +122,6 @@ int DeConv2D::InferShape(std::vector<lite::tensor::Tensor *> inputs_, std::vecto
pad_d_ = GetPadDown();
pad_r_ = GetPadRight();
auto pad_mode = (schema::PadMode)GetPadMode();
if (pad_mode == schema::PadMode_CAFFE) {
output_h = (input_h - 1) * stride_h + ((kernel_h - 1) * dilate_h + 1) - pad_u_ - pad_d_;
output_w = (input_w - 1) * stride_w + ((kernel_w - 1) * dilate_w + 1) - pad_l_ - pad_r_;

@ -58,5 +58,4 @@ int ScatterND::InferShape(std::vector<lite::tensor::Tensor *> inputs_, std::vect
return 0;
}
} // namespace mindspore

@ -20,7 +20,6 @@ namespace mindspore {
namespace {
constexpr int kShapeInputNum = 1;
constexpr int kShapeOutputNum = 1;
} // namespace
int Shape::InferShape(std::vector<lite::tensor::Tensor *> inputs_, std::vector<lite::tensor::Tensor *> outputs_) {
if (inputs_.size() != kShapeInputNum) {

@ -161,6 +161,5 @@ void CompareOutput(float *output_data, std::string file_path) {
// }
// return "/data/data/" + packageName + '/';
//}
} // namespace lite
} // namespace mindspore

@ -22,7 +22,6 @@
namespace mindspore {
namespace lite {
int CompareRelativeOutput(float *output_data, std::string file_path);
}
} // namespace mindspore
#endif // MINDSPORE_LITE_COMMON_FILE_UTILS_EXT_H_

@ -75,7 +75,6 @@ std::vector<size_t> GetGraphOutputNodes(const schema::MetaGraph *meta_graph) {
// std::unordered_set<NODE_ID> OpNode::GetAllInEdges() { return inEdges; }
//
// std::unordered_set<NODE_ID> OpNode::GetAllOutEdges() { return outEdges; }
} // namespace lite
} // namespace mindspore

@ -82,7 +82,6 @@ int OpGraph<NODE_T>::Build(const schema::MetaGraph *subGraphDef) {
return RET_ERROR;
}
auto opDefs = subGraphDef->nodes();
uint32_t opCount = opDefs->size();
@ -104,7 +103,7 @@ int OpGraph<NODE_T>::Build(const schema::MetaGraph *subGraphDef) {
}
template <typename NODE_T>
int OpGraph<NODE_T>::AddEdge(const schema::CNode *srcNodeDef,
const flatbuffers::Vector<flatbuffers::Offset<schema::CNode>> *nodeDefs) {
const flatbuffers::Vector<flatbuffers::Offset<schema::CNode>> *nodeDefs) {
MS_ASSERT(srcNodeDef != nullptr);
MS_ASSERT(nodeDefs != nullptr);
NODE_ID srcId = std::string(srcNodeDef->name()->c_str());
@ -242,7 +241,6 @@ OpGraph<NODE_T>::~OpGraph() {
}
nodes.clear();
}
} // namespace lite
} // namespace mindspore

@ -146,6 +146,5 @@ std::vector<AnfNodePtr> DeepUsedGraphSearch(const AnfNodePtr &root, const Includ
std::vector<AnfNodePtr> DeepLinkedGraphSearch(const AnfNodePtr &root, const IncludeFunc &include) {
return DeepLinkedGraphSearcher(include).Search(root);
}
} // namespace mindspore

@ -118,7 +118,7 @@ if (IsPrint(log_level_)) {
// #ifdef USE_ANDROID_LOG
#ifdef ENABLE_ARM
__android_log_print(GetAndroidLogLevel(log_level_), ANDROID_LOG_TAG, "[%s:%d] %s] %s", location_.file_,
location_.line_, location_.func_, msg.str().c_str());
location_.line_, location_.func_, msg.str().c_str());
#else
printf("%s [%s:%d] %s] %s\n:", EnumStrForMsLogLevel(log_level_), location_.file_, location_.line_, location_.func_,
msg.str().c_str());

@ -29,7 +29,6 @@
namespace mindspore {
namespace lite {
namespace tensor {
struct QuantArg {
double scale;
int32_t zeroPoint;

@ -362,5 +362,4 @@ session::LiteSession *session::LiteSession::CreateSession(lite::Context *context
}
return session;
}
} // namespace mindspore

@ -33,7 +33,4 @@ void MatrixMultiplyFp16(const float16_t *matrix_a, const float16_t *matrix_b, fl
}
}
}
} // namespace mindspore::kernel

@ -20,7 +20,7 @@
#include "nnacl/errorcode.h"
int DoSplitFp16(float16_t *in_data, float16_t **out_data, const int *input_shape, int offset, int num_unit,
SplitParameter *split_param) {
SplitParameter *split_param) {
if (in_data == NULL || out_data == NULL) {
return NNACL_ERR;
}

@ -25,7 +25,7 @@
extern "C" {
#endif
int DoSplitFp16(float16_t *in_data, float16_t **out_data, const int *input_shape, int offset, int num_unit,
SplitParameter *split_param);
SplitParameter *split_param);
#ifdef __cplusplus
}
#endif

@ -36,7 +36,7 @@ int32x4_t ClacScaledInput(int32x4_t input, int32x4_t left_shift_result_vec, int3
}
int16x4_t AddClacSumHalfWord(int32x4_t scaled_input0, int32x4_t scaled_input1, int32x4_t left_shift_out_vec,
int32x4_t output_multiplier_vec, AddQuantParameter *para) {
int32x4_t output_multiplier_vec, AddQuantParameter *para) {
int32x4_t raw_sum = vaddq_s32(scaled_input0, scaled_input1);
raw_sum = RoundingDivideByPOTInt32x4(vqrdmulhq_s32(vmulq_s32(raw_sum, left_shift_out_vec), output_multiplier_vec),

@ -25,7 +25,7 @@
#ifdef ENABLE_NEON
int16x4_t ClacSumHalfWordMul(int32x4_t scaled_input0, int32x4_t scaled_input1, int32x4_t left_shift_out_vec,
int32x4_t output_multiplier_vec, MulQuantArg para) {
int32x4_t output_multiplier_vec, MulQuantArg para) {
int32x4_t input_scale = vmulq_s32(scaled_input0, scaled_input1);
int32x4_t raw_sum = RoundingDivideByPOTInt32x4(
SaturatingRoundingDoublingHighMulInt32x4(vmulq_s32(input_scale, left_shift_out_vec), output_multiplier_vec),

@ -19,7 +19,7 @@
#include "nnacl/errorcode.h"
int PadConstant4D(const int8_t *in_data, int8_t *out_data, const int32_t *in_dims, const int32_t *out_dims,
const int32_t *paddings, const int tid, const int thread_num) {
const int32_t *paddings, const int tid, const int thread_num) {
int32_t copy_size = in_dims[3];
for (int n = 0; n < in_dims[0]; n++) {
for (int h = tid; h < in_dims[1]; h += thread_num) {

@ -25,7 +25,7 @@
extern "C" {
#endif
int PadConstant4D(const int8_t *in_data, int8_t *out_data, const int32_t *in_dims, const int32_t *out_dims,
const int32_t *paddings, const int tid, const int thread_num);
const int32_t *paddings, const int tid, const int thread_num);
#ifdef __cplusplus
}
#endif

@ -99,9 +99,9 @@ int SliceInt8(const int8_t *input, int8_t *output, SliceParameter *param) {
multiplier = input_scale / output_scale;
}
for (n = 0; n< param->size_[0]; ++n) {
for (n = 0; n < param->size_[0]; ++n) {
size_t out_offset0 = n * out_stride0;
size_t in_offset0 = (n+ param->begin_[0]) * in_stride0 + param->begin_[3];
size_t in_offset0 = (n + param->begin_[0]) * in_stride0 + param->begin_[3];
for (h = 0; h < count_per_thread; ++h) {
size_t k = h + thread_stride;
if (k >= out_dim1) {

@ -22,8 +22,8 @@
#ifdef __cplusplus
extern "C" {
#endif
int SliceInt8NoParallel(const int8_t*input, int8_t *output, SliceParameter *param);
int SliceInt8(const int8_t*input, int8_t *output, SliceParameter *param);
int SliceInt8NoParallel(const int8_t *input, int8_t *output, SliceParameter *param);
int SliceInt8(const int8_t *input, int8_t *output, SliceParameter *param);
#ifdef __cplusplus
}
#endif

@ -24,7 +24,7 @@
#ifdef ENABLE_NEON
int16x4_t DoClacSumHalfWord(int32x4_t scaled_input0, int32x4_t scaled_input1, int32x4_t left_shift_out_vec,
int32x4_t output_multiplier_vec, SubQuantArg *para) {
int32x4_t output_multiplier_vec, SubQuantArg *para) {
int32x4_t raw_data = vsubq_s32(scaled_input0, scaled_input1);
raw_data = RoundingDivideByPOTInt32x4(vqrdmulhq_s32(vmulq_s32(raw_data, left_shift_out_vec), output_multiplier_vec),

@ -28,7 +28,7 @@ const int iMantissaBits = 31;
void QuantizeMultiplierSmallerThanOne(double double_multiplier, int32_t *quantized_multiplier,
int *right_shift) {
int *right_shift) {
if (quantized_multiplier == NULL || right_shift == NULL) {
return;
}
@ -38,7 +38,7 @@ void QuantizeMultiplierSmallerThanOne(double double_multiplier, int32_t *quantiz
}
void QuantizeRoundParameter(double double_multiplier, int32_t *quantized_multiplier, int *left_shift,
int *right_shift) {
int *right_shift) {
int shift;
QuantizeMultiplierSmallerThanOne(double_multiplier, quantized_multiplier, &shift);
shift = -shift;
@ -56,7 +56,7 @@ uint8_t QuantizeToUint8(float real_value, float scale, int32_t zp) { return roun
int32_t QuantizeToInt8(float real_value, float scale, int32_t zp) { return round(real_value / scale + zp); }
void CalculateActivationRangeQuantized(bool is_relu, bool is_relu6, int32_t zp, float scale, int *mini,
int *maxi) {
int *maxi) {
int32_t min = CHAR_MIN;
int32_t max = CHAR_MAX;
int32_t quantized_zero = QuantizeToInt8(0, scale, zp);

@ -1364,7 +1364,6 @@ void Conv3x3Uint8OutputUnit(const int32_t *gemm_out, const int32_t *bias_data, i
}
}
}
} else {
for (int i = 0; i < C4NUM; i++) {
const int32_t *local_ptr = gemm_out + i;

@ -21,7 +21,6 @@
namespace mindspore {
namespace kernel {
/**
* MindSpore to OpenCL channel order.
* @param num_channels

@ -37,7 +37,6 @@ kernel::LiteKernel *GetOpenCLKernel(const std::vector<tensor::Tensor *> &in_tens
namespace mindspore {
namespace kernel {
std::vector<size_t> GetCommonGlobalSize(const std::vector<size_t> &local, const std::vector<size_t> &global) {
std::vector<size_t> result(3, 1);
for (int i = 0; i < 3; ++i) {

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

Loading…
Cancel
Save