/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/opencl/ |
D | one_hot_tests.cc | 39 std::vector<int> output_shape = input_shape; in TEST_F() local 40 …output_shape.insert(output_shape.begin() + (axis + input_shape.size() + 1) % (input_shape.size() +… in TEST_F() 49 {output_shape, output_data}, param, fp16_enable); in TEST_F() 59 std::vector<int> output_shape = input_shape; in TEST_F() local 60 …output_shape.insert(output_shape.begin() + (axis + input_shape.size() + 1) % (input_shape.size() +… in TEST_F() 70 {output_shape, output_data}, param, fp16_enable); in TEST_F() 80 std::vector<int> output_shape = input_shape; in TEST_F() local 81 …output_shape.insert(output_shape.begin() + (axis + input_shape.size() + 1) % (input_shape.size() +… in TEST_F() 93 {output_shape, output_data}, param, fp16_enable); in TEST_F() 103 std::vector<int> output_shape = input_shape; in TEST_F() local [all …]
|
D | space_to_depth_tests.cc | 44 std::vector<int> output_shape = {1, 1, 1, 16}; in TEST_F() local 50 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 57 std::vector<int> output_shape = {1, 2, 2, 16}; in TEST_F() local 67 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 74 std::vector<int> output_shape = {1, 2, 2, 36}; in TEST_F() local 94 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 101 std::vector<int> output_shape = {1, 1, 1, 4}; in TEST_F() local 107 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 114 std::vector<int> output_shape = {1, 1, 1, 12}; in TEST_F() local 122 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() [all …]
|
D | argminmax_tests.cc | 44 std::vector<int> output_shape = {2, 2, 2, 2}; in TEST_F() local 49 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 59 std::vector<int> output_shape = {2, 2, 2, 2}; in TEST_F() local 64 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 74 std::vector<int> output_shape = {2, 2, 2, 3}; in TEST_F() local 80 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 90 std::vector<int> output_shape = {2, 2, 2, 3}; in TEST_F() local 97 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 107 std::vector<int> output_shape = {2, 3, 1, 3}; in TEST_F() local 114 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() [all …]
|
D | transpose_tests.cc | 40 std::vector<int> output_shape; in TEST_F() local 42 output_shape.push_back(input_shape[axis]); in TEST_F() 51 {output_shape, output_data}, param, fp16_enable); in TEST_F() 58 std::vector<int> output_shape; in TEST_F() local 60 output_shape.push_back(input_shape[axis]); in TEST_F() 69 {output_shape, output_data}, param, fp16_enable); in TEST_F() 76 std::vector<int> output_shape; in TEST_F() local 78 output_shape.push_back(input_shape[axis]); in TEST_F() 87 {output_shape, output_data}, param, fp16_enable); in TEST_F() 94 std::vector<int> output_shape; in TEST_F() local [all …]
|
D | fullconnection_tests.cc | 26 … std::vector<int> *bias_shape, std::vector<int> *output_shape, int ndim, int ci, int co, in CreateParameter() argument 36 *output_shape = {1, co}; in CreateParameter() 41 *output_shape = {n, co}; in CreateParameter() 46 *output_shape = {n, co}; in CreateParameter() 64 std::vector<int> input_shape, weight_shape, bias_shape, output_shape; variable 65 …auto *param = CreateParameter(&input_shape, &weight_shape, &bias_shape, &output_shape, ndim, ci, c… 69 {output_shape, output_data}, param, fp16_enable); 86 std::vector<int> input_shape, weight_shape, bias_shape, output_shape; variable 87 …auto *param = CreateParameter(&input_shape, &weight_shape, &bias_shape, &output_shape, ndim, ci, c… 91 {output_shape, output_data}, param, fp16_enable); [all …]
|
D | conv2d_transpose_tests.cc | 27 std::vector<int> *bias_shape, std::vector<int> *output_shape) { in CreateParameter() argument 46 *output_shape = {1, oh, ow, co}; in CreateParameter() 68 std::vector<int> input_shape, weight_shape, bias_shape, output_shape; in TEST_F() local 70 …ter(n, h, w, ci, co, kh, kw, pad, oh, ow, &input_shape, &weight_shape, &bias_shape, &output_shape); in TEST_F() 74 {output_shape, output_data}, param, fp16_enable); in TEST_F() 96 std::vector<int> input_shape, weight_shape, bias_shape, output_shape; in TEST_F() local 98 …ter(n, h, w, ci, co, kh, kw, pad, oh, ow, &input_shape, &weight_shape, &bias_shape, &output_shape); in TEST_F() 102 {output_shape, output_data}, param, fp16_enable); in TEST_F() 124 std::vector<int> input_shape, weight_shape, bias_shape, output_shape; in TEST_F() local 126 …ter(n, h, w, ci, co, kh, kw, pad, oh, ow, &input_shape, &weight_shape, &bias_shape, &output_shape); in TEST_F() [all …]
|
D | concat_tests.cc | 35 std::vector<int> output_shape = {2, 1, 1, 8}; in TEST_F() local 42 …TestMain({{input0_shape, input0_data, VAR}, {input1_shape, input1_data, VAR}}, {output_shape, outp… in TEST_F() 50 std::vector<int> output_shape = {2}; in TEST_F() local 57 …TestMain({{input0_shape, input0_data, VAR}, {input1_shape, input1_data, VAR}}, {output_shape, outp… in TEST_F() 65 std::vector<int> output_shape = {2, 4, 2, 8}; in TEST_F() local 85 …TestMain({{input0_shape, input0_data, VAR}, {input1_shape, input1_data, VAR}}, {output_shape, outp… in TEST_F() 97 std::vector<int> output_shape = {2, 18, 2, 8}; in TEST_F() local 181 {output_shape, output_data}, param, fp16_enable, fp16_enable ? 1e-3 : 1e-9); in TEST_F() 192 std::vector<int> output_shape = {1, 1, 48}; in TEST_F() local 212 {output_shape, output_data}, param, fp16_enable, fp16_enable ? 1e-3 : 1e-9); in TEST_F() [all …]
|
D | softmax_tests.cc | 35 std::vector<int> output_shape = input_shape; variable 41 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable, 49 std::vector<int> output_shape = input_shape; variable 55 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable, 63 std::vector<int> output_shape = input_shape; variable 69 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable, 77 std::vector<int> output_shape = input_shape; variable 84 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable, 92 std::vector<int> output_shape = input_shape; variable 99 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable, [all …]
|
D | arithmetic_tests.cc | 61 std::vector<int> output_shape = {1, 2, 2, 3}; in TEST_F() local 68 …_shape, input0_data, VAR}, {input1_shape, input1_data, CONST_TENSOR}}, {output_shape, output_data}, in TEST_F() 76 std::vector<int> output_shape = {1, 2, 2, 3}; in TEST_F() local 82 …_shape, input0_data, VAR}, {input1_shape, input1_data, CONST_TENSOR}}, {output_shape, output_data}, in TEST_F() 90 std::vector<int> output_shape = {1, 2, 2, 3}; in TEST_F() local 97 …_shape, input0_data, VAR}, {input1_shape, input1_data, CONST_TENSOR}}, {output_shape, output_data}, in TEST_F() 105 std::vector<int> output_shape = {1, 2, 2, 3}; in TEST_F() local 111 …_shape, input0_data, VAR}, {input1_shape, input1_data, CONST_TENSOR}}, {output_shape, output_data}, in TEST_F() 119 std::vector<int> output_shape = {2, 2, 2, 3}; in TEST_F() local 125 …_shape, input0_data, VAR}, {input1_shape, input1_data, CONST_TENSOR}}, {output_shape, output_data}, in TEST_F() [all …]
|
D | gather_tests.cc | 34 std::vector<int> output_shape = {5}; in TEST_F() local 46 {output_shape, output_data}, param, fp16_enable); in TEST_F() 53 std::vector<int> output_shape = {1}; in TEST_F() local 65 {output_shape, output_data}, param, fp16_enable); in TEST_F() 72 std::vector<int> output_shape = {1}; in TEST_F() local 84 {output_shape, output_data}, param, fp16_enable, fp16_enable ? 1e-3 : 1e-9); in TEST_F() 91 std::vector<int> output_shape = {1, 2, 4, 4}; in TEST_F() local 114 {output_shape, output_data}, param, fp16_enable); in TEST_F() 122 std::vector<int> output_shape = {1, 2, 4, 4}; in TEST_F() local 145 {output_shape, output_data}, param, fp16_enable, fp16_enable ? 1e-3 : 1e-9); in TEST_F() [all …]
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/cl/ |
D | arithmeticself.cl | 20 int4 output_shape) { 24 if (X >= output_shape.x * output_shape.y || Y >= output_shape.z || Z >= output_shape.w) { 27 FLT4 result = READ_IMAGE(input0, smp_none, (int2)((Y)*output_shape.w + Z, (X))); 32 WRITE_IMAGE(output, (int2)((Y)*output_shape.w + Z, (X)), result); 36 int4 output_shape) { 40 if (X >= output_shape.x * output_shape.y || Y >= output_shape.z || Z >= output_shape.w) { 43 FLT4 result = READ_IMAGE(input0, smp_none, (int2)((Y)*output_shape.w + Z, (X))); 48 WRITE_IMAGE(output, (int2)((Y)*output_shape.w + Z, (X)), result); 52 int4 output_shape) { 56 if (X >= output_shape.x * output_shape.y || Y >= output_shape.z || Z >= output_shape.w) { [all …]
|
D | arithmetic.cl | 21 const int2 output_shape, float act_min, float act_max) { 24 if (X >= output_shape.x || Y >= output_shape.y) { 36 const int2 output_shape, float act_min, float act_max) { 39 if (X >= output_shape.x || Y >= output_shape.y) { 51 const int2 output_shape, float act_min, float act_max) { 54 if (X >= output_shape.x || Y >= output_shape.y) { 66 const int2 output_shape, float act_min, float act_max) { 69 if (X >= output_shape.x || Y >= output_shape.y) { 81 … __write_only image2d_t output, const int2 output_shape, float act_min, float act_max) { 84 if (X >= output_shape.x || Y >= output_shape.y) { [all …]
|
D | stack.cl | 24 if (X >= output_shape.x * output_shape.y || Y >= output_shape.z || Z >= output_shape.w) { \ 31 … __write_only image2d_t output, int4 input_shape, int4 output_shape) { 34 if (X >= output_shape.x * output_shape.y || Y >= output_shape.z * output_shape.w) { 49 … __write_only image2d_t output, int4 input_shape, int4 output_shape) { 51 int IN = X / output_shape.y; 52 int IH = X % output_shape.y; 63 WRITE_IMAGE(output, (int2)((Y)*output_shape.w + Z, (IN * output_shape.y + IH)), result); 68 … __write_only image2d_t output, int4 input_shape, int4 output_shape) { 70 int IN = X / output_shape.y; 71 int IH = X % output_shape.y; [all …]
|
D | power.cl | 24 …if (X >= output_shape.x * output_shape.y || Y >= output_shape.z || Z >= output_shape.w || output_s… 43 int4 output_shape, FLT4 parameter) { 45 int n = X / output_shape.y; 46 int h = X % output_shape.y; 48 …FLT4 result0 = READ_IMAGE(input0, smp_none, (int2)((Y)*output_shape.w + Z, (n * output_shape.y + h… 49 …FLT4 result1 = READ_IMAGE(input1, smp_none, (int2)((Y)*output_shape.w + Z, (n * output_shape.y + h… 68 WRITE_IMAGE(output, (int2)((Y)*output_shape.w + Z, (n * output_shape.y + h)), result); 71 …void power_broadcast(__read_only image2d_t input, __write_only image2d_t output, int4 output_shape, 74 int n = X / output_shape.y; 75 int h = X % output_shape.y; [all …]
|
D | pooling2d.cl | 23 … const int4 output_shape, const int2 stride, const int2 kernel_size, 29 int N = X / output_shape.y; 30 X = X % output_shape.y; 32 if (N >= output_shape.x || X >= output_shape.y || Y >= output_shape.z || Z >= output_shape.w) { 54 …WRITE_IMAGE(output, (int2)(Y * output_shape.w + Z, N * output_shape.y + X), max(result, (FLT4)(0.f… 56 WRITE_IMAGE(output, (int2)(Y * output_shape.w + Z, N * output_shape.y + X), result); 61 … const int4 output_shape, const int2 stride, const int2 kernel_size, 67 int N = X / output_shape.y; 68 X = X % output_shape.y; 70 if (N >= output_shape.x || X >= output_shape.y || Y >= output_shape.z || Z >= output_shape.w) { [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/ |
D | transpose_fp32.c | 20 const int *output_shape) { in TransposeDim2Fp32() argument 23 const int output0 = output_shape[0]; in TransposeDim2Fp32() 24 const int output1 = output_shape[1]; in TransposeDim2Fp32() 35 const int *perm, const int *output_shape) { in TransposeDim3Fp32() argument 41 const int output0 = output_shape[0]; in TransposeDim3Fp32() 42 const int output1 = output_shape[1]; in TransposeDim3Fp32() 43 const int output2 = output_shape[2]; in TransposeDim3Fp32() 58 const int *perm, const int *output_shape) { in TransposeDim4Fp32() argument 66 const int output0 = output_shape[0]; in TransposeDim4Fp32() 67 const int output1 = output_shape[1]; in TransposeDim4Fp32() [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp16/ |
D | transpose_fp16.c | 22 const int *perm, const int *output_shape) { in Fp16TransposeDim2() argument 25 const int output0 = output_shape[0]; in Fp16TransposeDim2() 26 const int output1 = output_shape[1]; in Fp16TransposeDim2() 37 const int *perm, const int *output_shape) { in Fp16TransposeDim3() argument 43 const int output0 = output_shape[0]; in Fp16TransposeDim3() 44 const int output1 = output_shape[1]; in Fp16TransposeDim3() 45 const int output2 = output_shape[2]; in Fp16TransposeDim3() 60 const int *perm, const int *output_shape) { in Fp16TransposeDim4() argument 68 const int output0 = output_shape[0]; in Fp16TransposeDim4() 69 const int output1 = output_shape[1]; in Fp16TransposeDim4() [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/ |
D | transpose_int8.c | 19 const int *perm, const int *output_shape) { in TransposeDim2Int8() argument 22 const int output0 = output_shape[0]; in TransposeDim2Int8() 23 const int output1 = output_shape[1]; in TransposeDim2Int8() 35 const int *perm, const int *output_shape) { in TransposeDim3Int8() argument 41 const int output0 = output_shape[0]; in TransposeDim3Int8() 42 const int output1 = output_shape[1]; in TransposeDim3Int8() 43 const int output2 = output_shape[2]; in TransposeDim3Int8() 58 const int *perm, const int *output_shape) { in TransposeDim4Int8() argument 66 const int output0 = output_shape[0]; in TransposeDim4Int8() 67 const int output1 = output_shape[1]; in TransposeDim4Int8() [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/base/ |
D | transpose_base.h | 27 int DoTransposeUInt8(const uint8_t *in_data, uint8_t *out_data, const int *output_shape, 29 int DoTransposeUInt16(const uint16_t *in_data, uint16_t *out_data, const int *output_shape, 31 int DoTransposeUInt32(const uint32_t *in_data, uint32_t *out_data, const int *output_shape, 33 int DoTransposeUInt64(const uint64_t *in_data, uint64_t *out_data, const int *output_shape, 35 int DoTransposeInt16(const int16_t *in_data, int16_t *out_data, const int *output_shape, 37 int DoTransposeInt32(const int32_t *in_data, int32_t *out_data, const int *output_shape, 39 int DoTransposeInt64(const int64_t *in_data, int64_t *out_data, const int *output_shape, 41 int DoTransposeBool(const bool *in_data, bool *out_data, const int *output_shape, 44 void TransposeDimsUInt8(const uint8_t *in_data, uint8_t *out_data, const int *output_shape, 46 void TransposeDimsUInt16(const uint16_t *in_data, uint16_t *out_data, const int *output_shape, [all …]
|
D | transpose_base.c | 22 … const int *perm, const int *output_shape) { \ 25 …const int output0 = output_shape[0]; … 26 …const int output1 = output_shape[1]; … 38 … const int *perm, const int *output_shape) { \ 44 …const int output0 = output_shape[0]; … 45 …const int output1 = output_shape[1]; … 46 …const int output2 = output_shape[2]; … 62 … const int *perm, const int *output_shape) { \ 70 …const int output0 = output_shape[0]; … 71 …const int output1 = output_shape[1]; … [all …]
|
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/fp32/ |
D | resize_bilinear_fp32_tests.cc | 29 …void Prepare(const std::vector<int> &input_shape, const std::vector<int> &output_shape, float *inp… 53 …izeBilinearFp32::Prepare(const std::vector<int> &input_shape, const std::vector<int> &output_shape, in Prepare() argument 60 out_tensor_.set_shape(output_shape); in Prepare() 65 …{}, static_cast<int>(schema::ResizeMethod_LINEAR), output_shape[1], output_shape[2], align_corners… in Prepare() 83 std::vector<int> output_shape = {1, 1, 1, 1}; in TEST_F() local 88 Prepare(input_shape, output_shape, input_data, output_data, align_corners, 1); in TEST_F() 100 std::vector<int> output_shape = {1, 1, 1, 1}; in TEST_F() local 105 Prepare(input_shape, output_shape, input_data, output_data, align_corners, 1); in TEST_F() 117 std::vector<int> output_shape = {1, 1, 2, 1}; in TEST_F() local 122 Prepare(input_shape, output_shape, input_data, output_data, align_corners, 1); in TEST_F() [all …]
|
D | resize_nearest_neighbor_fp32_tests.cc | 26 …void Prepare(const std::vector<int> &input_shape, const std::vector<int> &output_shape, float *inp… 50 …estNeighborFp32::Prepare(const std::vector<int> &input_shape, const std::vector<int> &output_shape, in Prepare() argument 56 out_tensor_.set_shape(output_shape); in Prepare() 61 …{}, static_cast<int>(schema::ResizeMethod_NEAREST), output_shape[1], output_shape[2], align_corner… in Prepare() 78 std::vector<int> output_shape = {1, 1, 1, 1}; in TEST_F() local 83 Prepare(input_shape, output_shape, input_data, output_data, align_corners, 1); in TEST_F() 95 std::vector<int> output_shape = {1, 1, 1, 1}; in TEST_F() local 100 Prepare(input_shape, output_shape, input_data, output_data, align_corners, 1); in TEST_F() 112 std::vector<int> output_shape = {1, 1, 2, 1}; in TEST_F() local 117 Prepare(input_shape, output_shape, input_data, output_data, align_corners, 1); in TEST_F() [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/ |
D | dynamic_range_impl.cu | 24 int64_t *output_shape, DynamicRangeErrorCode *error_code, in ValidateInputAndInferShape() argument 60 *output_shape = real_output_shape; in ValidateInputAndInferShape() 65 …e(const T *range_start, const T *range_end, const T *range_delta, T *output, int64_t *output_shape, in Range() argument 71 for (; gt_id < *output_shape; gt_id += blockDim.x * gridDim.x) { in Range() 78 int64_t *output_shape, DynamicRangeErrorCode *error_code, in CudaValidateInputAndInferShape() argument 80 …InferShape<<<1, 1, 0, cuda_stream>>>(range_start, range_end, range_delta, output_shape, error_code, in CudaValidateInputAndInferShape() 85 …e(const T *range_start, const T *range_end, const T *range_delta, T *output, int64_t *output_shape, in CalRange() argument 88 … output, output_shape, max_output_size); in CalRange() 92 … int64_t *output_shape, DynamicRangeErrorCode *error_code, 95 … const int64_t *range_delta, int64_t *output_shape, [all …]
|
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/int8/ |
D | reduce_int8_tests.cc | 101 std::vector<int> output_shape = {2, 4, 4, 1}; in TEST_F() local 107 …Prepare(input_shape, output_shape, input_data, output_data, ReduceMode_ReduceMean, axes, num_axes); in TEST_F() 126 std::vector<int> output_shape = {1}; in TEST_F() local 130 …Prepare(input_shape, output_shape, input_data, output_data, ReduceMode_ReduceMean, axes, num_axes); in TEST_F() 149 std::vector<int> output_shape = {2, 4, 4, 1}; in TEST_F() local 154 Prepare(input_shape, output_shape, input_data, output_data, ReduceMode_ReduceSum, axes, num_axes); in TEST_F() 173 std::vector<int> output_shape = {1}; in TEST_F() local 177 Prepare(input_shape, output_shape, input_data, output_data, ReduceMode_ReduceSum, axes, num_axes); in TEST_F() 195 std::vector<int> output_shape = {2, 4, 4, 1}; in TEST_F() local 200 Prepare(input_shape, output_shape, input_data, output_data, ReduceMode_ReduceMax, axes, num_axes); in TEST_F() [all …]
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/data/ |
D | concatenate_op.cc | 41 dsize_t output_shape = 0; in OutputShape() local 42 output_shape = output_shape + inputs.at(0).NumOfElements(); in OutputShape() 47 (std::numeric_limits<uint64_t>::max() - output_shape) > prepend_->shape().NumOfElements(), in OutputShape() 49 output_shape = output_shape + prepend_->shape().NumOfElements(); in OutputShape() 55 (std::numeric_limits<uint64_t>::max() - output_shape) > append_->shape().NumOfElements(), in OutputShape() 57 output_shape = output_shape + append_->shape().NumOfElements(); in OutputShape() 60 outputs.emplace_back(std::vector<dsize_t>{output_shape}); in OutputShape()
|