Home
last modified time | relevance | path

Searched refs:ndim_ (Results 1 – 25 of 42) sorted by relevance

12

/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/
Dstrided_slice_infer.c26 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 …]
Darithmetic_grad_infer.c57 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()
Dstrided_slice_grad_infer.c88 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()
Dadd_sub_grad_infer.c40 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()
Dmax_min_grad_infer.c43 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/
Dbias_fp16_grad.cc36 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()
Darithmetic_fp16_grad.cc55 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/
Dbias_grad.cc32 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()
Darithmetic_grad.cc85 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/
Dbias_fp32.cc32 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()
Darithmetic_fp32.cc58 …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 …]
Dreverse_sequence_fp32.cc70 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/
Darithmetic_fp32_coder.cc95 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/
Darithmetic_base.c20 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/
Dbiasadd_fp16.cc33 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()
Darithmetic_compare_fp16.cc94 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()
Darithmetic_fp16.cc79 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/
Dtensor.cc185 …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/
Dadd_int8_coder.cc117 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()
Ddiv_int8_coder.cc58 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()
Dsub_int8_coder.cc82 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/
Dadd_int8.cc136 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()
Dscale_int8.cc65 … 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/
Dreverse_sequence_fp32.c21 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/
Dreverse_sequence_parameter.h35 int ndim_; member

12