/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/fp32/ |
D | resize_nearest_neighbor_fp32_tests.cc | 27 float *output_data, const bool align_corners, const int thread_num); 51 … float *input_data, float *output_data, const bool align_corners, in Prepare() argument 58 out_tensor_.set_data(output_data); in Prepare() 76 float output_data[1] = {0}; in TEST_F() local 83 Prepare(input_shape, output_shape, input_data, output_data, align_corners, 1); in TEST_F() 87 ASSERT_EQ(0, CompareOutputData(output_data, expect.data(), output_size, err_tol)); in TEST_F() 93 float output_data[1] = {0}; in TEST_F() local 100 Prepare(input_shape, output_shape, input_data, output_data, align_corners, 1); in TEST_F() 104 ASSERT_EQ(0, CompareOutputData(output_data, expect.data(), output_size, err_tol)); in TEST_F() 110 float output_data[2] = {0}; in TEST_F() local [all …]
|
D | resize_bilinear_fp32_tests.cc | 30 float *output_data, const bool align_corners, const int thread_num); 54 … float *input_data, float *output_data, const bool align_corners, in Prepare() argument 62 out_tensor_.set_data(output_data); in Prepare() 81 float output_data[1] = {0}; in TEST_F() local 88 Prepare(input_shape, output_shape, input_data, output_data, align_corners, 1); in TEST_F() 92 ASSERT_EQ(0, CompareOutputData(output_data, expect.data(), output_size, err_tol)); in TEST_F() 98 float output_data[1] = {0}; in TEST_F() local 105 Prepare(input_shape, output_shape, input_data, output_data, align_corners, 1); in TEST_F() 109 ASSERT_EQ(0, CompareOutputData(output_data, expect.data(), output_size, err_tol)); in TEST_F() 115 float output_data[2] = {0}; in TEST_F() local [all …]
|
D | l2norm_fp32_test.cc | 27 float *output_data, const int axis_num, ActType activation_type, const int thread_num); 50 … float *output_data, const int axis_num, ActType activation_type, const int thread_num) { in Init() argument 57 out_tensor_.set_data(output_data); in Init() 82 float output_data[18] = {0}; in TEST_F() local 92 Init(input_shape, output_shape, input_data, output_data, axis_num, act_type, thread_num); in TEST_F() 96 ASSERT_EQ(0, CompareOutputData(output_data, expect.data(), output_size, err_tol_)); in TEST_F() 103 float output_data[18] = {0}; in TEST_F() local 113 Init(input_shape, output_shape, input_data, output_data, axis_num, act_type, thread_num); in TEST_F() 117 ASSERT_EQ(0, CompareOutputData(output_data, expect.data(), output_size, err_tol_)); in TEST_F() 124 float output_data[18] = {0}; in TEST_F() local [all …]
|
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/fp32_grad/ |
D | activation_grad_fp32_tests.cc | 53 auto output_data = new float[output_data_size]; in TEST_F() local 54 ASSERT_NE(output_data, nullptr); in TEST_F() 58 ReluGrad(yt_data, input_data, output_data_size, output_data); in TEST_F() 64 ReluGrad(yt_data, input_data, 50, output_data); in TEST_F() 73 std::cout << output_data[i] << " ,"; in TEST_F() 79 int res = CompareRelativeOutput(output_data, output_path); in TEST_F() 84 delete[] output_data; in TEST_F() 105 auto output_data = new float[output_data_size]; in TEST_F() local 106 ASSERT_NE(output_data, nullptr); in TEST_F() 110 Relu6Grad(yt_data, input_data, 50, output_data); in TEST_F() [all …]
|
D | bias_grad_fp32_tests.cc | 47 auto output_data = new float[7]; in TEST_F() local 48 ASSERT_NE(output_data, nullptr); in TEST_F() 51 dw_tensor.set_data(output_data); in TEST_F() 70 std::cout << output_data[i] << " ,"; in TEST_F() 74 auto res = CompareRelativeOutput(output_data, output_path); in TEST_F() 78 delete[] output_data; in TEST_F() 100 auto output_data = new float[20]; in TEST_F() local 101 ASSERT_NE(output_data, nullptr); in TEST_F() 104 dw_tensor.set_data(output_data); in TEST_F() 123 std::cout << output_data[i] << " ,"; in TEST_F() [all …]
|
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/int8/ |
D | reduce_int8_tests.cc | 39 int8_t *output_data, ReduceMode mode, const int *axes, const int num_axes); 66 … int8_t *output_data, ReduceMode mode, const int *axes, const int num_axes) { in Prepare() argument 74 out_tensor_.set_data(output_data); in Prepare() 97 int8_t output_data[32] = {0}; in TEST_F() local 107 …Prepare(input_shape, output_shape, input_data, output_data, ReduceMode_ReduceMean, axes, num_axes); in TEST_F() 112 CompareOutputInt8(output_data, correct, output_size, err_tol_); in TEST_F() 122 int8_t output_data[1] = {0}; in TEST_F() local 130 …Prepare(input_shape, output_shape, input_data, output_data, ReduceMode_ReduceMean, axes, num_axes); in TEST_F() 135 CompareOutputInt8(output_data, correct, output_size, err_tol_); in TEST_F() 145 int8_t output_data[32] = {0}; in TEST_F() local [all …]
|
D | resize_nearest_neighbor_int8_tests.cc | 33 int8_t *output_data, const LiteQuantParam quant_in, const LiteQuantParam quant_out, 51 … int8_t *input_data, int8_t *output_data, const LiteQuantParam quant_in, in Prepare() argument 61 out_tensor.set_data(output_data); in Prepare() 97 int8_t output_data[out_element_num] = {0}; in TEST_F() local 102 Prepare(in_shape, out_shape, input_data, output_data, quant_in, quant_out, false, thread_num); in TEST_F() 106 CompareOutputInt8(output_data, expect, 16, err_percent_); in TEST_F() 118 int8_t output_data[out_element_num] = {0}; in TEST_F() local 128 Prepare(in_shape, out_shape, input_data, output_data, quant_in, quant_out, false, thread_num); in TEST_F() 132 CompareOutputInt8(output_data, expect, out_element_num, err_percent_); in TEST_F() 144 int8_t output_data[out_element_num] = {0}; in TEST_F() local [all …]
|
D | resize_bilinear_int8_tests.cc | 34 int8_t *output_data, const LiteQuantParam quant_in, const LiteQuantParam quant_out, 56 … int8_t *input_data, int8_t *output_data, const mindspore::LiteQuantParam quant_in, in Prepare() argument 66 out_tensor.set_data(output_data); in Prepare() 90 int8_t output_data[16] = {0}; in TEST_F() local 99 …Prepare(in_shape, out_shape, input_data, output_data, quant_in, quant_out, align_corners, thread_n… in TEST_F() 102 CompareOutputInt8(output_data, expect, 16, err_percent_); in TEST_F() 111 int8_t output_data[160] = {0}; in TEST_F() local 124 …Prepare(in_shape, out_shape, input_data, output_data, quant_in, quant_out, align_corners, thread_n… in TEST_F() 127 CompareOutputInt8(output_data, expect, 160, err_percent_); in TEST_F() 136 int8_t output_data[160] = {0}; in TEST_F() local [all …]
|
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/opencl/ |
D | space_to_depth_tests.cc | 46 float output_data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; in TEST_F() local 50 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 61 …float output_data[] = {0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23, 8, 9, 10,… in TEST_F() local 67 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 83 …float output_data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 24, 25, 26, … in TEST_F() local 94 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 103 float output_data[] = {0, 1, 2, 3}; in TEST_F() local 107 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 118 float output_data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; 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 | 46 float output_data[] = {0, 2, 1, 0, 2, 1, 0, 0, 2, 1, 2, 2, 0, 0, 2, 2}; in TEST_F() local 49 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 61 float output_data[] = {100, 25, 40, 50, 18, 80, 34, 35, 55, 20, 5, 15, 11, 12, 15, 16}; in TEST_F() local 64 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 77 float output_data[] = {0, 1, 0, 1, 0, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 0, 2, 1, 0, 0, 0, 1, 1, 0}; in TEST_F() local 80 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 93 float output_data[] = {100, 12, 200, 34, 50, 36, 11, 6, 17, 10, 35, 30, in TEST_F() local 97 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 111 float output_data[] = {1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0}; in TEST_F() local 114 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() [all …]
|
D | reshape_tests.cc | 35 float output_data[] = {0, 1, 2, 3, 4, 5, 6}; variable 39 {shape_out, output_data}, CreateParameter(), fp16_enable); 47 float output_data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; variable 51 {shape_out, output_data}, CreateParameter(), fp16_enable); 59 float output_data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; variable 63 {shape_out, output_data}, CreateParameter(), fp16_enable); 71 …float output_data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 2… variable 75 {shape_out, output_data}, CreateParameter(), fp16_enable); 83 float output_data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; variable 87 {shape_out, output_data}, CreateParameter(), fp16_enable); [all …]
|
D | one_hot_tests.cc | 42 float output_data[] = {-1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1}; in TEST_F() local 49 {output_shape, output_data}, param, fp16_enable); in TEST_F() 62 …float output_data[] = {-1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -… in TEST_F() local 70 {output_shape, output_data}, param, fp16_enable); in TEST_F() 83 float output_data[] = {-1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in TEST_F() local 93 {output_shape, output_data}, param, fp16_enable); in TEST_F() 106 …float output_data[] = {-1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1,… in TEST_F() local 116 {output_shape, output_data}, param, fp16_enable); in TEST_F() 129 float output_data[] = {0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0}; in TEST_F() local 137 {output_shape, output_data}, param, fp16_enable); in TEST_F() [all …]
|
D | conv2d_tests.cc | 40 float *output_data, ActType act_type, bool fp16_enable, float atol = 1e-9) { in TestMain_Conv2D() argument 51 …TestMain(input_infos, {output_shape, output_data}, reinterpret_cast<OpParameter *>(param), fp16_en… in TestMain_Conv2D() 62 float output_data[] = {1, 1, 5, 5, 9, 9, -13, -13}; in TEST_F() local 63 TestMain_Conv2D(attr, input_data, weight_data, bias_data, output_data, ActType_No, false, 1e-3f); in TEST_F() 64 TestMain_Conv2D(attr, input_data, weight_data, bias_data, output_data, ActType_No, true, 1e-6f); in TEST_F() 80 float output_data[] = {1, 1, 5, 5, 9, 9, 13, 13}; in TEST_F() local 81 TestMain_Conv2D(attr, input_data, weight_data, nullptr, output_data, ActType_No, false, 1e-3f); in TEST_F() 82 TestMain_Conv2D(attr, input_data, weight_data, nullptr, output_data, ActType_No, true, 1e-6f); in TEST_F() 91 float output_data[] = {2.5, 3.5, 8.5, 17.5, 14.5, 31.5, 20.5, 45.5}; in TEST_F() local 92 TestMain_Conv2D(attr, input_data, weight_data, bias_data, output_data, ActType_No, false, 1e-3f); in TEST_F() [all …]
|
D | concat_tests.cc | 39 …float output_data[] = {0.75, 0.06, 0.74, 0.30, 0.9, 0.59, 0.03, 0.37, 0.5, 0.6, 0.74, 0.23, 0.46, … in TEST_F() local 42 …t0_shape, input0_data, VAR}, {input1_shape, input1_data, VAR}}, {output_shape, output_data}, param, in TEST_F() 54 float output_data[] = {0.75, 0.5}; in TEST_F() local 57 …t0_shape, input0_data, VAR}, {input1_shape, input1_data, VAR}}, {output_shape, output_data}, param, in TEST_F() 75 float output_data[] = { in TEST_F() local 85 …t0_shape, input0_data, VAR}, {input1_shape, input1_data, VAR}}, {output_shape, output_data}, param, in TEST_F() 140 float output_data[] = { in TEST_F() local 181 {output_shape, output_data}, param, fp16_enable, fp16_enable ? 1e-3 : 1e-9); in TEST_F() 200 float output_data[] = {0.75, 0.06, 0.74, 0.30, 0.9, 0.59, 0.13, 0.16, 0.5, 0.6, 0.74, 0.23, 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 | 37 float output_data[] = {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1}; variable 41 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable, 51 float output_data[] = {0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2}; variable 55 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable, 65 float output_data[] = {0.5, 0.5}; variable 69 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable, 79 float output_data[] = {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, variable 84 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable, 94 float output_data[] = {0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, variable 99 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable, [all …]
|
D | arithmetic_tests.cc | 64 float output_data[] = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; in TEST_F() local 68 …_shape, input0_data, VAR}, {input1_shape, input1_data, CONST_TENSOR}}, {output_shape, output_data}, in TEST_F() 79 float output_data[] = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; in TEST_F() local 82 …_shape, input0_data, VAR}, {input1_shape, input1_data, CONST_TENSOR}}, {output_shape, output_data}, in TEST_F() 93 float output_data[] = {0, 0, 0, 3, 3, 3, 6, 6, 6, 6, 6, 6}; in TEST_F() local 97 …_shape, input0_data, VAR}, {input1_shape, input1_data, CONST_TENSOR}}, {output_shape, output_data}, in TEST_F() 108 float output_data[] = {0, 0, 0, -3, -3, -3, -6, -6, -6, -9, -9, -9}; in TEST_F() local 111 …_shape, input0_data, VAR}, {input1_shape, input1_data, CONST_TENSOR}}, {output_shape, output_data}, in TEST_F() 122 …float output_data[] = {0, 0, 0, -3, -3, -3, -6, -6, -6, -9, -9, -9, 0, 0, 0, -3, -3, -3, -6, -6, -… 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 | 39 float output_data[] = {1, 3, 5, 7, 9}; in TEST_F() local 46 {output_shape, output_data}, param, fp16_enable); in TEST_F() 58 float output_data[] = {1}; in TEST_F() local 65 {output_shape, output_data}, param, fp16_enable); in TEST_F() 77 float output_data[] = {1}; in TEST_F() local 84 {output_shape, output_data}, param, fp16_enable, fp16_enable ? 1e-3 : 1e-9); in TEST_F() 98 float output_data[] = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, in TEST_F() local 114 {output_shape, output_data}, param, fp16_enable); in TEST_F() 129 float output_data[] = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, in TEST_F() local 145 {output_shape, output_data}, param, fp16_enable, fp16_enable ? 1e-3 : 1e-9); in TEST_F() [all …]
|
D | sparse_to_dense_tests.cc | 41 …float output_data[] = {1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … in TEST_F() local 50 {output_shape, output_data}, param, fp16_enable); in TEST_F() 64 …float output_data[] = {6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, … in TEST_F() local 73 {output_shape, output_data}, param, fp16_enable); in TEST_F() 87 …float output_data[] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, … in TEST_F() local 96 {output_shape, output_data}, param, fp16_enable); in TEST_F() 110 float output_data[] = {1, 0, 2, 3, 0, 0, 4, 5, 0, 6}; in TEST_F() local 118 {output_shape, output_data}, param, fp16_enable); in TEST_F() 132 float output_data[] = {6, 6, 6, 6, 6, 6, 0, 0, 0, 6}; in TEST_F() local 140 {output_shape, output_data}, param, fp16_enable); in TEST_F() [all …]
|
D | resize_tests.cc | 47 float output_data[] = {0, 0.5, 1, 1, 1, 1.5, 2, 2, 2, 2.5, 3, 3, 2, 2.5, 3, 3}; in TEST_F() local 50 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 63 float output_data[] = {0, 0.5, 1, 1, 1.5, 2, 2, 2.5, 3}; in TEST_F() local 66 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 79 float output_data[] = {0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3}; in TEST_F() local 82 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 95 float output_data[] = {0, 0.5, 1, 1, 1, 1.5, 2, 2, 2, 2.5, 3, 3, 2, 2.5, 3, 3, in TEST_F() local 99 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() 112 float output_data[] = {0, 0.5, 1, 1, 1.5, 2, 2, 2.5, 3, 0, 0.5, 1, 1, 1.5, 2, 2, 2.5, 3}; in TEST_F() local 115 TestMain({{input_shape, input_data, VAR}}, {output_shape, output_data}, param, fp16_enable); in TEST_F() [all …]
|
D | power_tests.cc | 47 float output_data[] = {4.0, 9.0, 16.0, 5.0, 36.0, 49.0, 512, 729, in TEST_F() local 51 …t0_shape, input0_data, VAR}, {input1_shape, input1_data, VAR}}, {output_shape, output_data}, param, in TEST_F() 67 …float output_data[] = {0.49223521, 0.99542219, 1.12018788, 1.60738329, 2.76312667, 4.1278262, 0.2… in TEST_F() local 71 …t0_shape, input0_data, VAR}, {input1_shape, input1_data, VAR}}, {output_shape, output_data}, param, in TEST_F() 86 …float output_data[] = {0.49223521, 0.99542219, 1.12018788, 1.60738329, 2.76312667, 4.1278262, 0.2… in TEST_F() local 90 …t0_shape, input0_data, VAR}, {input1_shape, input1_data, VAR}}, {output_shape, output_data}, param, in TEST_F() 102 …float output_data[] = {4.0, 9.0, 16.0, 25.0, 36.0, 49.0, 64, 81, 100.0, 121.0, 144, 169, 196.0, 22… in TEST_F() local 105 TestMain({{input0_shape, input0_data, VAR}}, {output_shape, output_data}, param, fp16_enable, in TEST_F() 120 float output_data[] = {0.02344, -0.8003, -0.1848, 0.147, 2.156, 0.312, 0.1039, 0.7896, in TEST_F() local 124 …t0_shape, input0_data, VAR}, {input1_shape, input1_data, VAR}}, {output_shape, output_data}, param, in TEST_F()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/ |
D | cast_fp32.cc | 63 auto output_data = output->data(); in CastToFp32() local 67 reinterpret_cast<float *>(output_data) + offset, data_num); in CastToFp32() 71 reinterpret_cast<float *>(output_data) + offset, data_num); in CastToFp32() 75 reinterpret_cast<float *>(output_data) + offset, data_num); in CastToFp32() 79 reinterpret_cast<float *>(output_data) + offset, data_num); in CastToFp32() 83 reinterpret_cast<float *>(output_data) + offset, data_num); in CastToFp32() 94 auto output_data = output->data(); in CastToFp16() local 98 reinterpret_cast<uint16_t *>(output_data) + offset, data_num); in CastToFp16() 103 reinterpret_cast<float16_t *>(output_data) + offset, data_num); in CastToFp16() 106 reinterpret_cast<float16_t *>(output_data) + offset, data_num); in CastToFp16() [all …]
|
/third_party/mindspore/mindspore/lite/test/common/ |
D | common_test.h | 39 void PrintData(const std::string &name, T *output_data, int size) { in PrintData() argument 42 std::cout << output_data[i] << " "; in PrintData() 48 …static int CompareOutputData(const T *output_data, const T *correct_data, int size, float err_boun… 51 T diff = std::fabs(output_data[i] - correct_data[i]); 63 …static void CompareOutputInt8(int8_t *output_data, int8_t *correct_data, int size, float err_perce… in CompareOutputInt8() argument 66 int8_t diff = abs(output_data[i] - correct_data[i]); in CompareOutputInt8() 76 …static int CompareOutput(const float *output_data, size_t output_num, const std::string &file_path… in CompareOutput() argument 81 int res = CompareOutputData(output_data, ground_truth, ground_truth_num); in CompareOutput() 86 …static float CompareOutputRelativeData(const float *output_data, const float *correct_data, int da… in CompareOutputRelativeData() argument 96 float diff = std::abs(output_data[i] - correct_data[i]); in CompareOutputRelativeData() [all …]
|
/third_party/boost/libs/compute/test/ |
D | test_malloc.cpp | 28 int output_data[5]; in BOOST_AUTO_TEST_CASE() local 29 bc::copy(ptr, ptr + 5, output_data, queue); in BOOST_AUTO_TEST_CASE() 31 BOOST_CHECK_EQUAL(output_data[0], 2); in BOOST_AUTO_TEST_CASE() 32 BOOST_CHECK_EQUAL(output_data[1], 5); in BOOST_AUTO_TEST_CASE() 33 BOOST_CHECK_EQUAL(output_data[2], 8); in BOOST_AUTO_TEST_CASE() 34 BOOST_CHECK_EQUAL(output_data[3], 3); in BOOST_AUTO_TEST_CASE() 35 BOOST_CHECK_EQUAL(output_data[4], 6); in BOOST_AUTO_TEST_CASE()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16/ |
D | cast_fp16.cc | 70 auto output_data = output->data(); in DoCast() local 72 CHECK_NULL_RETURN(output_data); in DoCast() 87 reinterpret_cast<int64_t *>(output_data) + offset, data_num); in DoCast() 91 reinterpret_cast<int32_t *>(output_data) + offset, data_num); in DoCast() 95 reinterpret_cast<float *>(output_data) + offset, data_num); in DoCast() 98 …memcpy(reinterpret_cast<float16_t *>(output_data) + offset, reinterpret_cast<float16_t *>(input_da… in DoCast() 109 reinterpret_cast<int64_t *>(output_data) + offset, data_num); in DoCast() 113 reinterpret_cast<int32_t *>(output_data) + offset, data_num); in DoCast() 116 …memcpy(reinterpret_cast<float *>(output_data) + offset, reinterpret_cast<float *>(input_data) + of… in DoCast() 121 reinterpret_cast<float16_t *>(output_data) + offset, data_num); in DoCast() [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/base/ |
D | tile_base.c | 21 void DoCopyData(const uint8_t *input_data, uint8_t *output_data, size_t size, size_t data_size, siz… in DoCopyData() argument 22 uint8_t *out_data = output_data; in DoCopyData() 29 int DoTileOneDimension(uint8_t *input_data, uint8_t *output_data, size_t dim, const TileParameter *… in DoTileOneDimension() argument 32 …DoCopyData(input_data, output_data, src_dim_size, parameter->data_size_, parameter->multiples_[dim… in DoTileOneDimension() 39 …DoTileOneDimension(input_data + in_pos * parameter->data_size_, output_data + out_pos * parameter-… in DoTileOneDimension() 46 void Tile(void *input_data, void *output_data, const TileParameter *parameter) { in Tile() argument 47 DoTileOneDimension((uint8_t *)input_data, (uint8_t *)output_data, 0, parameter); in Tile() 50 void TileSimple(void *input_data, void *output_data, size_t begin, size_t end, const TileParameter … in TileSimple() argument 51 uint8_t *out_data = output_data; in TileSimple()
|