Home
last modified time | relevance | path

Searched refs:rmax (Results 1 – 25 of 31) sorted by relevance

12

/external/tensorflow/tensorflow/lite/kernels/internal/
Dquantization_util.h31 QuantizationParams ChooseQuantizationParams(double rmin, double rmax, in ChooseQuantizationParams() argument
40 TFLITE_CHECK_GE(rmax, 0.); in ChooseQuantizationParams()
41 if (rmin == rmax) { in ChooseQuantizationParams()
44 TFLITE_CHECK_EQ(rmax, 0.); in ChooseQuantizationParams()
54 const double scale = (rmax - rmin) / (qmax_double - qmin_double); in ChooseQuantizationParams()
65 const double zero_point_from_max = qmax_double - rmax / scale; in ChooseQuantizationParams()
69 std::abs(qmax_double) + std::abs(rmax / scale); in ChooseQuantizationParams()
102 QuantizationParams ChooseQuantizationParams(double rmin, double rmax) { in ChooseQuantizationParams() argument
103 return ChooseQuantizationParams<T>(rmin, rmax, false); in ChooseQuantizationParams()
/external/llvm-project/mlir/lib/Dialect/Quant/Utils/
DFakeQuantSupport.cpp67 double rmax, double &scale, in getNudgedScaleAndZeroPoint() argument
72 scale = (rmax - rmin) / (qmaxDouble - qminDouble); in getNudgedScaleAndZeroPoint()
84 const double zeroPointFromMax = qmaxDouble - rmax / scale; in getNudgedScaleAndZeroPoint()
86 std::abs(qmaxDouble) + std::abs(rmax / scale); in getNudgedScaleAndZeroPoint()
109 double rmax, bool narrowRange, in fakeQuantAttrsToType() argument
125 if (std::fabs(rmax - rmin) < std::numeric_limits<double>::epsilon()) { in fakeQuantAttrsToType()
132 getNudgedScaleAndZeroPoint(qmin, qmax, rmin, rmax, scale, nudgedZeroPoint); in fakeQuantAttrsToType()
166 double rmax = rmaxs[axis]; in fakeQuantAttrsToType() local
167 if (std::fabs(rmax - rmin) < std::numeric_limits<double>::epsilon()) { in fakeQuantAttrsToType()
175 getNudgedScaleAndZeroPoint(qmin, qmax, rmin, rmax, scale, nudgedZeroPoint); in fakeQuantAttrsToType()
/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/
Dnumerical_utils.cc63 absl::optional<double> rmax, in CalculateQuantizedRange() argument
69 if (rmin.has_value() && rmax.has_value()) { in CalculateQuantizedRange()
71 std::min(qmax, quantize(rmax.value()))}; in CalculateQuantizedRange()
74 } else if (rmax.has_value()) { in CalculateQuantizedRange()
75 return {qmin, std::min(qmax, quantize(rmax.value()))}; in CalculateQuantizedRange()
Dquantization_utils.h118 double rmax = FloatAttr::getValueAsDouble(*it); in matchAndRewrite() local
123 rmax = std::max(rmax, 0.0); in matchAndRewrite()
124 TensorRangeSanityCheck(op, rmin, rmax); in matchAndRewrite()
126 maxs.push_back(rmax); in matchAndRewrite()
136 double rmax = FloatAttr::getValueAsDouble(stats.getValue<APFloat>({1})); in matchAndRewrite() local
141 rmax = std::max(rmax, 0.0); in matchAndRewrite()
142 TensorRangeSanityCheck(op, rmin, rmax); in matchAndRewrite()
144 quant::fakeQuantAttrsToType(op.getLoc(), num_bits, rmin, rmax, in matchAndRewrite()
147 quant_type = DownCastScale(quant_type, rmin, rmax, op->getLoc()); in matchAndRewrite()
Dnumerical_utils.h39 absl::optional<double> rmax,
/external/XNNPACK/test/
Drmax-microkernel-tester.h46 void Test(xnn_u8_rmax_ukernel_function rmax) const { in Test() argument
63 rmax(n() * sizeof(uint8_t), x.data(), &y); in Test()
70 void Test(xnn_f32_rmax_ukernel_function rmax) const { in Test() argument
87 rmax(n() * sizeof(float), x.data(), &y); in Test()
/external/llvm-project/mlir/include/mlir/Dialect/Quant/
DFakeQuantSupport.h52 double rmin, double rmax,
61 ArrayRef<double> rmins, ArrayRef<double> rmax,
/external/swiftshader/third_party/subzero/bloat/
Dwebtreemap.js111 var rmax = rmin; // Largest child.
118 if (size > rmax)
119 rmax = size;
126 var score = Math.max(5*space*space*rmax / (rsum*rsum),
/external/python/cpython3/Modules/_decimal/tests/
Ddeccheck.py807 t.rmax = getattr(t.maxcontext, t.funcname)(*maxargs)
813 t.rmax = getattr(maxself, t.funcname)(*maxargs)
818 t.rmax = None
836 t.maxresults.append(str(t.rmax))
849 if t.with_maxcontext and isinstance(t.rmax, C.Decimal):
850 t.maxresults.append(t.rmax.to_eng_string())
851 t.maxresults.append(t.rmax.as_tuple())
852 t.maxresults.append(str(t.rmax.imag))
853 t.maxresults.append(str(t.rmax.real))
862 if t.with_maxcontext and not isinstance(t.rmax, tuple):
[all …]
/external/llvm-project/llvm/test/CodeGen/SystemZ/
Dmultiselect.ll6 …ne void @test0(i32 signext %positive, double %base, double %offset, double* %rmin, double* %rmax) {
19 store double %max, double* %rmax, align 8
/external/XNNPACK/bench/
Df32-softmax.cc182 xnn_f32_rmax_ukernel_function rmax, in ThreePassSoftMaxWithRecomputing() argument
217 rmax(elements * sizeof(float), x.data(), &x_max); in ThreePassSoftMaxWithRecomputing()
244 xnn_f32_rmax_ukernel_function rmax, in ThreePassSoftMaxWithReloading() argument
279 rmax(elements * sizeof(float), x.data(), &x_max); in ThreePassSoftMaxWithReloading()
Df32-raddexpminusmax.cc23 xnn_f32_rmax_ukernel_function rmax, in f32_raddexpminusmax() argument
51 rmax(elements * sizeof(float), x.data(), &x_max); in f32_raddexpminusmax()
Df32-vscaleexpminusmax.cc22 xnn_f32_rmax_ukernel_function rmax, in f32_vscaleexpminusmax() argument
52 rmax(elements * sizeof(float), x.data(), &x_max); in f32_vscaleexpminusmax()
Df32-raddstoreexpminusmax.cc23 xnn_f32_rmax_ukernel_function rmax, in f32_raddstoreexpminusmax() argument
52 rmax(elements * sizeof(float), x.data(), &x_max); in f32_raddstoreexpminusmax()
/external/XNNPACK/src/operators/
Dsoftmax-nc.c174 .rmax_ukernel = xnn_params.u8.rmax, in xnn_setup_softmax_nc_qu8()
288 .rmax_ukernel = xnn_params.f32.rmax, in xnn_setup_softmax_nc_f32()
/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Dportable_tensor_utils.cc81 const double rmax = std::fmax(0, *minmax.second); in PortableAsymmetricQuantizeFloats() local
82 if (rmin == rmax) { in PortableAsymmetricQuantizeFloats()
88 double scale = (rmax - rmin) / (qmax_double - qmin_double); in PortableAsymmetricQuantizeFloats()
90 const double zero_point_from_max = qmax_double - rmax / scale; in PortableAsymmetricQuantizeFloats()
94 std::abs(qmax_double) + std::abs(rmax / scale); in PortableAsymmetricQuantizeFloats()
Dreference_ops.h1040 float rmax = op_params.minmax.max; in FakeQuant() local
1045 TFLITE_DCHECK_GE(rmax, 0.0f); in FakeQuant()
1046 TFLITE_DCHECK_LT(rmin, rmax); in FakeQuant()
1052 NudgeQuantizationRange(rmin, rmax, quant_min, quant_max, &nudged_min, in FakeQuant()
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/
Dneon_tensor_utils.cc2254 float rmin = 0.0f, rmax = 0.0f; in NeonMinMax() local
2267 rmax = std::max(rmax, vmaxvq_f32(max_f32x4)); in NeonMinMax()
2276 rmax = std::max(rmax, vget_lane_f32(max_f32x2, 0)); in NeonMinMax()
2283 rmax = std::max(rmax, *minmax.second); in NeonMinMax()
2286 *max = rmax; in NeonMinMax()
2361 float rmin, rmax; in NeonAsymmetricQuantizeFloats() local
2362 NeonMinMax(values, size, &rmin, &rmax); in NeonAsymmetricQuantizeFloats()
2368 if (rmin == rmax) { in NeonAsymmetricQuantizeFloats()
2374 const double scale = (rmax - rmin) / (qmax_double - qmin_double); in NeonAsymmetricQuantizeFloats()
2376 const double zero_point_from_max = qmax_double - rmax / scale; in NeonAsymmetricQuantizeFloats()
[all …]
/external/mesa3d/src/mesa/swrast/
Ds_points.c307 const GLfloat rmax = radius + 0.7071F; in smooth_point() local
309 const GLfloat rmax2 = rmax * rmax; in smooth_point()
/external/XNNPACK/src/
Dinit.c179 xnn_params.u8.rmax = xnn_u8_rmax_ukernel__neon; in init()
384 xnn_params.f32.rmax = xnn_f32_rmax_ukernel__neon; in init()
545 xnn_params.u8.rmax = xnn_u8_rmax_ukernel__scalar; in init()
661 xnn_params.f32.rmax = xnn_f32_rmax_ukernel__scalar; in init()
978 xnn_params.u8.rmax = xnn_u8_rmax_ukernel__neon; in init()
1302 xnn_params.f32.rmax = xnn_f32_rmax_ukernel__neon; in init()
1604 xnn_params.u8.rmax = xnn_u8_rmax_ukernel__sse2; in init()
1880 xnn_params.f32.rmax = xnn_f32_rmax_ukernel__sse; in init()
2180 xnn_params.u8.rmax = xnn_u8_rmax_ukernel__scalar; in init()
2387 xnn_params.f32.rmax = xnn_f32_rmax_ukernel__wasmsimd_arm; in init()
[all …]
/external/tensorflow/tensorflow/python/keras/legacy_tf_layers/
Dnormalization_test.py879 rmax = 1.1
892 renorm_clipping={'rmax': rmax, 'rmin': rmin, 'dmax': dmax},
909 r = (stddev / renorm_stddev).clip(rmin, rmax)
1033 rmax = 1.1
1048 renorm_clipping={'rmax': rmax, 'rmin': rmin, 'dmax': dmax},
1071 r = (stddev / renorm_stddev).clip(rmin, rmax)
/external/tensorflow/tensorflow/python/keras/layers/
Dnormalization.py669 rmin, rmax, dmax = [
674 if rmax is not None:
675 r = math_ops.minimum(r, rmax)
/external/mesa3d/src/gallium/drivers/softpipe/
Dsp_setup.c1335 const float rmax = halfSize + 0.7071F; in sp_setup_point() local
1337 const float rmax2 = rmax * rmax; in sp_setup_point()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_ops_a_m.cc2159 float rmin, rmax; in Verify() local
2162 rmax = op.max().convertToFloat(); in Verify()
2165 rmax = op.max().convertToDouble(); in Verify()
2168 if (rmin >= rmax) { in Verify()
2170 "," + Twine(std::to_string(rmax)) + "]"); in Verify()
/external/XNNPACK/
DCMakeLists.txt389 src/f32-rmax/scalar.c
643 src/u8-rmax/scalar.c
831 src/f32-rmax/neon.c
1084 src/u8-rmax/neon.c
1645 src/f32-rmax/sse.c
1843 src/u8-rmax/sse2.c
2047 src/f32-rmax/avx.c
2505 src/f32-rmax/avx512f.c
3773 ADD_EXECUTABLE(f32-rmax-test test/f32-rmax.cc)
3774 SET_TARGET_PROPERTIES(f32-rmax-test PROPERTIES
[all …]

12