Browse Source

!15120 modify codeDEX_C for master

From: @Somnus2020
Reviewed-by: @kingxian,@zh_qh
Signed-off-by: @kingxian,@zh_qh
pull/15120/MERGE
mindspore-ci-bot Gitee 5 years ago
parent
commit
aeded3fb74
38 changed files with 15 additions and 31 deletions
  1. +0
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/transformer.cc
  2. +0
    -1
      mindspore/core/abstract/prim_arrays.cc
  3. +0
    -1
      mindspore/core/ir/value.cc
  4. +2
    -2
      mindspore/core/ops/audio_spectrogram.cc
  5. +0
    -1
      mindspore/core/ops/batch_norm_fold.cc
  6. +0
    -1
      mindspore/core/ops/broadcast_to.h
  7. +0
    -1
      mindspore/core/ops/ceil.cc
  8. +0
    -1
      mindspore/core/ops/concat.cc
  9. +1
    -0
      mindspore/core/ops/fusion/adder_fusion.h
  10. +0
    -1
      mindspore/core/ops/fusion/avg_pool_fusion.cc
  11. +1
    -0
      mindspore/core/ops/fusion/conv2d_backprop_input_fusion.h
  12. +1
    -0
      mindspore/core/ops/fusion/conv2d_fusion.h
  13. +1
    -0
      mindspore/core/ops/fusion/div_fusion.h
  14. +1
    -0
      mindspore/core/ops/fusion/l2_normalize_fusion.h
  15. +0
    -1
      mindspore/core/ops/fusion/reduce_fusion.cc
  16. +1
    -0
      mindspore/core/ops/fusion/scale_fusion.h
  17. +1
    -0
      mindspore/core/ops/fusion/sub_fusion.h
  18. +1
    -0
      mindspore/core/ops/fusion/tile_fusion.h
  19. +1
    -0
      mindspore/core/ops/fusion/topk_fusion.h
  20. +0
    -1
      mindspore/core/ops/grad/activation_grad.cc
  21. +0
    -1
      mindspore/core/ops/grad/avg_pool_grad.h
  22. +0
    -1
      mindspore/core/ops/grad/power_grad.cc
  23. +0
    -1
      mindspore/core/ops/hashtable_lookup.cc
  24. +2
    -2
      mindspore/core/ops/lstm.cc
  25. +0
    -1
      mindspore/core/ops/merge.cc
  26. +0
    -1
      mindspore/core/ops/non_max_suppression.cc
  27. +0
    -1
      mindspore/core/ops/permute.cc
  28. +0
    -1
      mindspore/core/ops/primitive_c.cc
  29. +0
    -1
      mindspore/core/ops/proposal.h
  30. +1
    -1
      mindspore/core/ops/range.cc
  31. +0
    -1
      mindspore/core/ops/reduce.cc
  32. +0
    -1
      mindspore/core/ops/reduce_all.cc
  33. +0
    -1
      mindspore/core/ops/resize_bilinear.cc
  34. +0
    -1
      mindspore/core/ops/softmax_cross_entropy_with_logits.cc
  35. +1
    -1
      mindspore/core/ops/space_to_batch_nd.cc
  36. +0
    -1
      mindspore/core/ops/to_format.cc
  37. +0
    -1
      mindspore/core/ops/unpack.cc
  38. +0
    -1
      mindspore/core/ops/where.cc

+ 0
- 1
mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/transformer.cc View File

@@ -109,7 +109,6 @@ Hamiltonians HamiltoniansTransfor(const PaulisCoeffsType &paulis_coeffs, const P
}
return hams;
}

} // namespace transformer
} // namespace mindquantum
} // namespace mindspore

+ 0
- 1
mindspore/core/abstract/prim_arrays.cc View File

