Home
last modified time | relevance | path

Searched refs:q_fixed (Results 1 – 9 of 9) sorted by relevance

/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/
Dnumerical_utils.cc38 auto q_fixed = static_cast<int64_t>(round(q * (1LL << 31))); in QuantizeMultiplier() local
39 assert(q_fixed <= (1LL << 31)); in QuantizeMultiplier()
40 if (q_fixed == (1LL << 31)) { in QuantizeMultiplier()
41 q_fixed /= 2; in QuantizeMultiplier()
44 assert(q_fixed <= std::numeric_limits<int32_t>::max()); in QuantizeMultiplier()
57 q_fixed = 0; in QuantizeMultiplier()
59 return {static_cast<int32_t>(q_fixed), shift}; in QuantizeMultiplier()
/external/ComputeLibrary/src/core/utils/quantization/
DAsymmHelpers.cpp68 auto q_fixed = static_cast<int64_t>(support::cpp11::round(q * fixed_point_one_Q0)); in calculate_quantized_multiplier_less_than_one() local
69 ARM_COMPUTE_RETURN_ERROR_ON(q_fixed > fixed_point_one_Q0); in calculate_quantized_multiplier_less_than_one()
70 if(q_fixed == fixed_point_one_Q0) in calculate_quantized_multiplier_less_than_one()
72 q_fixed /= 2; in calculate_quantized_multiplier_less_than_one()
79 q_fixed = 0; in calculate_quantized_multiplier_less_than_one()
83 ARM_COMPUTE_RETURN_ERROR_ON(q_fixed > std::numeric_limits<int32_t>::max()); in calculate_quantized_multiplier_less_than_one()
84 *quant_multiplier = static_cast<int32_t>(q_fixed); in calculate_quantized_multiplier_less_than_one()
100 auto q_fixed = static_cast<int64_t>(support::cpp11::round(q * fixed_point_one_Q0)); in calculate_quantized_multiplier_greater_than_one() local
101 ARM_COMPUTE_RETURN_ERROR_ON(q_fixed > fixed_point_one_Q0); in calculate_quantized_multiplier_greater_than_one()
102 if(q_fixed == fixed_point_one_Q0) in calculate_quantized_multiplier_greater_than_one()
[all …]
/external/tensorflow/tensorflow/core/kernels/uniform_quant_ops/
Dmath_utils.cc37 auto q_fixed = static_cast<int64_t>(std::round(q * (1LL << 31))); in QuantizeMultiplier() local
38 if (q_fixed == (1LL << 31)) { in QuantizeMultiplier()
39 q_fixed /= 2; in QuantizeMultiplier()
44 q_fixed = 0; in QuantizeMultiplier()
48 q_fixed = (1LL << 31) - 1; in QuantizeMultiplier()
50 quantized_multiplier = static_cast<int32_t>(q_fixed); in QuantizeMultiplier()
/external/tensorflow/tensorflow/lite/kernels/internal/
Dquantization_util.cc70 int64_t q_fixed = IntegerFrExp(double_multiplier, shift); in QuantizeMultiplier() local
73 auto q_fixed = static_cast<int64_t>(TfLiteRound(q * (1LL << 31))); in QuantizeMultiplier() local
75 TFLITE_CHECK(q_fixed <= (1LL << 31)); in QuantizeMultiplier()
76 if (q_fixed == (1LL << 31)) { in QuantizeMultiplier()
77 q_fixed /= 2; in QuantizeMultiplier()
80 TFLITE_CHECK_LE(q_fixed, std::numeric_limits<int32_t>::max()); in QuantizeMultiplier()
93 q_fixed = 0; in QuantizeMultiplier()
100 q_fixed = (1LL << 31) - 1; in QuantizeMultiplier()
103 *quantized_multiplier = static_cast<int32_t>(q_fixed); in QuantizeMultiplier()
/external/ruy/ruy/
Dtest.h1614 auto q_fixed = static_cast<std::int64_t>(std::round(q * (1ll << 31)));
1615 RUY_CHECK_LE(q_fixed, (1ll << 31));
1616 if (q_fixed == (1ll << 31)) {
1617 q_fixed /= 2;
1620 RUY_CHECK_LE(q_fixed, std::numeric_limits<std::int32_t>::max());
1621 *multiplier_fixedpoint = static_cast<std::int32_t>(q_fixed);
/external/cronet/third_party/boringssl/src/crypto/fipsmodule/rsa/
Drsa_impl.c206 const BIGNUM *q_fixed = &rsa->mont_q->N; in freeze_private_key() local
225 !ensure_fixed_copy(&rsa->dmq1_fixed, rsa->dmq1, q_fixed->width)) { in freeze_private_key()
/external/boringssl/src/crypto/fipsmodule/rsa/
Drsa_impl.c206 const BIGNUM *q_fixed = &rsa->mont_q->N; in freeze_private_key() local
225 !ensure_fixed_copy(&rsa->dmq1_fixed, rsa->dmq1, q_fixed->width)) { in freeze_private_key()
/external/tensorflow/tensorflow/lite/kernels/
Dactivations.cc395 auto q_fixed = static_cast<int32_t>(TfLiteRound(q * (1LL << 15))); in TanhPrepare() local
396 data->input_multiplier = static_cast<int16_t>(q_fixed); in TanhPrepare()
500 auto q_fixed = static_cast<int32_t>(TfLiteRound(q * (1LL << 15))); in SigmoidPrepare() local
501 data->input_multiplier = static_cast<int16_t>(q_fixed); in SigmoidPrepare()
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/rsa/
Drsa_impl.c199 const BIGNUM *q_fixed = &rsa->mont_q->N; in freeze_private_key() local
218 !ensure_fixed_copy(&rsa->dmq1_fixed, rsa->dmq1, q_fixed->width)) { in freeze_private_key()