/third_party/mindspore/mindspore/ops/composite/multitype_ops/ |
D | _constexpr_utils.py | 89 def _deep_list(array_like, dim_size=-1): argument 91 if dim_size != -1: 92 array_like = check_range(array_like, dim_size) 94 return list(map(lambda x: _deep_list(x, dim_size), array_like)) 131 def check_range(x, dim_size): argument 133 if x >= dim_size or x < -dim_size: 135 x = x % dim_size 140 def make_tensor(a, dtype=mstype.int64, data_shape=None, dim_size=-1): argument 164 if dim_size != -1: 165 a = check_range(a, dim_size) [all …]
|
D | _compile_utils.py | 419 for i, (index, dim_size) in enumerate(zip(tuple_index, data_shape)): 421 int_index = const_utils.check_range(index, dim_size) 427 tensor_index = const_utils.sequence_to_index(index, dim_size) 443 slice_ele_list_index = const_utils.transform_slice_to_ele_list(index, dim_size) 500 for i, (index, dim_size) in enumerate(zip(tuple_index, data_shape)): 502 int_index = const_utils.check_range(index, dim_size) 508 tensor_index = const_utils.sequence_to_index(index, dim_size) 522 start, stop, step = const_utils.normalize_slice(index, dim_size) 525 slice_ele_list_index = const_utils.transform_slice_to_ele_list(index, dim_size)
|
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/fp32/ |
D | transpose_fp32_coder.cc | 130 int *dim_size = reinterpret_cast<int *>(malloc(dims_ * sizeof(int))); in DoCode() local 131 if (dim_size == nullptr) { in DoCode() 134 *(dim_size + dims_ - 1) = 1; in DoCode() 136 *(dim_size + i - 1) = *(dim_size + i) * out_shape_[i]; in DoCode() 138 code.CodeArray("dim_size", dim_size, dims_); in DoCode() 141 free(dim_size); in DoCode() 147 free(dim_size); in DoCode()
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fission/ |
D | reduce_min_fission.cc | 64 int64_t dim_size = SizeToLong(shape.size()); in CalFirstAxis() local 66 for (int64_t i = 0; i < dim_size - 1; ++i) { in CalFirstAxis() 72 if (axis_fisrt[i] < -dim_size || axis_fisrt[i] > dim_size - 1) { in CalFirstAxis() 76 axis_fisrt[i] = dim_size + axis_fisrt[i]; in CalFirstAxis()
|
/third_party/mindspore/mindspore/core/ir/ |
D | meta_tensor.cc | 65 int64_t dim_size = -1; in DimensionSize() local 67 dim_size = shape_[index]; in DimensionSize() 71 return dim_size; in DimensionSize()
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/arrays/ |
D | one_hot_gpu_kernel.h | 72 auto dim_size = input_shape[i]; in Init() local 74 left_dim_size_ *= dim_size; in Init() 77 right_dim_size_ *= dim_size; in Init()
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/tf/ |
D | tf_model_parser.cc | 100 for (int i = 0; i < tensor_shape.dim_size(); i++) { in GetShapeSize() 111 for (int i = 0; i < tensor_shape.dim_size(); i++) { in SetFloatTensorInfo() 146 for (int i = 0; i < tensor_shape.dim_size(); i++) { in SetInt32TensorInfo() 181 for (int i = 0; i < tensor_shape.dim_size(); i++) { in SetInt64TensorInfo() 194 if (tensor_proto.tensor_shape().dim_size() == 0) { // scalar in SetInt64TensorInfo() 224 for (int i = 0; i < tensor_shape.dim_size(); i++) { in SetBoolTensorInfo() 251 for (int i = 0; i < tensor_shape.dim_size(); i++) { in SetStringTensorInfo() 340 auto dim_size = element_shape_proto.dim_size(); in ConvertConstVariant() local 341 std::vector<int> tensor_list_data(dim_size + 2); in ConvertConstVariant() 343 tensor_list_data[1] = element_shape_proto.dim_size(); in ConvertConstVariant() [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/ |
D | gather_d_cpu_kernel.cc | 88 size_t dim_size = sizeof(int); in Launch() local 90 …if (inputs[0]->size != input_size || inputs[1]->size != dim_size || inputs[2]->size != index_size … in Launch()
|
/third_party/mindspore/mindspore/lite/src/ |
D | tensor.cc | 238 int dim_size = -1; in DimensionSize() local 240 dim_size = shape_[index]; in DimensionSize() 244 return dim_size; in DimensionSize()
|
/third_party/mindspore/mindspore/_extends/graph_kernel/model/ |
D | op_infer.py | 108 dim_size = max([len(shape) for shape in shapes]) 109 align_shapes = [[1] * (dim_size - len(shape)) + shape for shape in shapes] 110 out_shape = [1] * dim_size 111 for i in range(dim_size):
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/caffe/ |
D | caffe_reshape_parser.cc | 35 for (int i = 0; i < blob_shape.dim_size(); i++) { in Parse()
|
D | caffe_node_parser.cc | 103 for (int i = 0; i < proto.shape().dim_size(); ++i) { in ConvertShape()
|
D | caffe_model_parser.cc | 317 for (int j = 0; j < layer.input_param().shape(0).dim_size(); j++) { in ConvertGraphInputsOfLayer() 343 for (int j = 0; j < shape.dim_size(); j++) { in ConvertGraphInputsOfShape()
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/ |
D | reduce_fp32.h | 53 int ReduceInferShape(int **in_shape, size_t *dim_size, int *out_shape, int *in_format, int *out_for…
|
D | reduce_fp32.c | 386 int ReduceInferShape(int **in_shape, size_t *dim_size, int *out_shape, int *in_format, int *out_for… in ReduceInferShape() argument 394 int rank = dim_size[0]; in ReduceInferShape()
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/ |
D | common_infer.c | 287 int dim_size = -1; in GetDimensionSize() local 289 dim_size = tensor->shape_[index]; in GetDimensionSize() 291 return dim_size; in GetDimensionSize()
|
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/strategy_checkpoint/ |
D | parallel_strategy_checkpoint.cc | 86 size_t rank_num = LongToSize(parallel_group_ranks.dim_size()); in LoadGroupInfo() 128 size_t dim_num = LongToSize(parallel_strategy.dim_size()); in Load()
|
/third_party/mindspore/mindspore/lite/java/native/runtime/ |
D | lite_session.cpp | 264 auto dim_size = static_cast<int>(env->GetArrayLength(array)); in Java_com_mindspore_lite_LiteSession_resize() local 266 std::vector<int> tensor_dims(dim_size); in Java_com_mindspore_lite_LiteSession_resize() 267 for (int j = 0; j < dim_size; j++) { in Java_com_mindspore_lite_LiteSession_resize()
|