1 // Copyright 2019 Google LLC 2 // 3 // This source code is licensed under the BSD-style license found in the 4 // LICENSE file in the root directory of this source tree. 5 // 6 // Auto-generated file. Do not edit! 7 // Specification: test/f16-vaddc-minmax.yaml 8 // Generator: tools/generate-vbinary-test.py 9 10 11 #include <gtest/gtest.h> 12 13 #include <xnnpack/common.h> 14 #include <xnnpack/isa-checks.h> 15 16 #include <xnnpack/vbinary.h> 17 #include "vbinaryc-microkernel-tester.h" 18 19 20 #if XNN_ARCH_ARM64 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8,batch_eq_8)21 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8, batch_eq_8) { 22 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 23 VBinOpCMicrokernelTester() 24 .batch_size(8) 25 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::AddC); 26 } 27 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8,batch_div_8)28 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8, batch_div_8) { 29 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 30 for (size_t batch_size = 16; batch_size < 80; batch_size += 8) { 31 VBinOpCMicrokernelTester() 32 .batch_size(batch_size) 33 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::AddC); 34 } 35 } 36 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8,batch_lt_8)37 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8, batch_lt_8) { 38 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 39 for (size_t batch_size = 1; batch_size < 8; batch_size++) { 40 VBinOpCMicrokernelTester() 41 .batch_size(batch_size) 42 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::AddC); 43 } 44 } 45 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8,batch_gt_8)46 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8, batch_gt_8) { 47 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 48 for (size_t batch_size = 9; batch_size < 16; batch_size++) { 49 VBinOpCMicrokernelTester() 50 .batch_size(batch_size) 51 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::AddC); 52 } 53 } 54 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8,inplace)55 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8, inplace) { 56 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 57 for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) { 58 VBinOpCMicrokernelTester() 59 .batch_size(batch_size) 60 .inplace(true) 61 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::AddC); 62 } 63 } 64 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8,qmin)65 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8, qmin) { 66 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 67 for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) { 68 VBinOpCMicrokernelTester() 69 .batch_size(batch_size) 70 .qmin(128) 71 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::AddC); 72 } 73 } 74 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8,qmax)75 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X8, qmax) { 76 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 77 for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) { 78 VBinOpCMicrokernelTester() 79 .batch_size(batch_size) 80 .qmax(128) 81 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::AddC); 82 } 83 } 84 #endif // XNN_ARCH_ARM64 85 86 87 #if XNN_ARCH_ARM64 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16,batch_eq_16)88 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16, batch_eq_16) { 89 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 90 VBinOpCMicrokernelTester() 91 .batch_size(16) 92 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::AddC); 93 } 94 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16,batch_div_16)95 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16, batch_div_16) { 96 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 97 for (size_t batch_size = 32; batch_size < 160; batch_size += 16) { 98 VBinOpCMicrokernelTester() 99 .batch_size(batch_size) 100 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::AddC); 101 } 102 } 103 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16,batch_lt_16)104 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16, batch_lt_16) { 105 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 106 for (size_t batch_size = 1; batch_size < 16; batch_size++) { 107 VBinOpCMicrokernelTester() 108 .batch_size(batch_size) 109 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::AddC); 110 } 111 } 112 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16,batch_gt_16)113 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16, batch_gt_16) { 114 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 115 for (size_t batch_size = 17; batch_size < 32; batch_size++) { 116 VBinOpCMicrokernelTester() 117 .batch_size(batch_size) 118 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::AddC); 119 } 120 } 121 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16,inplace)122 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16, inplace) { 123 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 124 for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) { 125 VBinOpCMicrokernelTester() 126 .batch_size(batch_size) 127 .inplace(true) 128 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::AddC); 129 } 130 } 131 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16,qmin)132 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16, qmin) { 133 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 134 for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) { 135 VBinOpCMicrokernelTester() 136 .batch_size(batch_size) 137 .qmin(128) 138 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::AddC); 139 } 140 } 141 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16,qmax)142 TEST(F16_VADDC_MINMAX__NEONFP16ARITH_X16, qmax) { 143 TEST_REQUIRES_ARM_NEON_FP16_ARITH; 144 for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) { 145 VBinOpCMicrokernelTester() 146 .batch_size(batch_size) 147 .qmax(128) 148 .Test(xnn_f16_vaddc_minmax_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::AddC); 149 } 150 } 151 #endif // XNN_ARCH_ARM64 152