| @@ -109,7 +109,6 @@ Hamiltonians HamiltoniansTransfor(const PaulisCoeffsType &paulis_coeffs, const P | |||||
| } | } | ||||
| return hams; | return hams; | ||||
| } | } | ||||
| } // namespace transformer | } // namespace transformer | ||||
| } // namespace mindquantum | } // namespace mindquantum | ||||
| } // namespace mindspore | } // namespace mindspore | ||||
| @@ -280,7 +280,7 @@ void MemCopyFromCacheToHost(void *hashmap_addr, void *host_addr, void *cache_add | |||||
| auto cache_data = static_cast<char *>(cache_addr); | auto cache_data = static_cast<char *>(cache_addr); | ||||
| auto hashmap_data = static_cast<HashmapEntry<T> *>(hashmap_addr); | auto hashmap_data = static_cast<HashmapEntry<T> *>(hashmap_addr); | ||||
| // default param type float | // default param type float | ||||
| size_t param_type_size = 4; | |||||
| const size_t param_type_size = 4; | |||||
| size_t single_col_bytes = param_type_size * col_size; | size_t single_col_bytes = param_type_size * col_size; | ||||
| for (size_t i = 0; i < hashmap_size; ++i) { | for (size_t i = 0; i < hashmap_size; ++i) { | ||||
| if (!hashmap_data[i].IsEmpty()) { | if (!hashmap_data[i].IsEmpty()) { | ||||
| @@ -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_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_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"); | TypePtr range_delta_type = CheckTensorDType(range_delta, supported_types, "range_start input of Range should be %s"); | ||||
| // check all 3 inputs are same type | // check all 3 inputs are same type | ||||
| if (!IsIdentidityOrSubclass(range_start_type, range_end_type) || | if (!IsIdentidityOrSubclass(range_start_type, range_end_type) || | ||||
| !IsIdentidityOrSubclass(range_end_type, range_delta_type)) { | !IsIdentidityOrSubclass(range_end_type, range_delta_type)) { | ||||
| @@ -309,5 +309,4 @@ const ValuePtr kUMonad = std::make_shared<UMonad>(); | |||||
| bool IOMonad::operator==(const Value &other) const { return other.isa<IOMonad>(); } | bool IOMonad::operator==(const Value &other) const { return other.isa<IOMonad>(); } | ||||
| const ValuePtr kIOMonad = std::make_shared<IOMonad>(); | const ValuePtr kIOMonad = std::make_shared<IOMonad>(); | ||||
| } // namespace mindspore | } // namespace mindspore | ||||
| @@ -94,12 +94,12 @@ int64_t AudioSpectrogram::Log2Ceil(int64_t length) { | |||||
| floor += shift; | 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 AudioSpectrogram::GetFftLength(int64_t length) { | ||||
| int64_t shift = Log2Ceil(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)); } | void AudioSpectrogram::set_mag_square(const bool mag_square) { this->AddAttr(kMagSquare, MakeValue(mag_square)); } | ||||
| @@ -22,7 +22,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| void BatchNormFold::Init(const float momentum, const float epsilon, const bool is_training, const int64_t freeze_bn) { | void BatchNormFold::Init(const float momentum, const float epsilon, const bool is_training, const int64_t freeze_bn) { | ||||
| set_momentum(momentum); | set_momentum(momentum); | ||||
| set_epsilon(epsilon); | set_epsilon(epsilon); | ||||
| @@ -41,7 +41,6 @@ class BroadcastTo : public PrimitiveC { | |||||
| AbstractBasePtr BroadcastToInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | AbstractBasePtr BroadcastToInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | ||||
| const std::vector<AbstractBasePtr> &input_args); | const std::vector<AbstractBasePtr> &input_args); | ||||
| using PrimBroadcastToPtr = std::shared_ptr<BroadcastTo>; | using PrimBroadcastToPtr = std::shared_ptr<BroadcastTo>; | ||||
| } // namespace ops | } // namespace ops | ||||
| } // namespace mindspore | } // namespace mindspore | ||||
| @@ -26,7 +26,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| AbstractBasePtr CeilInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | AbstractBasePtr CeilInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | ||||
| const std::vector<AbstractBasePtr> &input_args) { | const std::vector<AbstractBasePtr> &input_args) { | ||||
| for (const auto &item : input_args) { | for (const auto &item : input_args) { | ||||
| @@ -21,7 +21,6 @@ | |||||
| #include "utils/check_convert_utils.h" | #include "utils/check_convert_utils.h" | ||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| void Concat::Init(const int64_t axis) { this->set_axis(axis); } | void Concat::Init(const int64_t axis) { this->set_axis(axis); } | ||||
| int64_t Concat::get_axis() const { | int64_t Concat::get_axis() const { | ||||
| auto value_ptr = this->GetAttr(kAxis); | auto value_ptr = this->GetAttr(kAxis); | ||||
| @@ -31,6 +31,7 @@ constexpr auto kNameAdderFusion = "AdderFusion"; | |||||
| class AdderFusion : public Adder { | class AdderFusion : public Adder { | ||||
| public: | public: | ||||
| AdderFusion() : Adder(kNameAdderFusion) {} | AdderFusion() : Adder(kNameAdderFusion) {} | ||||
| ~AdderFusion() = default; | |||||
| MS_DECLARE_PARENT(AdderFusion, Adder); | MS_DECLARE_PARENT(AdderFusion, Adder); | ||||
| void Init(const int64_t in_channel, const int64_t out_channel, const std::vector<int64_t> &kernel_size, | 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, | const PadMode &pad_mode, const std::vector<int64_t> &stride, const std::vector<int64_t> &pad_list, | ||||
| @@ -18,7 +18,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| void AvgPoolFusion::Init(const std::vector<int64_t> &kernel_size, const std::vector<int64_t> &stride, | 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 PadMode &pad_mode, const Format &format, const std::vector<int64_t> &pad, | ||||
| const RoundMode &round_mode, const bool global, const ActivationType activation_type) { | const RoundMode &round_mode, const bool global, const ActivationType activation_type) { | ||||
| @@ -27,6 +27,7 @@ constexpr auto kNameConv2DBackpropInputFusion = "Conv2DBackpropInputFusion"; | |||||
| class Conv2DBackpropInputFusion : public Conv2DBackpropInput { | class Conv2DBackpropInputFusion : public Conv2DBackpropInput { | ||||
| public: | public: | ||||
| Conv2DBackpropInputFusion() : Conv2DBackpropInput(kNameConv2DBackpropInputFusion) {} | Conv2DBackpropInputFusion() : Conv2DBackpropInput(kNameConv2DBackpropInputFusion) {} | ||||
| ~Conv2DBackpropInputFusion() = default; | |||||
| MS_DECLARE_PARENT(Conv2DBackpropInputFusion, Conv2DBackpropInput); | 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, | 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}, | const PadMode &pad_mode = VALID, const std::vector<int64_t> &pad = {0, 0, 0, 0}, | ||||
| @@ -28,6 +28,7 @@ constexpr auto kNameConv2DFusion = "Conv2DFusion"; | |||||
| class Conv2DFusion : public Conv2D { | class Conv2DFusion : public Conv2D { | ||||
| public: | public: | ||||
| Conv2DFusion() : Conv2D(kNameConv2DFusion) {} | Conv2DFusion() : Conv2D(kNameConv2DFusion) {} | ||||
| ~Conv2DFusion() = default; | |||||
| MS_DECLARE_PARENT(Conv2DFusion, Conv2D); | 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, | 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}, | const PadMode &pad_mode = VALID, const std::vector<int64_t> &pad = {0, 0, 0, 0}, | ||||
| @@ -26,6 +26,7 @@ constexpr auto kNameDivFusion = "DivFusion"; | |||||
| class DivFusion : public Div { | class DivFusion : public Div { | ||||
| public: | public: | ||||
| DivFusion() : Div(kNameDivFusion) {} | DivFusion() : Div(kNameDivFusion) {} | ||||
| ~DivFusion() = default; | |||||
| MS_DECLARE_PARENT(DivFusion, Div); | MS_DECLARE_PARENT(DivFusion, Div); | ||||
| void Init(const ActivationType &activation_type = NO_ACTIVATION); | void Init(const ActivationType &activation_type = NO_ACTIVATION); | ||||
| void set_activation_type(const ActivationType &activation_type); | void set_activation_type(const ActivationType &activation_type); | ||||
| @@ -28,6 +28,7 @@ constexpr auto kNameL2NormalizeFusion = "L2NormalizeFusion"; | |||||
| class L2NormalizeFusion : public L2Normalize { | class L2NormalizeFusion : public L2Normalize { | ||||
| public: | public: | ||||
| L2NormalizeFusion() : L2Normalize(kNameL2NormalizeFusion) {} | L2NormalizeFusion() : L2Normalize(kNameL2NormalizeFusion) {} | ||||
| ~L2NormalizeFusion() = default; | |||||
| MS_DECLARE_PARENT(L2NormalizeFusion, L2Normalize); | MS_DECLARE_PARENT(L2NormalizeFusion, L2Normalize); | ||||
| void Init(const std::vector<int64_t> &axis, const float epsilon = 1e-4, | void Init(const std::vector<int64_t> &axis, const float epsilon = 1e-4, | ||||
| const ActivationType &activation_type = NO_ACTIVATION); | const ActivationType &activation_type = NO_ACTIVATION); | ||||
| @@ -26,7 +26,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| void ReduceFusion::set_keep_dims(const bool keep_dims) { this->AddAttr(kKeepDims, MakeValue(keep_dims)); } | void ReduceFusion::set_keep_dims(const bool keep_dims) { this->AddAttr(kKeepDims, MakeValue(keep_dims)); } | ||||
| void ReduceFusion::set_mode(const ReduceMode mode) { | void ReduceFusion::set_mode(const ReduceMode mode) { | ||||
| @@ -26,6 +26,7 @@ constexpr auto kNameScaleFusion = "ScaleFusion"; | |||||
| class ScaleFusion : public Scale { | class ScaleFusion : public Scale { | ||||
| public: | public: | ||||
| ScaleFusion() : Scale(kNameScaleFusion) {} | ScaleFusion() : Scale(kNameScaleFusion) {} | ||||
| ~ScaleFusion() = default; | |||||
| MS_DECLARE_PARENT(ScaleFusion, Scale); | MS_DECLARE_PARENT(ScaleFusion, Scale); | ||||
| void Init(const int64_t axis = -1, const ActivationType &activation_type = NO_ACTIVATION); | void Init(const int64_t axis = -1, const ActivationType &activation_type = NO_ACTIVATION); | ||||
| void set_activation_type(const ActivationType &activation_type); | void set_activation_type(const ActivationType &activation_type); | ||||
| @@ -26,6 +26,7 @@ constexpr auto kNameSubFusion = "SubFusion"; | |||||
| class SubFusion : public Sub { | class SubFusion : public Sub { | ||||
| public: | public: | ||||
| SubFusion() : Sub(kNameSubFusion) {} | SubFusion() : Sub(kNameSubFusion) {} | ||||
| ~SubFusion() = default; | |||||
| MS_DECLARE_PARENT(SubFusion, Sub); | MS_DECLARE_PARENT(SubFusion, Sub); | ||||
| void Init(const ActivationType &activation_type = NO_ACTIVATION); | void Init(const ActivationType &activation_type = NO_ACTIVATION); | ||||
| void set_activation_type(const ActivationType &activation_type); | void set_activation_type(const ActivationType &activation_type); | ||||
| @@ -28,6 +28,7 @@ constexpr auto kNameTileFusion = "TileFusion"; | |||||
| class TileFusion : public Tile { | class TileFusion : public Tile { | ||||
| public: | public: | ||||
| TileFusion() : Tile(kNameTileFusion) {} | TileFusion() : Tile(kNameTileFusion) {} | ||||
| ~TileFusion() = default; | |||||
| MS_DECLARE_PARENT(TileFusion, Tile); | MS_DECLARE_PARENT(TileFusion, Tile); | ||||
| void Init(const std::vector<int64_t> &dims); | void Init(const std::vector<int64_t> &dims); | ||||
| void set_dims(const std::vector<int64_t> &dims); | void set_dims(const std::vector<int64_t> &dims); | ||||
| @@ -28,6 +28,7 @@ constexpr auto kNameTopKFusion = "TopKFusion"; | |||||
| class TopKFusion : public TopK { | class TopKFusion : public TopK { | ||||
| public: | public: | ||||
| TopKFusion() : TopK(kNameTopKFusion) {} | TopKFusion() : TopK(kNameTopKFusion) {} | ||||
| ~TopKFusion() = default; | |||||
| MS_DECLARE_PARENT(TopKFusion, TopK); | MS_DECLARE_PARENT(TopKFusion, TopK); | ||||
| void Init(const bool sorted, const int64_t axis, const int64_t largest); | void Init(const bool sorted, const int64_t axis, const int64_t largest); | ||||
| void set_axis(const int64_t axis); | void set_axis(const int64_t axis); | ||||
| @@ -26,7 +26,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| void ActivationGrad::Init(const ActivationType &type, const float alpha) { | void ActivationGrad::Init(const ActivationType &type, const float alpha) { | ||||
| this->set_activation_type(type); | this->set_activation_type(type); | ||||
| this->set_alpha(alpha); | this->set_alpha(alpha); | ||||
| @@ -38,7 +38,6 @@ class AvgPoolGrad : public PoolGrad { | |||||
| AbstractBasePtr AvgPoolGradInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | AbstractBasePtr AvgPoolGradInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | ||||
| const std::vector<AbstractBasePtr> &input_args); | const std::vector<AbstractBasePtr> &input_args); | ||||
| using PrimAvgPoolGradPtr = std::shared_ptr<AvgPoolGrad>; | using PrimAvgPoolGradPtr = std::shared_ptr<AvgPoolGrad>; | ||||
| } // namespace ops | } // namespace ops | ||||
| } // namespace mindspore | } // namespace mindspore | ||||
| @@ -26,7 +26,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| void PowerGrad::set_power(const float power) { this->AddAttr(kPower, MakeValue(power)); } | void PowerGrad::set_power(const float power) { this->AddAttr(kPower, MakeValue(power)); } | ||||
| float PowerGrad::get_power() const { | float PowerGrad::get_power() const { | ||||
| auto value_ptr = GetAttr(kPower); | auto value_ptr = GetAttr(kPower); | ||||
| @@ -21,7 +21,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| AbstractBasePtr HashtableLookupInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | AbstractBasePtr HashtableLookupInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | ||||
| const std::vector<AbstractBasePtr> &input_args) { | const std::vector<AbstractBasePtr> &input_args) { | ||||
| MS_EXCEPTION_IF_NULL(primitive); | MS_EXCEPTION_IF_NULL(primitive); | ||||
| @@ -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; | (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 = | 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; | (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; | int64_t current_offset = 0; | ||||
| current_offset += ws_gates_size; | current_offset += ws_gates_size; | ||||
| current_offset = ((current_offset / page_size - 1) / page_size) * page_size; | current_offset = ((current_offset / page_size - 1) / page_size) * page_size; | ||||
| @@ -25,7 +25,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| AbstractBasePtr MergeInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | AbstractBasePtr MergeInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | ||||
| const std::vector<AbstractBasePtr> &input_args) { | const std::vector<AbstractBasePtr> &input_args) { | ||||
| MS_EXCEPTION_IF_NULL(primitive); | MS_EXCEPTION_IF_NULL(primitive); | ||||
| @@ -20,7 +20,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| void NonMaxSuppression::set_center_point_box(const int64_t center_point_box) { | void NonMaxSuppression::set_center_point_box(const int64_t center_point_box) { | ||||
| AddAttr(kCenterPointBox, MakeValue(center_point_box)); | AddAttr(kCenterPointBox, MakeValue(center_point_box)); | ||||
| } | } | ||||
| @@ -25,7 +25,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| void Permute::set_order(const std::vector<int64_t> &order) { this->AddAttr(kOrder, MakeValue(order)); } | void Permute::set_order(const std::vector<int64_t> &order) { this->AddAttr(kOrder, MakeValue(order)); } | ||||
| std::vector<int64_t> Permute::get_order() const { | std::vector<int64_t> Permute::get_order() const { | ||||
| @@ -43,6 +43,5 @@ OpPrimCRegister &OpPrimCRegister::GetInstance() { | |||||
| std::map<std::string, OpPrimCDefineFunc> OpPrimCRegister::GetPrimCMap() { return op_primc_fns_; } | 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; } | void OpPrimCRegister::SetPrimCMap(const std::string &kname, const OpPrimCDefineFunc &fn) { op_primc_fns_[kname] = fn; } | ||||
| } // namespace ops | } // namespace ops | ||||
| } // namespace mindspore | } // namespace mindspore | ||||
| @@ -51,7 +51,6 @@ class Proposal : public PrimitiveC { | |||||
| int64_t get_post_nms_topn() const; | int64_t get_post_nms_topn() const; | ||||
| float get_nms_thresh() const; | float get_nms_thresh() const; | ||||
| }; | }; | ||||
| } // namespace ops | } // namespace ops | ||||
| } // namespace mindspore | } // namespace mindspore | ||||
| @@ -65,7 +65,7 @@ AbstractBasePtr RangeInfer(const abstract::AnalysisEnginePtr &, const PrimitiveP | |||||
| MS_EXCEPTION_IF_NULL(primitive); | MS_EXCEPTION_IF_NULL(primitive); | ||||
| auto prim = primitive->cast<PrimRangePtr>(); | auto prim = primitive->cast<PrimRangePtr>(); | ||||
| MS_EXCEPTION_IF_NULL(prim); | MS_EXCEPTION_IF_NULL(prim); | ||||
| int64_t shape_size; | |||||
| int64_t shape_size = 0; | |||||
| TypeId dtype; | TypeId dtype; | ||||
| if (input_args.size() == 3) { | if (input_args.size() == 3) { | ||||
| MS_EXCEPTION_IF_NULL(input_args[0]->BuildValue()); | MS_EXCEPTION_IF_NULL(input_args[0]->BuildValue()); | ||||
| @@ -26,7 +26,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| namespace { | namespace { | ||||
| void reduce_one_axis(const int64_t one_axis, const int64_t dim, std::set<int64_t> axis_reduce) { | 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"); | CheckAndConvertUtils::CheckInRange("axis", one_axis, kIncludeLeft, {-dim, dim}, "Reduce"); | ||||
| if (one_axis < 0) { | if (one_axis < 0) { | ||||
| @@ -25,7 +25,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| REGISTER_PRIMITIVE_C(kNameReduceAll, ReduceAll); | REGISTER_PRIMITIVE_C(kNameReduceAll, ReduceAll); | ||||
| } // namespace ops | } // namespace ops | ||||
| } // namespace mindspore | } // namespace mindspore | ||||
| @@ -25,7 +25,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| void ResizeBilinear::set_size(const std::vector<int64_t> &size) { this->AddAttr(kSize, MakeValue(size)); } | void ResizeBilinear::set_size(const std::vector<int64_t> &size) { this->AddAttr(kSize, MakeValue(size)); } | ||||
| std::vector<int64_t> ResizeBilinear::get_size() const { | std::vector<int64_t> ResizeBilinear::get_size() const { | ||||
| @@ -26,7 +26,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| AbstractBasePtr SoftmaxCrossEntropyWithLogitsInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | AbstractBasePtr SoftmaxCrossEntropyWithLogitsInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | ||||
| const std::vector<AbstractBasePtr> &input_args) { | const std::vector<AbstractBasePtr> &input_args) { | ||||
| MS_EXCEPTION_IF_NULL(primitive); | MS_EXCEPTION_IF_NULL(primitive); | ||||
| @@ -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); | CheckAndConvertUtils::CheckInteger("input_x rank", x_shape.size(), kEqual, 4, prim_name); | ||||
| auto out_shape = x_shape; | auto out_shape = x_shape; | ||||
| int64_t block_shape_prod = 1; | int64_t block_shape_prod = 1; | ||||
| int64_t offset = 2; | |||||
| const int64_t offset = 2; | |||||
| auto block_shape = space_prim->get_block_shape(); | auto block_shape = space_prim->get_block_shape(); | ||||
| auto padding = space_prim->get_paddings(); | auto padding = space_prim->get_paddings(); | ||||
| int64_t size = block_shape.size(); | int64_t size = block_shape.size(); | ||||
| @@ -26,7 +26,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| void ToFormat::set_src_t(const int64_t src_t) { this->AddAttr(kSrcT, MakeValue(src_t)); } | void ToFormat::set_src_t(const int64_t src_t) { this->AddAttr(kSrcT, MakeValue(src_t)); } | ||||
| int64_t ToFormat::get_src_t() const { | int64_t ToFormat::get_src_t() const { | ||||
| auto value_ptr = GetAttr(kSrcT); | auto value_ptr = GetAttr(kSrcT); | ||||
| @@ -18,7 +18,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| void Unpack::Init(const int64_t axis) { this->set_axis(axis); } | void Unpack::Init(const int64_t axis) { this->set_axis(axis); } | ||||
| void Unpack::set_axis(const int64_t axis) { AddAttr(kAxis, MakeValue(axis)); } | void Unpack::set_axis(const int64_t axis) { AddAttr(kAxis, MakeValue(axis)); } | ||||
| int64_t Unpack::get_axis() const { | int64_t Unpack::get_axis() const { | ||||
| @@ -22,7 +22,6 @@ | |||||
| namespace mindspore { | namespace mindspore { | ||||
| namespace ops { | namespace ops { | ||||
| AbstractBasePtr WhereInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | AbstractBasePtr WhereInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, | ||||
| const std::vector<AbstractBasePtr> &input_args) { | const std::vector<AbstractBasePtr> &input_args) { | ||||
| MS_EXCEPTION_IF_NULL(primitive); | MS_EXCEPTION_IF_NULL(primitive); | ||||