@@ -1056,7 +1056,6 @@ AbstractBasePtr InferImplRange(const AnalysisEnginePtr &, const PrimitivePtr &pr
TypePtr range_start_type = CheckTensorDType(range_start, supported_types, "range_start input of Range should be %s");
TypePtr range_end_type = CheckTensorDType(range_end, supported_types, "range_start input of Range should be %s");
TypePtr range_delta_type = CheckTensorDType(range_delta, supported_types, "range_start input of Range should be %s");

// check all 3 inputs are same type
if (!IsIdentidityOrSubclass(range_start_type, range_end_type) ||
!IsIdentidityOrSubclass(range_end_type, range_delta_type)) {


+ 0
- 1
mindspore/core/ir/value.cc View File

@@ -309,5 +309,4 @@ const ValuePtr kUMonad = std::make_shared<UMonad>();

bool IOMonad::operator==(const Value &other) const { return other.isa<IOMonad>(); }
const ValuePtr kIOMonad = std::make_shared<IOMonad>();

} // namespace mindspore

+ 2
- 2
mindspore/core/ops/audio_spectrogram.cc View File

@@ -94,12 +94,12 @@ int64_t AudioSpectrogram::Log2Ceil(int64_t length) {
floor += shift;
}
}
return length == (length & ~(length - 1)) ? floor : floor + 1;
return length == (length & ~(unsigned int)(length - 1)) ? floor : floor + 1;
}

int64_t AudioSpectrogram::GetFftLength(int64_t length) {
int64_t shift = Log2Ceil(length);
return 1 << shift;
return 1 << (unsigned int)shift;
}

void AudioSpectrogram::set_mag_square(const bool mag_square) { this->AddAttr(kMagSquare, MakeValue(mag_square)); }


+ 0
- 1
mindspore/core/ops/batch_norm_fold.cc View File

@@ -22,7 +22,6 @@

