/third_party/mindspore/mindspore/core/ops/ |
D | op_utils.cc | 44 if (x_shape[LongToSize(x_length + i)] == 1) { in CalBroadCastShape() 45 broadcast_shape.push_back(y_shape[LongToSize(y_length + i)]); in CalBroadCastShape() 46 } else if (y_shape[LongToSize(y_length + i)] == 1) { in CalBroadCastShape() 47 broadcast_shape.push_back(x_shape[LongToSize(x_length + i)]); in CalBroadCastShape() 48 } else if (x_shape[LongToSize(x_length + i)] == y_shape[LongToSize(y_length + i)]) { in CalBroadCastShape() 49 broadcast_shape.push_back(x_shape[LongToSize(x_length + i)]); in CalBroadCastShape()
|
D | split_v.cc | 39 auto shape_of_split_dim = x_shape[LongToSize(split_dim)]; in InferShape() 49 …CheckAndConvertUtils::CheckInRange("elements of size_splits", size_splits[LongToSize(i)], kInclude… in InferShape() 51 sum_of_size_splits += size_splits[LongToSize(i)]; in InferShape() 63 …CheckAndConvertUtils::CheckInRange("elements of size_splits", size_splits[LongToSize(i)], kInclude… in InferShape() 65 sum_of_size_splits += size_splits[LongToSize(i)]; in InferShape() 74 shape[LongToSize(split_dim)] = size_splits[LongToSize(i)]; in InferShape()
|
D | pad.cc | 34 if (paddings_attr[LongToSize(i)][LongToSize(j)] < 0) { in InferShape() 41 (void)out_shape.emplace_back(x_shape[LongToSize(i)] + paddings_attr[LongToSize(i)][0] + in InferShape() 42 paddings_attr[LongToSize(i)][1]); in InferShape()
|
D | reshape.cc | 76 max_shape[LongToSize(neg_index)] = max_arr_prod / dim_prod; in ReshapeInfer() 77 min_shape[LongToSize(neg_index)] = min_arr_prod / dim_prod; in ReshapeInfer() 90 shape_v[LongToSize(neg_index)] = arr_prod / dim_prod; in ReshapeInfer() 91 dim_prod *= shape_v[LongToSize(neg_index)]; in ReshapeInfer()
|
D | index_add.cc | 48 …CheckAndConvertUtils::Check("size of indices", idx_shape[LongToSize(0)], kEqual, "dimension of y[a… in IndexAddInferShape() 49 y_shape[LongToSize(axis_rank)], prim_name); in IndexAddInferShape() 52 …CheckAndConvertUtils::Check("x dim", x_shape[LongToSize(dim)], kEqual, "y dim", y_shape[LongToSize… in IndexAddInferShape()
|
D | unstack.cc | 35 auto output_num = x_shape[LongToSize(axis)]; in UnstackInfer() 37 auto output_valid_check = x_shape[LongToSize(axis)] - output_num; in UnstackInfer()
|
D | unpack.cc | 38 auto output_num = x_shape[LongToSize(axis)]; in UnpackInfer() 40 auto output_valid_check = x_shape[LongToSize(axis)] - output_num; in UnpackInfer()
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fission/ |
D | split_fission.cc | 53 if (LongToSize(split_dim) >= input_shape.size()) { in GetSmallSplitSize() 59 return input_shape[LongToSize(split_dim)] / LongToSize(num_split); in GetSmallSplitSize() 66 …CreateMultipleOutputsOfAnfNode(func_graph, new_splitv, LongToSize(outputs_num), &new_splitv_output… in AddNewOutputs() 90 output_shape[LongToSize(split_dim)] = LongToSize(split_size); in CreateOutputShapeAndTypeId() 113 auto split_dim_l = LongToSize(split_dim); in SetAttrAndAbstractForBaseSplitv() 114 auto num_split_l = LongToSize(num_split); in SetAttrAndAbstractForBaseSplitv() 116 output_shape[split_dim_l] = LongToSize(size_splits_base[i]); in SetAttrAndAbstractForBaseSplitv()
|
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/tensor_layout/ |
D | construct_operator.cc | 99 if (CreateGroupByDim(dev_size_ - LongToSize(dev_dim) - 1, &group_list) != SUCCESS) { in StridedSliceOP() 118 if (index != LongToSize(split_dim)) { in StridedSliceOP() 140 if ((LongToSize(dev_dim) >= dev_size_) || (dev_dim < 0)) { in AllGatherOP() 146 if (CreateGroupByDim(dev_size_ - LongToSize(dev_dim) - 1, &group_list) != SUCCESS) { in AllGatherOP() 165 if (LongToSize(concat_dim) >= tensor_shape_.size() || concat_dim < 0) { in ConcatOP() 209 if (tensor_shape_[LongToSize(split_dim)] % split_count != 0) { in AlltoAllOP() 214 if (LongToSize(concat_dim) >= tensor_shape_.size() || concat_dim < 0) { in AlltoAllOP() 218 if ((LongToSize(dev_dim) >= dev_size_) || (dev_dim < 0)) { in AlltoAllOP() 224 if (CreateGroupByDim(dev_size_ - LongToSize(dev_dim) - 1, &group_list) != SUCCESS) { in AlltoAllOP()
|
D | redistribution_operator_infer.cc | 89 Args args = {SizeToLong(index), in_dim, dev_mat_.GetDimByReverseIdx(LongToSize(in_dim))}; in InferRedistributionOperator() 136 int64_t dev_num = dev_mat_.GetDimByReverseIdx(LongToSize(out_dim)); in InferPermuteByAxis() 158 map_[LongToSize(cat_dim)] = NONE; in InferPermuteByAxis() 172 Args args = {SizeToLong(index), in_dim, dev_mat_.GetDimByReverseIdx(LongToSize(in_dim))}; in InferConcatByAxis() 219 size_t index = LongToSize(args[TRANSFER_PERMUTE_SPLIT_DIM_INDEX]); in TransferSplitByAxis() 243 size_t index = LongToSize(args[TRANSFER_PERMUTE_SPLIT_DIM_INDEX]); in TransferPermuteByAxis() 247 if (cur_tensor_layout_.UpdateTensorMap(LongToSize(val), NONE) == Status::FAILED) { in TransferPermuteByAxis() 284 if (cur_tensor_layout_.UpdateTensorMap(LongToSize(tensor_dim), NONE) == Status::FAILED) { in TransferConcatByAxis()
|
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/ops_info/ |
D | gather_v2_p_info.cc | 234 if ((param_strategy.at(LongToSize(axis_)) != 1) && (product_i != 1)) { in CheckSplitAxisStrategy() 241 …if ((product_p != stage_device_size_) && (param_strategy.at(LongToSize(axis_)) != 1) && (axis_ != … in CheckSplitAxisStrategy() 246 …if ((product_p != stage_device_size_) && (param_strategy.at(LongToSize(axis_)) != 1) && (axis_ == … in CheckSplitAxisStrategy() 361 …if (axis_ != 0 && param_shape.at(0) % (param_strategy.at(0) * param_strategy.at(LongToSize(axis_))… in CheckStrategy() 431 if (param_strategy.at(LongToSize(axis_)) == 1) { in InferDevMatrixShape() 437 if (axis_ != 0 && param_strategy.at(LongToSize(axis_)) != 1) { in InferDevMatrixShape() 439 if (i == LongToSize(axis_)) { in InferDevMatrixShape() 445 out_dev_matrix_shape_.push_back(param_strategy.at(0) * param_strategy.at(LongToSize(axis_))); in InferDevMatrixShape() 472 if (param_strategy.at(LongToSize(axis_)) != 1) { in InferInputsTensorMap() 497 if (param_strategy.at(LongToSize(axis_)) == 1) { in InferOutputsTensorMap() [all …]
|
D | loss_info.cc | 50 int64_t input_axis_strategy = input_strategy.at(LongToSize(axis_index)); in CheckStrategy() 51 int64_t label_axis_strategy = label_strategy.at(LongToSize(axis_index)); in CheckStrategy() 143 input0_split[LongToSize(axis_index)] = 0; in GenerateOpStrategies()
|
D | gather_v2_info.cc | 89 axis_strategy_ = strategy->GetInputDim().at(0).at(LongToSize(axis_)); in CheckStrategy() 228 for (size_t i = LongToSize(axis_) + 1; i < dev_matrix_shape_.size(); i++) { in InferTensorSubOps() 234 int64_t mod_p = mod_n * dev_matrix_shape_.at(LongToSize(axis_)); in InferTensorSubOps() 246 …int64_t sub_value = inputs_shape_[0][LongToSize(axis_)] / dev_matrix_shape_[LongToSize(axis_)] * m… in InferTensorSubOps()
|
D | virtual_output_info.cc | 63 total_dev_num = LongToSize(stage_device_size_); in GenerateStrategies() 74 if (LongToSize(shape[0]) % total_dev_num == 0) { in GenerateStrategies()
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/mindir/ |
D | avg_pool_grad_unify_mindir.cc | 87 tmp_one_vector[LongToSize(i)] = 0.0; in GetAssistInputMatrix() 124 curr_sum += assist_input_matrix[LongToSize(i)][LongToSize(j)]; in CreateMeanMatrixValueNode() 128 hw_output[LongToSize(h * w_output + w)] = 1.0 / curr_sum; in CreateMeanMatrixValueNode() 139 auto dst_size = LongToSize(output_shape[kDim2]) * LongToSize(output_shape[kDim3]) * kFloat32Len; in CreateMeanMatrixValueNode() 140 … auto ret = memcpy_s(&output[LongToSize(i) * hw_output.size()], dst_size, &hw_output[0], src_size); in CreateMeanMatrixValueNode()
|
D | all_to_all_unify_mindir.cc | 77 if (split_count == 0 || shape[LongToSize(split_dim)] % static_cast<size_t>(split_count) != 0) { in CreateSplitNode() 79 << "] = " << shape[LongToSize(split_dim)]; in CreateSplitNode() 81 shape[LongToSize(split_dim)] /= static_cast<size_t>(split_count); in CreateSplitNode() 87 …deAttr(kAttrSizeSplits, MakeValue(std::vector<int64_t>(split_count, shape[LongToSize(split_dim)])), in CreateSplitNode() 143 if (LongToSize(concat_dim) >= single_shape.size()) { in CreateConcatNode() 146 single_shape[LongToSize(concat_dim)] *= static_cast<size_t>(split_count); in CreateConcatNode()
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fusion/ |
D | avgpool_3d_fusion.cc | 146 …d::vector<size_t> infer_shape = {IntToSize(1), LongToSize(fc), LongToSize(kd), LongToSize(kh), Lon… in ConstructFilter() 165 …auto infer_shape = {LongToSize(fn), LongToSize(fc), LongToSize(dd), LongToSize(dh), LongToSize(dw)… in ConstructMultiplier()
|
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/auto_parallel/ |
D | operator_costmodel.cc | 119 if (total_device_num != LongToSize(used_device_num)) in GetBackwardCommCost() 164 if (total_device_num != LongToSize(used_device_num)) in GetBackwardComputationCost() 219 if (total_device_num != LongToSize(used_device_num)) { in GetBackwardCommCost() 285 if (total_device_num != LongToSize(used_device_num)) { in GetBackwardCommCost() 459 if (total_device_num != LongToSize(used_device_num)) { in GetBackwardCommCost() 522 if (total_device_num != LongToSize(used_device_num)) { in GetBackwardCommCost() 561 if (total_device_num != LongToSize(used_device_num)) { in GetBackwardComputationCost() 696 if (total_device_num != LongToSize(used_device_num)) { in GetBackwardCommCost() 757 if (total_device_num != LongToSize(used_device_num)) in GetBackwardComputationCost() 770 if (total_device_num != LongToSize(used_device_num)) in GetBackwardComputationCost() [all …]
|
/third_party/mindspore/mindspore/core/utils/ |
D | info.cc | 30 std::string start = temp_line.substr(0, LongToSize(col_begin)); in HighLightLine() 31 std::string trimmed = temp_line.substr(LongToSize(col_begin), LongToSize(col_end - col_begin)); in HighLightLine() 32 …std::string end = temp_line.substr(LongToSize(col_end), LongToSize(SizeToLong(temp_line.length()) … in HighLightLine()
|
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/strategy_checkpoint/ |
D | parallel_strategy_checkpoint.cc | 80 size_t group_num = LongToSize(parallel_group_map.parallel_group_item_size()); in LoadGroupInfo() 86 size_t rank_num = LongToSize(parallel_group_ranks.dim_size()); in LoadGroupInfo() 117 size_t node_num = LongToSize(parallel_strategy_map.parallel_strategy_item_size()); in Load() 123 size_t strategys_num = LongToSize(parallel_strategys.parallel_strategy_size()); in Load() 128 size_t dim_num = LongToSize(parallel_strategy.dim_size()); in Load()
|
/third_party/mindspore/mindspore/core/ops/fusion/ |
D | full_connection.cc | 88 for (size_t t = LongToSize(prim_axis); t < input0_shape.size(); t++) { in FullConnectionInfer() 105 out_shape.resize(LongToSize(prim_axis) + 1); in FullConnectionInfer() 106 out_shape[LongToSize(prim_axis)] = input1_shape[0]; in FullConnectionInfer()
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/ |
D | layer_norm_grad_cpu_kernel.cc | 42 for (size_t i = 0; i < LongToSize(begin_norm_axis); i++) { in InitKernel() 45 for (size_t i = LongToSize(begin_norm_axis); i < x_shape.size(); i++) { in InitKernel() 48 for (size_t i = 0; i < LongToSize(begin_params_axis); i++) { in InitKernel() 51 for (size_t i = LongToSize(begin_params_axis); i < x_shape.size(); i++) { in InitKernel()
|
D | layer_norm_cpu_kernel.cc | 42 for (size_t i = 0; i < LongToSize(begin_norm_axis); i++) { in InitKernel() 45 for (size_t i = LongToSize(begin_norm_axis); i < x_shape.size(); i++) { in InitKernel() 48 for (size_t i = LongToSize(begin_params_axis); i < x_shape.size(); i++) { in InitKernel()
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/pass/ |
D | getitem_tuple.cc | 59 if (make_tuple->inputs().size() > LongToSize(index + 1)) { in Process() 60 auto ret = make_tuple->input(LongToSize(index + 1)); in Process()
|
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/ |
D | device_matrix.cc | 38 if (LongToSize(total) != dev_list_.size()) { in DeviceMatrix() 123 } else if ((element < 0) || (LongToSize(element) >= dev_shape_.size())) { in GetDevicesByTensorMap() 150 size_t index = dev_shape_.size() - LongToSize(map) - 1; in GetDevicesByTensorMap()
|