Home
last modified time | relevance | path

Searched refs:slice_shape (Results 1 – 25 of 43) sorted by relevance

12

/third_party/mindspore/mindspore/ccsrc/frontend/parallel/tensor_layout/
Dtensor_redistribution.cc57 if (from_repeat.slice_shape().array() != to_repeat.slice_shape().array()) { in InferTensorRedistributionOperatorListUnExpand()
60 constructor.UpdateTensorShape(from_repeat.slice_shape().array()); in InferTensorRedistributionOperatorListUnExpand()
61 Arrangement shape = to_repeat.slice_shape(); in InferTensorRedistributionOperatorListUnExpand()
132 if (from_origin_.slice_shape().array() != to_origin_.slice_shape().array() || keep_reshape_) { in InferReshape()
134 constructor.UpdateTensorShape(from_origin_.slice_shape().array()); in InferReshape()
135 Arrangement shape = to_origin_.slice_shape(); in InferReshape()
147 if (from_origin_.slice_shape().array() != from_layout.slice_shape().array()) { in InferReshape()
149 constructor.UpdateTensorShape(from_origin_.slice_shape().array()); in InferReshape()
150 Arrangement shape = from_layout.slice_shape(); in InferReshape()
160 if (to_origin_.slice_shape().array() != to_layout.slice_shape().array()) { in InferReshape()
[all …]
Dtensor_info.h35 TensorInfo(const TensorLayout &tensor_layout, Shape shape, Shape slice_shape) in TensorInfo() argument
36 … : tensor_layout_(tensor_layout), shape_(std::move(shape)), slice_shape_(std::move(slice_shape)) {} in TensorInfo()
39 slice_shape_ = tensor_layout.slice_shape().array(); in TensorInfo()
45 Shape slice_shape() const { return slice_shape_; } in slice_shape() function
Dredistribution_operator_infer.cc48 constructor_.UpdateTensorShape(cur_tensor_layout_.slice_shape().array()); in Init()
193 OperatorC op_cost = std::make_pair(op, cur_tensor_layout_.slice_shape().array()); in InsertOperator()
209 constructor_.UpdateTensorShape(cur_tensor_layout_.slice_shape().array()); in InsertOperator()
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/auto_parallel/
Doperator_costmodel.cc52 result += ListProduct(inputs[i].slice_shape()) * static_cast<double>(inputs_type_lengths_[i]); in GetInputMemoryCost()
64 … result += ListProduct(outputs[i].slice_shape()) * static_cast<double>(outputs_type_lengths_[i]); in GetOutputMemoryCost()
78 … result += ListProduct(outputs[i].slice_shape()) * static_cast<double>(outputs_type_lengths_[i]); in GetMemoryCostForInference()
90 Shape input0_slice_shape = input0.slice_shape(); in GetForwardCommCost()
96 return ListProduct(output0.slice_shape()) * static_cast<double>(outputs_type_lengths_[0]); in GetForwardCommCost()
113 Shape input1_slice_shape = input1.slice_shape(); in GetBackwardCommCost()
133 Shape input0_slice_shape = inputs[0].slice_shape(); in GetForwardComputationCost()
134 Shape input1_slice_shape = inputs[1].slice_shape(); in GetForwardComputationCost()
138 result += ListProduct(output0.slice_shape()) * static_cast<double>(outputs_type_lengths_[0]); in GetForwardComputationCost()
158 Shape input1_slice_shape = input1.slice_shape(); in GetBackwardComputationCost()
[all …]
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/
Dparameter_manager.cc237 parameter_slice_info.slice_shape = tensor_info.slice_shape(); in GetParameterSliceInfo()
240 << ", the slice shape is " << tensor_info.slice_shape() << ", the origin shape is " in GetParameterSliceInfo()
257 Shape first_user_slice_shape = parameter_slice_info.slice_shape; in CheckParameterSplit()
263 Shape user_slice_shape = user_slice_info.slice_shape; in CheckParameterSplit()
362 Shape slice_shape = parameter_shape[0]; in HandleNoUsedParameter() local
363 if (slice_shape.empty()) { in HandleNoUsedParameter()
366 slice_shape[0] = slice_shape[0] / dev_num; in HandleNoUsedParameter()
367 auto slice_shape_ptr = std::make_shared<abstract::Shape>(slice_shape); in HandleNoUsedParameter()
514 auto slice_shape = cloned_from_parameter->user_data<TensorLayout>()->slice_shape().array(); in SetClonedTensorShapeForOptimizer() local
515 …d::shared_ptr<abstract::BaseShape> parallel_shape = std::make_shared<abstract::Shape>(slice_shape); in SetClonedTensorShapeForOptimizer()
[all …]
/third_party/mindspore/tests/ut/cpp/parallel/ops_info/
Donehot_info_test_axis_0.cc139 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
140 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
161 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
162 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
183 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
184 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Donehot_info_test.cc139 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
140 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
161 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
162 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
183 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
184 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dsoftmax_entropy_loss_info_test.cc95 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
96 Shape label_slice_shape = label_tensor_info.slice_shape(); in TEST_F()
97 Shape output_0_slice_shape = output_0_tensor_info.slice_shape(); in TEST_F()
98 Shape output_1_slice_shape = output_1_tensor_info.slice_shape(); in TEST_F()
Dmatmul_info_test.cc259 Shape mat_a_slice_shape = mat_a_tensor_info.slice_shape(); in TEST_F()
260 Shape mat_b_slice_shape = mat_b_tensor_info.slice_shape(); in TEST_F()
261 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
285 Shape mat_a_slice_shape = mat_a_tensor_info.slice_shape(); in TEST_F()
286 Shape mat_b_slice_shape = mat_b_tensor_info.slice_shape(); in TEST_F()
287 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
311 Shape mat_a_slice_shape = mat_a_tensor_info.slice_shape(); in TEST_F()
312 Shape mat_b_slice_shape = mat_b_tensor_info.slice_shape(); in TEST_F()
313 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
595 Shape input1_slice_shape = input1_info.slice_shape(); in TEST_F()
Dreshape_test.cc106 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
107 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
127 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
128 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dprelu_test.cc93 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
94 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
198 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
199 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dtensor_add_info_test.cc94 Shape inputa_slice_shape = inputa_tensor_info.slice_shape(); in TEST_F()
95 Shape inputb_slice_shape = inputb_tensor_info.slice_shape(); in TEST_F()
96 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dtanh_info_test.cc90 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
91 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dlog_softmax_info_test.cc91 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
92 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dpow_info_test.cc90 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
91 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dgelu_info_test.cc90 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
91 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dsoftmax_info_test.cc95 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
96 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dactivation_info_test.cc91 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
92 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dl2_normalize_info_test.cc91 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
92 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dtmpidentity_test.cc92 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
93 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
Dtranspose_test.cc106 Shape input_slice_shape = input_tensor_info.slice_shape(); in TEST_F()
107 Shape output_slice_shape = output_tensor_info.slice_shape(); in TEST_F()
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/graph_util/
Dget_parallel_info.cc44 auto slice_shape = tensor_layout->slice_shape().array(); in GetParameterLayout() local
49 …py::make_tuple(device_arrangement, tensor_map, slice_shape, field_size, uniform_split, opt_shard_g… in GetParameterLayout()
/third_party/mindspore/tests/ut/python/parallel/
Dtest_initializer_weight_slice.py64 slice_shape = slice0.shape
71 assert expect_slice_shape == slice_shape
144 slice_shape = slice0.shape
151 assert expect_slice_shape == slice_shape
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/ops_info/
Dmatmul_info.cc540 Shape replica_input0_slice_shape(inputs_tensor_info_[0].slice_shape()); in InitTensorInfoForCost()
555 Shape replica_input1_slice_shape(inputs_tensor_info_[1].slice_shape()); in InitTensorInfoForCost()
580 auto slice_shape = one_input_tensor.slice_shape(); in CheckForTensorSliceValid() local
581 if ((LongToSize(slice_shape[LAST_INDEX(slice_shape.size())]) % align_size != 0) || in CheckForTensorSliceValid()
582 (LongToSize(slice_shape[SECOND_FROM_END(slice_shape.size())]) % align_size != 0)) { in CheckForTensorSliceValid()
Dreshape_info.cc131 replace_op_ = constructor.SkipRedisReshapeOP(output_layout_.slice_shape().array()); in ComputeReplaceOp()
134 << ShapeToString(output_layout_.slice_shape().array()); in ComputeReplaceOp()
246 Shape slice_shape; in InferTensorInfo() local
248 TensorInfo tensor_info_in(layout, shape, slice_shape); in InferTensorInfo()

12