namespace mindspore {
namespace ops {

void BatchNormFold::Init(const float momentum, const float epsilon, const bool is_training, const int64_t freeze_bn) {
set_momentum(momentum);
set_epsilon(epsilon);


+ 0
- 1
mindspore/core/ops/broadcast_to.h View File

@@ -41,7 +41,6 @@ class BroadcastTo : public PrimitiveC {
AbstractBasePtr BroadcastToInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
const std::vector<AbstractBasePtr> &input_args);
using PrimBroadcastToPtr = std::shared_ptr<BroadcastTo>;

} // namespace ops
} // namespace mindspore



+ 0
- 1
mindspore/core/ops/ceil.cc View File

@@ -26,7 +26,6 @@

namespace mindspore {
namespace ops {

AbstractBasePtr CeilInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
const std::vector<AbstractBasePtr> &input_args) {
for (const auto &item : input_args) {


+ 0
- 1
mindspore/core/ops/concat.cc View File

@@ -21,7 +21,6 @@
#include "utils/check_convert_utils.h"
namespace mindspore {
namespace ops {

void Concat::Init(const int64_t axis) { this->set_axis(axis); }
int64_t Concat::get_axis() const {
auto value_ptr = this->GetAttr(kAxis);


+ 1
- 0
mindspore/core/ops/fusion/adder_fusion.h View File

@@ -31,6 +31,7 @@ constexpr auto kNameAdderFusion = "AdderFusion";
class AdderFusion : public Adder {
public:
AdderFusion() : Adder(kNameAdderFusion) {}
~AdderFusion() = default;
MS_DECLARE_PARENT(AdderFusion, Adder);
void Init(const int64_t in_channel, const int64_t out_channel, const std::vector<int64_t> &kernel_size,
const PadMode &pad_mode, const std::vector<int64_t> &stride, const std::vector<int64_t> &pad_list,


+ 0
- 1
mindspore/core/ops/fusion/avg_pool_fusion.cc View File

@@ -18,7 +18,6 @@

namespace mindspore {
namespace ops {

void AvgPoolFusion::Init(const std::vector<int64_t> &kernel_size, const std::vector<int64_t> &stride,
const PadMode &pad_mode, const Format &format, const std::vector<int64_t> &pad,
const RoundMode &round_mode, const bool global, const ActivationType activation_type) {


+ 1
- 0
mindspore/core/ops/fusion/conv2d_backprop_input_fusion.h View File

@@ -27,6 +27,7 @@ constexpr auto kNameConv2DBackpropInputFusion = "Conv2DBackpropInputFusion";
class Conv2DBackpropInputFusion : public Conv2DBackpropInput {
public:
Conv2DBackpropInputFusion() : Conv2DBackpropInput(kNameConv2DBackpropInputFusion) {}
~Conv2DBackpropInputFusion() = default;
MS_DECLARE_PARENT(Conv2DBackpropInputFusion, Conv2DBackpropInput);
void Init(int64_t in_channel, int64_t out_channel, const std::vector<int64_t> &kernel_size, int64_t mode = 1,
const PadMode &pad_mode = VALID, const std::vector<int64_t> &pad = {0, 0, 0, 0},


+ 1
- 0
mindspore/core/ops/fusion/conv2d_fusion.h View File

@@ -28,6 +28,7 @@ constexpr auto kNameConv2DFusion = "Conv2DFusion";
class Conv2DFusion : public Conv2D {
public:
Conv2DFusion() : Conv2D(kNameConv2DFusion) {}
~Conv2DFusion() = default;
MS_DECLARE_PARENT(Conv2DFusion, Conv2D);
void Init(int64_t in_channel, int64_t out_channel, const std::vector<int64_t> &kernel_size, int64_t mode = 1,
const PadMode &pad_mode = VALID, const std::vector<int64_t> &pad = {0, 0, 0, 0},


+ 1
- 0
mindspore/core/ops/fusion/div_fusion.h View File

@@ -26,6 +26,7 @@ constexpr auto kNameDivFusion = "DivFusion";
class DivFusion : public Div {
public:
DivFusion() : Div(kNameDivFusion) {}
~DivFusion() = default;
MS_DECLARE_PARENT(DivFusion, Div);
void Init(const ActivationType &activation_type = NO_ACTIVATION);
void set_activation_type(const ActivationType &activation_type);


+ 1
- 0
mindspore/core/ops/fusion/l2_normalize_fusion.h View File

@@ -28,6 +28,7 @@ constexpr auto kNameL2NormalizeFusion = "L2NormalizeFusion";
class L2NormalizeFusion : public L2Normalize {
public:
L2NormalizeFusion() : L2Normalize(kNameL2NormalizeFusion) {}
~L2NormalizeFusion() = default;
MS_DECLARE_PARENT(L2NormalizeFusion, L2Normalize);
void Init(const std::vector<int64_t> &axis, const float epsilon = 1e-4,
const ActivationType &activation_type = NO_ACTIVATION);


+ 0
- 1
mindspore/core/ops/fusion/reduce_fusion.cc View File

@@ -26,7 +26,6 @@

namespace mindspore {
namespace ops {

void ReduceFusion::set_keep_dims(const bool keep_dims) { this->AddAttr(kKeepDims, MakeValue(keep_dims)); }

void ReduceFusion::set_mode(const ReduceMode mode) {


+ 1
- 0
mindspore/core/ops/fusion/scale_fusion.h View File

@@ -26,6 +26,7 @@ constexpr auto kNameScaleFusion = "ScaleFusion";
class ScaleFusion : public Scale {
public:
ScaleFusion() : Scale(kNameScaleFusion) {}
~ScaleFusion() = default;
MS_DECLARE_PARENT(ScaleFusion, Scale);
void Init(const int64_t axis = -1, const ActivationType &activation_type = NO_ACTIVATION);
void set_activation_type(const ActivationType &activation_type);


+ 1
- 0
mindspore/core/ops/fusion/sub_fusion.h View File

@@ -26,6 +26,7 @@ constexpr auto kNameSubFusion = "SubFusion";
class SubFusion : public Sub {
public:
SubFusion() : Sub(kNameSubFusion) {}
~SubFusion() = default;
MS_DECLARE_PARENT(SubFusion, Sub);
void Init(const ActivationType &activation_type = NO_ACTIVATION);
void set_activation_type(const ActivationType &activation_type);


+ 1
- 0
mindspore/core/ops/fusion/tile_fusion.h View File

@@ -28,6 +28,7 @@ constexpr auto kNameTileFusion = "TileFusion";
class TileFusion : public Tile {
public:
TileFusion() : Tile(kNameTileFusion) {}
~TileFusion() = default;
MS_DECLARE_PARENT(TileFusion, Tile);
void Init(const std::vector<int64_t> &dims);
void set_dims(const std::vector<int64_t> &dims);


+ 1
- 0
mindspore/core/ops/fusion/topk_fusion.h View File

@@ -28,6 +28,7 @@ constexpr auto kNameTopKFusion = "TopKFusion";
class TopKFusion : public TopK {
public:
TopKFusion() : TopK(kNameTopKFusion) {}
~TopKFusion() = default;
MS_DECLARE_PARENT(TopKFusion, TopK);
void Init(const bool sorted, const int64_t axis, const int64_t largest);
void set_axis(const int64_t axis);


+ 0
- 1
mindspore/core/ops/grad/activation_grad.cc View File

@@ -26,7 +26,6 @@

namespace mindspore {
namespace ops {

void ActivationGrad::Init(const ActivationType &type, const float alpha) {
this->set_activation_type(type);
this->set_alpha(alpha);


+ 0
- 1
mindspore/core/ops/grad/avg_pool_grad.h View File

@@ -38,7 +38,6 @@ class AvgPoolGrad : public PoolGrad {
AbstractBasePtr AvgPoolGradInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
const std::vector<AbstractBasePtr> &input_args);
using PrimAvgPoolGradPtr = std::shared_ptr<AvgPoolGrad>;

} // namespace ops
} // namespace mindspore



+ 0
- 1
mindspore/core/ops/grad/power_grad.cc View File

@@ -26,7 +26,6 @@

namespace mindspore {
namespace ops {

void PowerGrad::set_power(const float power) { this->AddAttr(kPower, MakeValue(power)); }
float PowerGrad::get_power() const {
auto value_ptr = GetAttr(kPower);


+ 0
- 1
mindspore/core/ops/hashtable_lookup.cc View File

@@ -21,7 +21,6 @@

namespace mindspore {
namespace ops {

AbstractBasePtr HashtableLookupInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
const std::vector<AbstractBasePtr> &input_args) {
MS_EXCEPTION_IF_NULL(primitive);


+ 2
- 2
mindspore/core/ops/lstm.cc View File

@@ -57,8 +57,8 @@ AbstractBasePtr LstmInfer(const PrimitivePtr &primitive, const std::vector<Abstr
(num_layers + 1) * num_directions * (x_input_shape[0] + 1) * x_input_shape[1] * states_ws_ld * type_size;
int64_t ws_diff_states_size =
(num_layers + 1) * num_directions * 3 * (x_input_shape[0] + 1) * x_input_shape[1] * states_ws_ld * type_size;
int64_t ws_grad_comp_size = 0;
int64_t page_size = 4096;
const int64_t ws_grad_comp_size = 0;
const int64_t page_size = 4096;
int64_t current_offset = 0;
current_offset += ws_gates_size;
current_offset = ((current_offset / page_size - 1) / page_size) * page_size;


+ 0
- 1
mindspore/core/ops/merge.cc View File

@@ -25,7 +25,6 @@

namespace mindspore {
namespace ops {

AbstractBasePtr MergeInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
const std::vector<AbstractBasePtr> &input_args) {
MS_EXCEPTION_IF_NULL(primitive);


+ 0
- 1
mindspore/core/ops/non_max_suppression.cc View File

@@ -20,7 +20,6 @@

namespace mindspore {
namespace ops {

void NonMaxSuppression::set_center_point_box(const int64_t center_point_box) {
AddAttr(kCenterPointBox, MakeValue(center_point_box));
}


+ 0
- 1
mindspore/core/ops/permute.cc View File

@@ -25,7 +25,6 @@

namespace mindspore {
namespace ops {

void Permute::set_order(const std::vector<int64_t> &order) { this->AddAttr(kOrder, MakeValue(order)); }

std::vector<int64_t> Permute::get_order() const {


+ 0
- 1
mindspore/core/ops/primitive_c.cc View File

@@ -43,6 +43,5 @@ OpPrimCRegister &OpPrimCRegister::GetInstance() {

std::map<std::string, OpPrimCDefineFunc> OpPrimCRegister::GetPrimCMap() { return op_primc_fns_; }
void OpPrimCRegister::SetPrimCMap(const std::string &kname, const OpPrimCDefineFunc &fn) { op_primc_fns_[kname] = fn; }

} // namespace ops
} // namespace mindspore

+ 0
- 1
mindspore/core/ops/proposal.h View File

@@ -51,7 +51,6 @@ class Proposal : public PrimitiveC {
int64_t get_post_nms_topn() const;
float get_nms_thresh() const;
};

} // namespace ops
} // namespace mindspore



+ 1
- 1
mindspore/core/ops/range.cc View File

@@ -65,7 +65,7 @@ AbstractBasePtr RangeInfer(const abstract::AnalysisEnginePtr &, const PrimitiveP
MS_EXCEPTION_IF_NULL(primitive);
auto prim = primitive->cast<PrimRangePtr>();
MS_EXCEPTION_IF_NULL(prim);
int64_t shape_size;
int64_t shape_size = 0;
TypeId dtype;
if (input_args.size() == 3) {
MS_EXCEPTION_IF_NULL(input_args[0]->BuildValue());


+ 0
- 1
mindspore/core/ops/reduce.cc View File

@@ -26,7 +26,6 @@
namespace mindspore {
namespace ops {
namespace {

void reduce_one_axis(const int64_t one_axis, const int64_t dim, std::set<int64_t> axis_reduce) {
CheckAndConvertUtils::CheckInRange("axis", one_axis, kIncludeLeft, {-dim, dim}, "Reduce");
if (one_axis < 0) {


+ 0
- 1
mindspore/core/ops/reduce_all.cc View File

@@ -25,7 +25,6 @@

namespace mindspore {
namespace ops {

REGISTER_PRIMITIVE_C(kNameReduceAll, ReduceAll);
} // namespace ops
} // namespace mindspore

+ 0
- 1
mindspore/core/ops/resize_bilinear.cc View File

@@ -25,7 +25,6 @@

namespace mindspore {
namespace ops {

void ResizeBilinear::set_size(const std::vector<int64_t> &size) { this->AddAttr(kSize, MakeValue(size)); }

std::vector<int64_t> ResizeBilinear::get_size() const {


+ 0
- 1
mindspore/core/ops/softmax_cross_entropy_with_logits.cc View File

@@ -26,7 +26,6 @@

namespace mindspore {
namespace ops {

AbstractBasePtr SoftmaxCrossEntropyWithLogitsInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
const std::vector<AbstractBasePtr> &input_args) {
MS_EXCEPTION_IF_NULL(primitive);


+ 1
- 1
mindspore/core/ops/space_to_batch_nd.cc View File

@@ -35,7 +35,7 @@ abstract::ShapePtr InferShape(const PrimitivePtr &primitive, const std::vector<A
CheckAndConvertUtils::CheckInteger("input_x rank", x_shape.size(), kEqual, 4, prim_name);
auto out_shape = x_shape;
int64_t block_shape_prod = 1;
int64_t offset = 2;
const int64_t offset = 2;
auto block_shape = space_prim->get_block_shape();
auto padding = space_prim->get_paddings();
int64_t size = block_shape.size();


+ 0
- 1
mindspore/core/ops/to_format.cc View File

@@ -26,7 +26,6 @@

namespace mindspore {
namespace ops {

void ToFormat::set_src_t(const int64_t src_t) { this->AddAttr(kSrcT, MakeValue(src_t)); }
int64_t ToFormat::get_src_t() const {
auto value_ptr = GetAttr(kSrcT);


+ 0
- 1
mindspore/core/ops/unpack.cc View File

@@ -18,7 +18,6 @@

namespace mindspore {
namespace ops {

void Unpack::Init(const int64_t axis) { this->set_axis(axis); }
void Unpack::set_axis(const int64_t axis) { AddAttr(kAxis, MakeValue(axis)); }
int64_t Unpack::get_axis() const {


+ 0
- 1
mindspore/core/ops/where.cc View File

@@ -22,7 +22,6 @@

namespace mindspore {
namespace ops {

AbstractBasePtr WhereInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
const std::vector<AbstractBasePtr> &input_args) {
MS_EXCEPTION_IF_NULL(primitive);


Loading…
Cancel
Save