/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/ |
D | strided_slice_infer.c | 26 int ndim_; member 72 transfer_buffer->ndim_ = GetElementNum(begin_tensor); in HandleAxesInputNotExist() 73 for (int i = 0; i < (size_t)(transfer_buffer->ndim_); ++i) { in HandleAxesInputNotExist() 203 for (unsigned i = 0; i < (unsigned)(size_t)(transfer_buffer->ndim_); i++) { in Bit2Vector() 228 …nsfer_buffer->ends_, &transfer_buffer->ends_size_, in_shape[(size_t)(transfer_buffer->ndim_) - 1]); in ApplyNewAxisMask() 241 for (int i = 0; i < (size_t)(transfer_buffer->ndim_); i++) { in ApplyBeginMask() 249 for (int i = 0; i < transfer_buffer->ndim_; i++) { in ApplyEndMask() 309 …if (transfer_buffer->ndim_ >= (int)(in_shape_size) || param->in_shape_length_ >= (int)(in_shape_si… in TransferBuffer2Param() 312 for (int i = 0; i < transfer_buffer->ndim_; i++) { in TransferBuffer2Param() 319 for (int i = transfer_buffer->ndim_; i < param->in_shape_length_; i++) { in TransferBuffer2Param() [all …]
|
D | arithmetic_grad_infer.c | 57 param->ndim_ = in_shape1_size; in ArithmeticGradInferShape() 58 param->in_elements_num0_ = (int)param->ndim_; in ArithmeticGradInferShape() 59 param->in_elements_num1_ = (int)param->ndim_; in ArithmeticGradInferShape() 60 param->out_elements_num_ = (int)param->ndim_; in ArithmeticGradInferShape() 73 param->ndim_ = in_shape0_size; in ArithmeticGradInferShape() 74 param->in_elements_num0_ = param->ndim_; in ArithmeticGradInferShape() 75 param->in_elements_num1_ = param->ndim_; in ArithmeticGradInferShape() 76 param->out_elements_num_ = param->ndim_; in ArithmeticGradInferShape()
|
D | strided_slice_grad_infer.c | 88 size_t ndim_ = (size_t)GetElementNum(begin_tensor); in StridedSliceGradInferShape() local 89 for (size_t i = 0; i < ndim_; ++i) { in StridedSliceGradInferShape() 102 for (size_t i = 0; i < ndim_; i++) { in StridedSliceGradInferShape() 110 for (size_t i = 0; i < ndim_; ++i) { in StridedSliceGradInferShape() 117 for (size_t i = 0; i < ndim_; i++) { in StridedSliceGradInferShape() 119 ndim_ += 1; in StridedSliceGradInferShape() 129 ShapePush(ends_, &ends_size, in_shape_[ndim_ - 1]); in StridedSliceGradInferShape() 137 …ApplyBeginEndEllipsisMask(ndim_, begins_, begins_mask_, ends_, ends_mask_, ellipsis_mask_, in_shap… in StridedSliceGradInferShape()
|
D | add_sub_grad_infer.c | 40 param->ndim_ = dy->shape_size_; in AddSubGradInferShape() 41 param->in_elements_num0_ = param->ndim_; in AddSubGradInferShape() 42 param->in_elements_num1_ = param->ndim_; in AddSubGradInferShape() 43 param->out_elements_num_ = param->ndim_; in AddSubGradInferShape()
|
D | max_min_grad_infer.c | 43 param->ndim_ = dy->shape_size_; in MaxMinGradInferShape() 44 param->in_elements_num0_ = (int)(param->ndim_); in MaxMinGradInferShape() 45 param->in_elements_num1_ = (int)(param->ndim_); in MaxMinGradInferShape() 46 param->out_elements_num_ = (int)(param->ndim_); in MaxMinGradInferShape()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16_grad/ |
D | bias_fp16_grad.cc | 36 bias_param->ndim_ = dims.size(); in ReSize() 37 for (unsigned int i = 0; i < bias_param->ndim_; i++) { in ReSize() 41 bias_param->out_shape_[bias_param->ndim_ - 1] = dims[bias_param->ndim_ - 1]; in ReSize() 42 for (auto i = bias_param->ndim_; i < kMaxDim; i++) { in ReSize() 65 size_t channels = bias_param->in_shape0_[bias_param->ndim_ - 1]; // C in NHWC in DoExecute() 66 for (unsigned int i = 0; i < bias_param->ndim_ - 1; i++) { in DoExecute()
|
D | arithmetic_fp16_grad.cc | 55 arithmeticParameter_->out_shape_, dx1, dx2, arithmeticParameter_->ndim_); in ArithmeticGradMaximum() 69 arithmeticParameter_->out_shape_, dx1, dx2, arithmeticParameter_->ndim_); in ArithmeticGradMinimum()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32_grad/ |
D | bias_grad.cc | 32 bias_param->ndim_ = dims.size(); in ReSize() 33 for (unsigned int i = 0; i < bias_param->ndim_; i++) { in ReSize() 37 bias_param->out_shape_[bias_param->ndim_ - 1] = dims[bias_param->ndim_ - 1]; in ReSize() 38 for (auto i = bias_param->ndim_; i < DIMENSION_4D; i++) { in ReSize() 63 size_t channels = bias_param->in_shape0_[bias_param->ndim_ - 1]; // C in NHWC in Execute() 64 for (unsigned int i = 0; i < bias_param->ndim_ - 1; i++) { in Execute()
|
D | arithmetic_grad.cc | 85 arithmeticParameter_->ndim_); in ArithmeticGradAdd() 91 arithmeticParameter_->ndim_); in ArithmeticGradAdd() 102 arithmeticParameter_->ndim_); in ArithmeticGradSub() 110 arithmeticParameter_->ndim_); in ArithmeticGradSub() 137 arithmeticParameter_->ndim_); in ArithmeticGradMul1L() 151 arithmeticParameter_->ndim_); in ArithmeticGradMul2L() 180 arithmeticParameter_->ndim_); in ArithmeticGradDiv1L() 200 arithmeticParameter_->ndim_); in ArithmeticGradDiv2L() 218 arithmeticParameter_->out_shape_, dx1, dx2, arithmeticParameter_->ndim_); in ArithmeticGradMaximum() 232 arithmeticParameter_->out_shape_, dx1, dx2, arithmeticParameter_->ndim_); in ArithmeticGradMinimum()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/ |
D | bias_fp32.cc | 32 bias_param_->ndim_ = dims.size(); in ReSize() 33 if (bias_param_->ndim_ < 1 || bias_param_->ndim_ > 5) { in ReSize() 37 for (size_t i = 0; i < bias_param_->ndim_; i++) { in ReSize() 42 bias_param_->in_shape1_[bias_param_->ndim_ - 1] = dims[bias_param_->ndim_ - 1]; in ReSize()
|
D | arithmetic_fp32.cc | 58 …for (int i = static_cast<int>(param_->ndim_) - 1; i >= 0 && i < ARITHMETIC_SUPPORT_DIMS_NUM; --i) { in ReSize() 101 for (size_t i = 0; i < param_->ndim_; i++) { in IsBatchScalarCalc() 107 if (break_axis < param_->ndim_) { in IsBatchScalarCalc() 108 for (size_t i = break_axis; i < param_->ndim_; i++) { in IsBatchScalarCalc() 119 int last_shape0 = param_->in_shape0_[param_->ndim_ - 1]; in IsBiasCalc() 120 int last_shape1 = param_->in_shape1_[param_->ndim_ - 1]; in IsBiasCalc() 148 …TileConstTensor(in_tensors_[0]->data(), input0_ptr_, param_->ndim_, param_->in_shape0_, param_->in… in ConstTensorBroadCast() 161 …TileConstTensor(in_tensors_[1]->data(), input1_ptr_, param_->ndim_, param_->in_shape1_, param_->in… in ConstTensorBroadCast() 338 if (param_->ndim_ > ARITHMETIC_SUPPORT_DIMS_NUM || param_->out_shape_[param_->ndim_ - 1] == 0) { in BiasCalc() 342 int last_shape = param_->out_shape_[param_->ndim_ - 1]; in BiasCalc() [all …]
|
D | reverse_sequence_fp32.cc | 70 para->ndim_ = input0->shape().size(); in ReSize() 71 for (int i = 0; i < para->ndim_; i++) { in ReSize()
|
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/fp32/ |
D | arithmetic_fp32_coder.cc | 95 int resize_n_index = static_cast<int>(arithmetic_parameter_->ndim_) - 1; in ReSize() 152 MS_CHECK_TRUE_RET(arithmetic_parameter_->ndim_ <= max_dims_, false); in IsBatchScalarCalc() 153 for (size_t i = 0; i < arithmetic_parameter_->ndim_; i++) { in IsBatchScalarCalc() 159 if (break_axis < arithmetic_parameter_->ndim_) { in IsBatchScalarCalc() 160 for (size_t i = break_axis; i < arithmetic_parameter_->ndim_; i++) { in IsBatchScalarCalc() 171 int last_shape0 = arithmetic_parameter_->in_shape0_[arithmetic_parameter_->ndim_ - 1]; in IsBiasCalc() 172 int last_shape1 = arithmetic_parameter_->in_shape1_[arithmetic_parameter_->ndim_ - 1]; in IsBiasCalc() 219 …init_code.CodeArray("in_shape", arithmetic_parameter_->in_shape0_, arithmetic_parameter_->ndim_, t… in ConstTensorBroadCast() 220 …de.CodeArray("in_stride", arithmetic_parameter_->in_strides0_, arithmetic_parameter_->ndim_, true); in ConstTensorBroadCast() 221 …e.CodeArray("out_stride", arithmetic_parameter_->out_strides_, arithmetic_parameter_->ndim_, true); in ConstTensorBroadCast() [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/base/ |
D | arithmetic_base.c | 20 for (size_t i = 0; i < param->ndim_; i++) { in CalcMultiplesAndStrides() 29 ComputeStrides(param->in_shape0_, param->in_strides0_, param->ndim_); in CalcMultiplesAndStrides() 30 ComputeStrides(param->in_shape1_, param->in_strides1_, param->ndim_); in CalcMultiplesAndStrides() 31 ComputeStrides(param->out_shape_, param->out_strides_, param->ndim_); in CalcMultiplesAndStrides()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16/ |
D | biasadd_fp16.cc | 33 bias_param_->ndim_ = dims.size(); in ReSize() 34 if (bias_param_->ndim_ < 1 || bias_param_->ndim_ > 5) { in ReSize() 38 for (size_t i = 0; i < bias_param_->ndim_; i++) { in ReSize() 43 bias_param_->in_shape1_[bias_param_->ndim_ - 1] = dims[bias_param_->ndim_ - 1]; in ReSize()
|
D | arithmetic_compare_fp16.cc | 94 for (int i = param_->ndim_ - 1; i >= 0; --i) { in ReSize() 101 ComputeStrides(param_->in_shape0_, param_->in_strides0_, param_->ndim_); in ReSize() 102 ComputeStrides(param_->in_shape1_, param_->in_strides1_, param_->ndim_); in ReSize() 103 ComputeStrides(param_->out_shape_, param_->out_strides_, param_->ndim_); in ReSize()
|
D | arithmetic_fp16.cc | 79 for (size_t i = 0; i < param_->ndim_; i++) { in IsBatchScalarCalc() 85 if (break_axis < param_->ndim_) { in IsBatchScalarCalc() 86 for (size_t i = break_axis; i < param_->ndim_; i++) { in IsBatchScalarCalc()
|
/third_party/mindspore/mindspore/core/ir/ |
D | tensor.cc | 185 …explicit TensorDataImpl(const ShapeVector &shape) : ndim_(shape.size()), data_size_(SizeOf(shape))… in TensorDataImpl() 189 : ndim_(shape.size()), data_size_(SizeOf(shape)), data_(CopyData<T>(shape, data, data_len)) {} in TensorDataImpl() 192 … : ndim_(shape.size()), data_size_(SizeOf(shape)), data_(CopyData<T>(shape, data, data_type)) {} in TensorDataImpl() 196 : ndim_(shape.size()), data_size_(SizeOf(shape)), data_(NewData<T>(input, size)) {} in TensorDataImpl() 200 : ndim_(shape.size()), data_size_(SizeOf(shape)), data_(NewData<T>(scalar)) {} in TensorDataImpl() 208 ssize_t ndim() const override { return static_cast<ssize_t>(ndim_); } in ndim() 235 return (ndim_ == ptr->ndim_) && (data_size_ == ptr->data_size_) && in equals() 255 if (data_size_ == 1 && ndim_ == 0) { // Scalar in ToString() 310 const bool isScalar = ndim_ == 0 && end - start == 1; in OutputDataString() 334 if (!isScalar && ndim_ == 1 && (i + 1) % linefeedThreshold == 0) { in OutputDataString() [all …]
|
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/int8/ |
D | add_int8_coder.cc | 117 for (auto i = arith_para_->ndim_ - 1; i >= 0; --i) { in ReSize() 125 for (size_t i = 0; i < arith_para_->ndim_; i++) { in ReSize() 133 ComputeStrides(arith_para_->in_shape0_, arith_para_->in_strides0_, arith_para_->ndim_); in ReSize() 134 ComputeStrides(arith_para_->in_shape1_, arith_para_->in_strides1_, arith_para_->ndim_); in ReSize() 135 ComputeStrides(arith_para_->out_shape_, arith_para_->out_strides_, arith_para_->ndim_); in ReSize()
|
D | div_int8_coder.cc | 58 tile_para.ndim_ = output_tensor_->shape().size(); in DoCode() 60 MS_CHECK_TRUE_RET(tile_para.ndim_ <= max_dim, RET_ERROR); in DoCode() 61 for (size_t i = 0; i < tile_para.ndim_; i++) { in DoCode()
|
D | sub_int8_coder.cc | 82 tile_para.ndim_ = output_tensor_->shape().size(); in DoCode() 83 for (size_t i = 0; i < tile_para.ndim_; i++) { in DoCode()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/int8/ |
D | add_int8.cc | 136 for (int i = static_cast<int>(arith_para_->ndim_) - 1; i >= 0; --i) { in ReSize() 144 for (size_t i = 0; i < arith_para_->ndim_; i++) { in ReSize() 152 ComputeStrides(arith_para_->in_shape0_, arith_para_->in_strides0_, arith_para_->ndim_); in ReSize() 153 ComputeStrides(arith_para_->in_shape1_, arith_para_->in_strides1_, arith_para_->ndim_); in ReSize() 154 ComputeStrides(arith_para_->out_shape_, arith_para_->out_strides_, arith_para_->ndim_); in ReSize()
|
D | scale_int8.cc | 65 … reinterpret_cast<int8_t *>(input1_data_), 0, tile_para->ndim_, tile_para->in_shape1_, in InitScaleOffset() 92 … reinterpret_cast<int8_t *>(input2_data_), 0, tile_para->ndim_, tile_para->in_shape1_, in InitScaleOffset() 131 tile_para->ndim_ = output_size; in InitParameter() 309 … reinterpret_cast<int8_t *>(input1_data_), 0, tile_para->ndim_, tile_para->in_shape1_, in Run() 323 … reinterpret_cast<int8_t *>(input2_data_), 0, tile_para->ndim_, tile_para->in_shape1_, in Run()
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/ |
D | reverse_sequence_fp32.c | 21 ComputeStrides(para->input_shape0_, para->input_stride_, para->ndim_); in ReverseSequence() 22 ComputeStrides(para->output_shape_, para->output_stride_, para->ndim_); in ReverseSequence()
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/ |
D | reverse_sequence_parameter.h | 35 int ndim_; member
|