| /third_party/mindspore/mindspore-src/source/mindspore/lite/test/ut/nnacl/infer/ |
| D | split_infer_test.cc | 33 std::vector<TensorC *> outputs(3, NULL); in TEST_F() local 34 outputs[0] = new TensorC; in TEST_F() 35 outputs[1] = new TensorC; in TEST_F() 36 outputs[2] = new TensorC; in TEST_F() 43 …int ret = SplitInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.… in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_size_, 2); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[0], 5); in TEST_F() 48 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() 49 ASSERT_EQ(outputs[1]->shape_size_, 2); in TEST_F() 50 ASSERT_EQ(outputs[1]->shape_[0], 5); in TEST_F() [all …]
|
| D | unsqueeze_infer_test.cc | 33 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 34 outputs[0] = new TensorC; in TEST_F() 38 …UnsqueezeInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 41 ASSERT_EQ(outputs[0]->shape_size_, 2); in TEST_F() 42 ASSERT_EQ(outputs[0]->shape_[0], 1); in TEST_F() 43 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() 48 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 49 delete outputs[i]; in TEST_F() 59 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 60 outputs[0] = new TensorC; in TEST_F() [all …]
|
| D | reshape_infer_test.cc | 34 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 35 outputs[0] = new TensorC; in TEST_F() 39 …= ReshapeInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 42 ASSERT_EQ(outputs[0]->shape_size_, 1); in TEST_F() 43 ASSERT_EQ(outputs[0]->shape_[0], 6); in TEST_F() 48 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 49 delete outputs[i]; in TEST_F() 66 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 67 outputs[0] = new TensorC; in TEST_F() 71 …= ReshapeInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() [all …]
|
| D | pooling_infer_test.cc | 35 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 36 outputs[0] = new TensorC; in TEST_F() 49 …= PoolingInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 52 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 53 ASSERT_EQ(outputs[0]->shape_[0], 21); in TEST_F() 54 ASSERT_EQ(outputs[0]->shape_[1], 29); in TEST_F() 55 ASSERT_EQ(outputs[0]->shape_[2], 29); in TEST_F() 56 ASSERT_EQ(outputs[0]->shape_[3], 3); in TEST_F() 61 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 62 delete outputs[i]; in TEST_F() [all …]
|
| D | depthwise_conv2d_infer_test.cc | 41 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 42 outputs[0] = new TensorC; in TEST_F() 55 …iseConv2dInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 58 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 59 ASSERT_EQ(outputs[0]->shape_[0], 5); in TEST_F() 60 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() 61 ASSERT_EQ(outputs[0]->shape_[2], 4); in TEST_F() 62 ASSERT_EQ(outputs[0]->shape_[3], 6); in TEST_F() 67 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 68 delete outputs[i]; in TEST_F() [all …]
|
| D | conv2d_infer_test.cc | 41 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 42 outputs[0] = new TensorC; in TEST_F() 54 … = Conv2dInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 57 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 58 ASSERT_EQ(outputs[0]->shape_[0], 5); in TEST_F() 59 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() 60 ASSERT_EQ(outputs[0]->shape_[2], 4); in TEST_F() 61 ASSERT_EQ(outputs[0]->shape_[3], 20); in TEST_F() 66 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 67 delete outputs[i]; in TEST_F() [all …]
|
| D | gather_infer_test.cc | 38 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 39 outputs[0] = new TensorC; in TEST_F() 42 … = GatherInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[0], 2); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[1], 3); in TEST_F() 48 ASSERT_EQ(outputs[0]->shape_[2], 2); in TEST_F() 49 ASSERT_EQ(outputs[0]->shape_[3], 3); in TEST_F() 54 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 55 delete outputs[i]; in TEST_F() [all …]
|
| D | fill_infer_test.cc | 36 std::vector<TensorC *> outputs(inputs_size, NULL); in TEST_F() local 37 outputs[0] = new TensorC; in TEST_F() 39 …int ret = FillInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.s… in TEST_F() 42 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 43 ASSERT_EQ(outputs[0]->shape_[0], 1); in TEST_F() 44 ASSERT_EQ(outputs[0]->shape_[1], 2); in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_[2], 3); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[3], 4); in TEST_F() 51 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 52 delete outputs[i]; in TEST_F() [all …]
|
| D | depth_to_space_infer_test.cc | 37 std::vector<TensorC *> outputs(inputs_size, NULL); in TEST_F() local 38 outputs[0] = new TensorC; in TEST_F() 41 …thToSpaceInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 44 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_[0], 1); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[1], 2); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[2], 2); in TEST_F() 48 ASSERT_EQ(outputs[0]->shape_[3], 3); in TEST_F() 53 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 54 delete outputs[i]; in TEST_F() [all …]
|
| D | gru_infer_test.cc | 46 std::vector<TensorC *> outputs(2, NULL); in TEST_F() local 47 outputs[0] = new TensorC; in TEST_F() 48 outputs[1] = new TensorC; in TEST_F() 52 …int ret = GruInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.si… in TEST_F() 54 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 55 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 56 ASSERT_EQ(outputs[0]->shape_[1], 2); in TEST_F() 57 ASSERT_EQ(outputs[0]->shape_[2], 5); in TEST_F() 58 ASSERT_EQ(outputs[0]->shape_[3], 3); in TEST_F() 59 ASSERT_EQ(outputs[0]->data_type_, kNumberTypeInt32); in TEST_F() [all …]
|
| D | batch_to_space_infer_test.cc | 38 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 39 outputs[0] = new TensorC; in TEST_F() 47 …chToSpaceInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 50 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 51 ASSERT_EQ(outputs[0]->shape_[0], 1); in TEST_F() 52 ASSERT_EQ(outputs[0]->shape_[1], 2); in TEST_F() 53 ASSERT_EQ(outputs[0]->shape_[2], 2); in TEST_F() 54 ASSERT_EQ(outputs[0]->shape_[3], 1); in TEST_F() 55 ASSERT_EQ(outputs[0]->data_type_, kNumberTypeInt32); in TEST_F() 56 ASSERT_EQ(outputs[0]->format_, Format_NHWC); in TEST_F() [all …]
|
| D | concat_infer_test.cc | 37 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 38 outputs[0] = new TensorC; in TEST_F() 41 … = ConcatInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 44 ASSERT_EQ(outputs[0]->shape_size_, 2); in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_[0], 6); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[1], 4); in TEST_F() 51 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 52 delete outputs[i]; in TEST_F() 67 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 68 outputs[0] = new TensorC; in TEST_F() [all …]
|
| D | expand_dims_infer_test.cc | 37 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 38 outputs[0] = new TensorC; in TEST_F() 41 …ExpandDimsInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(… in TEST_F() 43 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 44 ASSERT_EQ(outputs[0]->shape_[0], 1); in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_[1], 10); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[2], 10); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[3], 3); in TEST_F() 48 ASSERT_EQ(outputs[0]->data_type_, kNumberTypeInt32); in TEST_F() 49 ASSERT_EQ(outputs[0]->format_, Format_NHWC); in TEST_F() [all …]
|
| D | gather_nd_infer_test.cc | 39 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 40 outputs[0] = new TensorC; in TEST_F() 42 … GatherNdInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_size_, 2); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[0], 2); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[1], 3); in TEST_F() 52 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 53 delete outputs[i]; in TEST_F() 70 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 71 outputs[0] = new TensorC; in TEST_F() [all …]
|
| D | pad_infer_test.cc | 39 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 40 outputs[0] = new TensorC; in TEST_F() 42 …int ret = PadInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.si… in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_size_, 2); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[1], 7); in TEST_F() 52 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 53 delete outputs[i]; in TEST_F() 64 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 65 outputs[0] = new TensorC; in TEST_F() [all …]
|
| D | detection_post_process_infer_test.cc | 41 std::vector<TensorC *> outputs(4, NULL); in TEST_F() local 42 outputs[0] = new TensorC; in TEST_F() 43 outputs[1] = new TensorC; in TEST_F() 44 outputs[2] = new TensorC; in TEST_F() 45 outputs[3] = new TensorC; in TEST_F() 50 …int ret = DetectionPostProcessInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.d… in TEST_F() 51 … outputs.size(), reinterpret_cast<OpParameter *>(parameter)); in TEST_F() 53 ASSERT_EQ(outputs[0]->shape_size_, 3); in TEST_F() 54 ASSERT_EQ(outputs[0]->shape_[0], 1); in TEST_F() 55 ASSERT_EQ(outputs[0]->shape_[1], 60); in TEST_F() [all …]
|
| D | select_infer_test.cc | 30 * outputs[0].shape: [4, 5, 6 ,7] 46 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 47 outputs[0] = new TensorC; in TEST_F() 49 … = SelectInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 52 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 53 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 54 ASSERT_EQ(outputs[0]->shape_[1], 5); in TEST_F() 55 ASSERT_EQ(outputs[0]->shape_[2], 6); in TEST_F() 56 ASSERT_EQ(outputs[0]->shape_[3], 7); in TEST_F() 57 ASSERT_EQ(outputs[0]->data_type_, kNumberTypeInt32); in TEST_F() [all …]
|
| D | flatten_infer_test.cc | 35 std::vector<TensorC *> outputs(inputs_size, NULL); in TEST_F() local 36 outputs[0] = new TensorC; in TEST_F() 38 …lattenInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), p… in TEST_F() 40 ASSERT_EQ(outputs[0]->shape_size_, 2); in TEST_F() 41 ASSERT_EQ(outputs[0]->shape_[0], 5); in TEST_F() 42 ASSERT_EQ(outputs[0]->shape_[1], 24); in TEST_F() 47 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 48 delete outputs[i]; in TEST_F() 60 std::vector<TensorC *> outputs(inputs_size, NULL); in TEST_F() local 61 outputs[0] = new TensorC; in TEST_F() [all …]
|
| D | reduce_infer_test.cc | 38 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 39 outputs[0] = new TensorC; in TEST_F() 43 … = ReduceInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_size_, 1); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[0], 2); in TEST_F() 52 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 53 delete outputs[i]; in TEST_F() 69 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 70 outputs[0] = new TensorC; in TEST_F() 74 … = ReduceInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() [all …]
|
| D | custom_extract_features_infer_test.cc | 36 std::vector<TensorC *> outputs(2, NULL); in TEST_F() local 37 outputs[0] = new TensorC; in TEST_F() 38 outputs[1] = new TensorC; in TEST_F() 40 …int ret = CustomExtractFeaturesInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.… in TEST_F() 41 … outputs.size(), reinterpret_cast<OpParameter *>(parameter)); in TEST_F() 43 ASSERT_EQ(outputs[0]->shape_size_, 1); in TEST_F() 44 ASSERT_EQ(outputs[0]->shape_[0], 3); in TEST_F() 45 ASSERT_EQ(outputs[0]->data_type_, kNumberTypeInt32); in TEST_F() 46 ASSERT_EQ(outputs[0]->format_, Format_NHWC); in TEST_F() 47 ASSERT_EQ(outputs[1]->shape_size_, 1); in TEST_F() [all …]
|
| D | space_to_batch_nd_infer_test.cc | 37 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 38 outputs[0] = new TensorC; in TEST_F() 47 …ToBatchNdInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 50 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 51 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 52 ASSERT_EQ(outputs[0]->shape_[1], 1); in TEST_F() 53 ASSERT_EQ(outputs[0]->shape_[2], 1); in TEST_F() 54 ASSERT_EQ(outputs[0]->shape_[3], 1); in TEST_F() 59 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 60 delete outputs[i]; in TEST_F() [all …]
|
| D | resize_infer_test.cc | 36 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 37 outputs[0] = new TensorC; in TEST_F() 41 … = ResizeInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 44 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 45 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 46 ASSERT_EQ(outputs[0]->shape_[1], 3); in TEST_F() 47 ASSERT_EQ(outputs[0]->shape_[2], 2); in TEST_F() 48 ASSERT_EQ(outputs[0]->shape_[3], 5); in TEST_F() 53 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 54 delete outputs[i]; in TEST_F() [all …]
|
| D | space_to_batch_infer_test.cc | 36 std::vector<TensorC *> outputs(1, NULL); in TEST_F() local 37 outputs[0] = new TensorC; in TEST_F() 46 …ceToBatchInferShape((const TensorC **)inputs.data(), inputs.size(), outputs.data(), outputs.size(), in TEST_F() 49 ASSERT_EQ(outputs[0]->shape_size_, 4); in TEST_F() 50 ASSERT_EQ(outputs[0]->shape_[0], 4); in TEST_F() 51 ASSERT_EQ(outputs[0]->shape_[1], 1); in TEST_F() 52 ASSERT_EQ(outputs[0]->shape_[2], 1); in TEST_F() 53 ASSERT_EQ(outputs[0]->shape_[3], 1); in TEST_F() 58 for (size_t i = 0; i < outputs.size(); i++) { in TEST_F() 59 delete outputs[i]; in TEST_F() [all …]
|
| /third_party/mindspore/mindspore-src/source/mindspore/ccsrc/frontend/parallel/auto_parallel/ |
| D | operator_costmodel.h | 72 …l double GetCommCost(const std::vector<TensorInfo> &inputs, const std::vector<TensorInfo> &outputs, 74 …e GetForwardCommCost(const std::vector<TensorInfo> &inputs, const std::vector<TensorInfo> &outputs, 76 … GetBackwardCommCost(const std::vector<TensorInfo> &inputs, const std::vector<TensorInfo> &outputs, 79 …e GetComputationCost(const std::vector<TensorInfo> &inputs, const std::vector<TensorInfo> &outputs, 82 … const std::vector<TensorInfo> &outputs, int64_t stage_id) const = 0; 84 … const std::vector<TensorInfo> &outputs, int64_t stage_id) const = 0; 91 …GetMemoryCost(const std::vector<TensorInfo> &inputs, const std::vector<TensorInfo> &outputs) const; 93 …putMemoryCost(const std::vector<TensorInfo> &inputs, const std::vector<TensorInfo> &outputs) const; 95 …putMemoryCost(const std::vector<TensorInfo> &inputs, const std::vector<TensorInfo> &outputs) const; 97 …oryCostForInference(const std::vector<TensorInfo> &, const std::vector<TensorInfo> &outputs) const; [all …]
|
| /third_party/mindspore/mindspore-src/source/tests/st/ops/cpu/ |
| D | test_split_op.py | 45 outputs = op_wrapper(input_x) 47 print(outputs) 48 assert outputs[0].shape == (2, 2, 6) 49 assert np.allclose(outputs[0].asnumpy()[0, 0, :], [0, 1, 2, 3, 4, 5]) 60 outputs = op_wrapper(input_x) 62 print(outputs) 63 assert outputs[0].shape == (2, 2, 3) 64 assert outputs[1].shape == (2, 2, 3) 65 assert np.allclose(outputs[0].asnumpy()[0, 0, :], [0, 1, 2]) 66 assert np.allclose(outputs[1].asnumpy()[0, 0, :], [3, 4, 5]) [all …]
|