Home
last modified time | relevance | path

Searched refs:qmax (Results 1 – 25 of 159) sorted by relevance

1234567

/external/XNNPACK/test/
Df32-clamp.cc72 .qmax(255) in TEST()
78 TEST(F32_CLAMP__NEON_X4, qmax) { in TEST() argument
81 for (uint8_t qmax = 1; qmax < 255; qmax++) { in TEST() local
85 .qmax(qmax) in TEST()
145 .qmax(255) in TEST()
151 TEST(F32_CLAMP__NEON_X8, qmax) { in TEST() argument
154 for (uint8_t qmax = 1; qmax < 255; qmax++) { in TEST() local
158 .qmax(qmax) in TEST()
218 .qmax(255) in TEST()
224 TEST(F32_CLAMP__SSE_X4, qmax) { in TEST() argument
[all …]
Dqu8-requantization.cc29 .qmax(std::numeric_limits<uint8_t>::max()) in TEST()
41 .qmax(std::numeric_limits<uint8_t>::max()) in TEST()
54 .qmax(std::numeric_limits<uint8_t>::max()) in TEST()
67 .qmax(std::numeric_limits<uint8_t>::max()) in TEST()
80 .qmax(std::numeric_limits<uint8_t>::max()) in TEST()
90 .qmax(std::numeric_limits<uint8_t>::max()) in TEST()
97 .qmax(std::numeric_limits<uint8_t>::max()) in TEST()
112 .qmax(std::numeric_limits<uint8_t>::max()) in TEST()
124 .qmax(std::numeric_limits<uint8_t>::max()) in TEST()
137 .qmax(std::numeric_limits<uint8_t>::max()) in TEST()
[all …]
Du8-clamp.cc72 .qmax(255) in TEST()
78 TEST(U8_CLAMP__NEON_X64, qmax) { in TEST() argument
81 for (uint8_t qmax = 1; qmax < 255; qmax++) { in TEST() local
85 .qmax(qmax) in TEST()
145 .qmax(255) in TEST()
151 TEST(U8_CLAMP__SSE2_X64, qmax) { in TEST() argument
154 for (uint8_t qmax = 1; qmax < 255; qmax++) { in TEST() local
158 .qmax(qmax) in TEST()
211 .qmax(255) in TEST()
217 TEST(U8_CLAMP__SCALAR_X4, qmax) { in TEST() argument
[all …]
Dqs8-requantization.cc29 .qmax(std::numeric_limits<int8_t>::max()) in TEST()
44 .qmax(std::numeric_limits<int8_t>::max()) in TEST()
60 .qmax(std::numeric_limits<int8_t>::max()) in TEST()
76 .qmax(std::numeric_limits<int8_t>::max()) in TEST()
92 .qmax(std::numeric_limits<int8_t>::max()) in TEST()
102 .qmax(std::numeric_limits<int8_t>::max()) in TEST()
109 .qmax(std::numeric_limits<int8_t>::max()) in TEST()
123 .qmax(std::numeric_limits<int8_t>::max()) in TEST()
138 .qmax(std::numeric_limits<int8_t>::max()) in TEST()
154 .qmax(std::numeric_limits<int8_t>::max()) in TEST()
[all …]
Df16-clamp.cc72 .qmax(255) in TEST()
78 TEST(F16_CLAMP__NEONFP16ARITH_X8, qmax) { in TEST() argument
81 for (uint8_t qmax = 1; qmax < 255; qmax++) { in TEST() local
85 .qmax(qmax) in TEST()
145 .qmax(255) in TEST()
151 TEST(F16_CLAMP__NEONFP16ARITH_X16, qmax) { in TEST() argument
154 for (uint8_t qmax = 1; qmax < 255; qmax++) { in TEST() local
158 .qmax(qmax) in TEST()
Drequantization-tester.h61 inline RequantizationTester& qmax(int16_t qmax) { in qmax() argument
62 this->qmax_ = qmax; in qmax()
66 inline int16_t qmax() const { in qmax() function
91 ASSERT_GE(qmax(), std::numeric_limits<uint8_t>::min()); in TestExactDivideByPO2()
92 ASSERT_LE(qmax(), std::numeric_limits<uint8_t>::max()); in TestExactDivideByPO2()
93 ASSERT_LT(qmin(), qmax()); in TestExactDivideByPO2()
108 scale(), zero_point(), qmin(), qmax(), in TestExactDivideByPO2()
131 ASSERT_GE(qmax(), std::numeric_limits<int8_t>::min()); in TestExactDivideByPO2()
132 ASSERT_LE(qmax(), std::numeric_limits<int8_t>::max()); in TestExactDivideByPO2()
133 ASSERT_LT(qmin(), qmax()); in TestExactDivideByPO2()
[all …]
Dclamp-nc.cc31 .qmax(255) in TEST()
40 for (uint8_t qmax = 1; qmax < 255; qmax++) { in TEST() local
45 .qmax(qmax) in TEST()
113 .qmax(255) in TEST()
122 for (uint8_t qmax = 1; qmax < 255; qmax++) { in TEST() local
127 .qmax(qmax) in TEST()
Dclamp-microkernel-tester.h64 inline ClampMicrokernelTester& qmax(uint8_t qmax) { in qmax() argument
65 this->qmax_ = qmax; in qmax()
69 inline uint8_t qmax() const { in qmax() function
103 params = xnn_init_u8_minmax_params(qmin(), qmax());
106 params = xnn_init_scalar_u8_minmax_params(qmin(), qmax());
112 y_ref[i] = std::max(std::min(x_data[i], qmax()), qmin());
120 ASSERT_LE(uint32_t(y[i]), uint32_t(qmax()))
126 << ", qmin = " << uint32_t(qmin()) << ", qmax = " << uint32_t(qmax());
152 fp16_ieee_from_fp32_value(float(qmax()))); in Test()
156 … y_ref[i] = std::max(std::min(fp16_ieee_to_fp32_value(x_data[i]), float(qmax())), float(qmin())); in Test()
[all …]
Df32-vrdivc-minmax.cc75 TEST(F32_VRDIVC_MINMAX__NEON_X4, qmax) { in TEST() argument
80 .qmax(128) in TEST()
142 TEST(F32_VRDIVC_MINMAX__NEON_X8, qmax) { in TEST() argument
147 .qmax(128) in TEST()
209 TEST(F32_VRDIVC_MINMAX__SSE_X4, qmax) { in TEST() argument
214 .qmax(128) in TEST()
276 TEST(F32_VRDIVC_MINMAX__SSE_X8, qmax) { in TEST() argument
281 .qmax(128) in TEST()
343 TEST(F32_VRDIVC_MINMAX__AVX_X8, qmax) { in TEST() argument
348 .qmax(128) in TEST()
[all …]
Df32-vdivc-minmax.cc75 TEST(F32_VDIVC_MINMAX__NEON_X4, qmax) { in TEST() argument
80 .qmax(128) in TEST()
142 TEST(F32_VDIVC_MINMAX__NEON_X8, qmax) { in TEST() argument
147 .qmax(128) in TEST()
209 TEST(F32_VDIVC_MINMAX__SSE_X4, qmax) { in TEST() argument
214 .qmax(128) in TEST()
276 TEST(F32_VDIVC_MINMAX__SSE_X8, qmax) { in TEST() argument
281 .qmax(128) in TEST()
343 TEST(F32_VDIVC_MINMAX__AVX_X8, qmax) { in TEST() argument
348 .qmax(128) in TEST()
[all …]
Df32-vsubc-minmax.cc75 TEST(F32_VSUBC_MINMAX__NEON_X4, qmax) { in TEST() argument
80 .qmax(128) in TEST()
142 TEST(F32_VSUBC_MINMAX__NEON_X8, qmax) { in TEST() argument
147 .qmax(128) in TEST()
209 TEST(F32_VSUBC_MINMAX__SSE_X4, qmax) { in TEST() argument
214 .qmax(128) in TEST()
276 TEST(F32_VSUBC_MINMAX__SSE_X8, qmax) { in TEST() argument
281 .qmax(128) in TEST()
343 TEST(F32_VSUBC_MINMAX__AVX_X8, qmax) { in TEST() argument
348 .qmax(128) in TEST()
[all …]
Df32-vrsubc-minmax.cc75 TEST(F32_VRSUBC_MINMAX__NEON_X4, qmax) { in TEST() argument
80 .qmax(128) in TEST()
142 TEST(F32_VRSUBC_MINMAX__NEON_X8, qmax) { in TEST() argument
147 .qmax(128) in TEST()
209 TEST(F32_VRSUBC_MINMAX__SSE_X4, qmax) { in TEST() argument
214 .qmax(128) in TEST()
276 TEST(F32_VRSUBC_MINMAX__SSE_X8, qmax) { in TEST() argument
281 .qmax(128) in TEST()
343 TEST(F32_VRSUBC_MINMAX__AVX_X8, qmax) { in TEST() argument
348 .qmax(128) in TEST()
[all …]
Df32-vaddc-minmax.cc75 TEST(F32_VADDC_MINMAX__NEON_X4, qmax) { in TEST() argument
80 .qmax(128) in TEST()
142 TEST(F32_VADDC_MINMAX__NEON_X8, qmax) { in TEST() argument
147 .qmax(128) in TEST()
209 TEST(F32_VADDC_MINMAX__SSE_X4, qmax) { in TEST() argument
214 .qmax(128) in TEST()
276 TEST(F32_VADDC_MINMAX__SSE_X8, qmax) { in TEST() argument
281 .qmax(128) in TEST()
343 TEST(F32_VADDC_MINMAX__AVX_X8, qmax) { in TEST() argument
348 .qmax(128) in TEST()
[all …]
Df32-vmulc-minmax.cc75 TEST(F32_VMULC_MINMAX__NEON_X4, qmax) { in TEST() argument
80 .qmax(128) in TEST()
142 TEST(F32_VMULC_MINMAX__NEON_X8, qmax) { in TEST() argument
147 .qmax(128) in TEST()
209 TEST(F32_VMULC_MINMAX__SSE_X4, qmax) { in TEST() argument
214 .qmax(128) in TEST()
276 TEST(F32_VMULC_MINMAX__SSE_X8, qmax) { in TEST() argument
281 .qmax(128) in TEST()
343 TEST(F32_VMULC_MINMAX__AVX_X8, qmax) { in TEST() argument
348 .qmax(128) in TEST()
[all …]
Dvadd-microkernel-tester.h132 inline VAddMicrokernelTester& qmax(uint8_t qmax) { in qmax() function
133 this->qmax_ = qmax; in qmax()
137 inline uint8_t qmax() const { in qmax() function
178 qmin(), qmax());
184 qmin(), qmax());
191 qmin(), qmax());
198 y_fp[i] = std::min<float>(y_fp[i], float(qmax()));
208 ASSERT_LE(uint32_t(y[i]), uint32_t(qmax()))
249 int8_t(qmin() - 0x80), int8_t(qmax() - 0x80));
255 int8_t(qmin() - 0x80), int8_t(qmax() - 0x80));
[all …]
Dclamp-operator-tester.h86 inline ClampOperatorTester& qmax(uint8_t qmax) { in qmax() function
87 this->qmax_ = qmax; in qmax()
91 inline uint8_t qmax() const { in qmax() function
130 const uint8_t y = std::min(std::max(x, qmin()), qmax()); in TestU8()
142 qmin(), qmax(), in TestU8()
162 ASSERT_LE(uint32_t(output[i * output_stride() + c]), uint32_t(qmax())) in TestU8()
168 << ", qmin = " << uint32_t(qmin()) << ", qmax = " << uint32_t(qmax()); in TestU8()
192 std::min(std::max(x, float(qmin())), float(qmax())); in TestF32()
202 …onst float output_max = relu_activation() ? std::numeric_limits<float>::infinity() : float(qmax()); in TestF32()
Dvaddc-microkernel-tester.h123 inline VAddCMicrokernelTester& qmax(uint8_t qmax) { in qmax() function
124 this->qmax_ = qmax; in qmax()
128 inline uint8_t qmax() const { in qmax() function
168 int8_t(qmin() - 0x80), int8_t(qmax() - 0x80));
174 int8_t(qmin() - 0x80), int8_t(qmax() - 0x80));
181 int8_t(qmin() - 0x80), int8_t(qmax() - 0x80));
188 y_fp[i] = std::min<float>(y_fp[i], float(int32_t(qmax() - 0x80)));
198 ASSERT_LE(int32_t(y[i]), int32_t(qmax() - 0x80))
Df32-vadd-minmax.cc96 TEST(F32_VADD_MINMAX__NEON_X4, qmax) { in TEST() argument
101 .qmax(128) in TEST()
184 TEST(F32_VADD_MINMAX__NEON_X8, qmax) { in TEST() argument
189 .qmax(128) in TEST()
272 TEST(F32_VADD_MINMAX__SSE_X4, qmax) { in TEST() argument
277 .qmax(128) in TEST()
360 TEST(F32_VADD_MINMAX__SSE_X8, qmax) { in TEST() argument
365 .qmax(128) in TEST()
448 TEST(F32_VADD_MINMAX__AVX_X8, qmax) { in TEST() argument
453 .qmax(128) in TEST()
[all …]
Dgavgpool-microkernel-tester.h133 inline GAvgPoolMicrokernelTester& qmax(uint8_t qmax) { in qmax() function
134 this->qmax_ = qmax; in qmax()
138 inline uint8_t qmax() const { in qmax() function
174 output_zero_point(), qmin(), qmax());
180 output_zero_point(), qmin(), qmax());
187 output_zero_point(), qmin(), qmax());
198 output_fp[c] = std::min<float>(output_fp[c], float(qmax()));
211 ASSERT_LE(uint32_t(output[c]), uint32_t(qmax()))
249 output_zero_point(), qmin(), qmax());
255 output_zero_point(), qmin(), qmax());
[all …]
Df32-vdiv-minmax.cc96 TEST(F32_VDIV_MINMAX__NEON_X4, qmax) { in TEST() argument
101 .qmax(128) in TEST()
184 TEST(F32_VDIV_MINMAX__NEON_X8, qmax) { in TEST() argument
189 .qmax(128) in TEST()
272 TEST(F32_VDIV_MINMAX__SSE_X4, qmax) { in TEST() argument
277 .qmax(128) in TEST()
360 TEST(F32_VDIV_MINMAX__SSE_X8, qmax) { in TEST() argument
365 .qmax(128) in TEST()
448 TEST(F32_VDIV_MINMAX__AVX_X8, qmax) { in TEST() argument
453 .qmax(128) in TEST()
[all …]
Df32-vmul-minmax.cc96 TEST(F32_VMUL_MINMAX__NEON_X4, qmax) { in TEST() argument
101 .qmax(128) in TEST()
184 TEST(F32_VMUL_MINMAX__NEON_X8, qmax) { in TEST() argument
189 .qmax(128) in TEST()
272 TEST(F32_VMUL_MINMAX__SSE_X4, qmax) { in TEST() argument
277 .qmax(128) in TEST()
360 TEST(F32_VMUL_MINMAX__SSE_X8, qmax) { in TEST() argument
365 .qmax(128) in TEST()
448 TEST(F32_VMUL_MINMAX__AVX_X8, qmax) { in TEST() argument
453 .qmax(128) in TEST()
[all …]
Df32-vsub-minmax.cc96 TEST(F32_VSUB_MINMAX__NEON_X4, qmax) { in TEST() argument
101 .qmax(128) in TEST()
184 TEST(F32_VSUB_MINMAX__NEON_X8, qmax) { in TEST() argument
189 .qmax(128) in TEST()
272 TEST(F32_VSUB_MINMAX__SSE_X4, qmax) { in TEST() argument
277 .qmax(128) in TEST()
360 TEST(F32_VSUB_MINMAX__SSE_X8, qmax) { in TEST() argument
365 .qmax(128) in TEST()
448 TEST(F32_VSUB_MINMAX__AVX_X8, qmax) { in TEST() argument
453 .qmax(128) in TEST()
[all …]
Df32-dwconv-minmax.cc63 .qmax(128) in TEST()
109 .qmax(128) in TEST()
175 .qmax(128) in TEST()
258 .qmax(128) in TEST()
304 .qmax(128) in TEST()
370 .qmax(128) in TEST()
444 .qmax(128) in TEST()
490 .qmax(128) in TEST()
556 .qmax(128) in TEST()
630 .qmax(128) in TEST()
[all …]
/external/llvm-project/mlir/lib/Dialect/Quant/Utils/
DFakeQuantSupport.cpp18 int64_t &qmax) { in getDefaultStorageParams() argument
24 qmax = 127; in getDefaultStorageParams()
27 qmax = 255; in getDefaultStorageParams()
33 qmax = 32767; in getDefaultStorageParams()
36 qmax = 65535; in getDefaultStorageParams()
42 qmax = std::numeric_limits<int32_t>::max(); in getDefaultStorageParams()
45 qmax = std::numeric_limits<uint32_t>::max(); in getDefaultStorageParams()
66 static void getNudgedScaleAndZeroPoint(int64_t qmin, int64_t qmax, double rmin, in getNudgedScaleAndZeroPoint() argument
71 const double qmaxDouble = qmax; in getNudgedScaleAndZeroPoint()
97 nudgedZeroPoint = qmax; in getNudgedScaleAndZeroPoint()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/
Dnumerical_utils.cc64 int32_t qmin, int32_t qmax) { in CalculateQuantizedRange() argument
71 std::min(qmax, quantize(rmax.value()))}; in CalculateQuantizedRange()
73 return {std::max(qmin, quantize(rmin.value())), qmax}; in CalculateQuantizedRange()
75 return {qmin, std::min(qmax, quantize(rmax.value()))}; in CalculateQuantizedRange()
77 return {qmin, qmax}; in CalculateQuantizedRange()

1234567