/external/tensorflow/tensorflow/core/kernels/ |
D | quantize_op.cc | 130 const float max_range = input_max_range.template flat<float>()(0); in Compute() local 131 QuantizeTensor(ctx, input, min_range, max_range, output, in Compute() 187 float max_range = in QuantizeTensor() local 195 max_range, output->flat<quint8>().data()); in QuantizeTensor() 198 ctx->template eigen_device<Device>(), input, min_range, max_range, in QuantizeTensor() 202 output_max_tensor->flat<float>()(0) = max_range; in QuantizeTensor() 224 float max_range = in QuantizeSlice() local 231 (max_range - min_range); in QuantizeSlice() 248 ((input.cwiseMin(max_range).cwiseMax(min_range) - min_range) * in QuantizeSlice() 257 ((input.cwiseMin(max_range).cwiseMax(min_range) - min_range) * in QuantizeSlice() [all …]
|
D | quantize_and_dequantize_op.h | 90 T max_range, T scale, T inverse_scale, Func round_func, in ClampScaleAndRound() argument 92 output.device(d) = (input.cwiseMin(max_range).cwiseMax(min_range) * scale) in ClampScaleAndRound() 101 T max_range, T scale, T inverse_scale, in ClampScaleAndRound() argument 105 ClampScaleAndRound(d, input, min_range, max_range, scale, inverse_scale, in ClampScaleAndRound() 110 ClampScaleAndRound(d, input, min_range, max_range, scale, inverse_scale, in ClampScaleAndRound() 145 T* min_range, T* max_range, T* scale, in ComputeQuantizationRange() argument 163 const T scale_from_max_side = (max_quantized * *max_range > 0) in ComputeQuantizationRange() 164 ? max_quantized / *max_range in ComputeQuantizationRange() 171 *max_range = max_quantized * *inverse_scale; in ComputeQuantizationRange() 174 *inverse_scale = *max_range / max_quantized; in ComputeQuantizationRange() [all …]
|
D | dequantize_op.cc | 108 const float max_range = input_max_tensor.flat<float>()(0); in Compute() local 109 DequantizeTensor(ctx, input, min_range, max_range, &float_output); in Compute() 144 const float min_range, const float max_range, in DequantizeTensor() argument 155 (max_range - min_range) / in DequantizeTensor() 168 min_range, max_range, output->flat<float>().data()); in DequantizeTensor() 171 ctx->template eigen_device<Device>(), input, min_range, max_range, in DequantizeTensor() 179 ? (max_range / std::numeric_limits<T>::max()) in DequantizeTensor() 181 max_range / std::numeric_limits<T>::max()); in DequantizeTensor() 191 const ConstVec& input, float min_range, float max_range, in DequantizeSlice() argument 204 (max_range - min_range) / in DequantizeSlice() [all …]
|
D | dequantize_op_test.cc | 43 float min_range, float max_range, in ComputeDequantizeMinCombinedUsingEigen() argument 52 (max_range - min_range) / in ComputeDequantizeMinCombinedUsingEigen() 65 void RunDequantizeMinCombinedTest(float min_range, float max_range, in RunDequantizeMinCombinedTest() argument 84 AddInputFromArray<float>(TensorShape({}), {max_range}); in RunDequantizeMinCombinedTest() 87 ComputeDequantizeMinCombinedUsingEigen<T>(GetInput(0), min_range, max_range, in RunDequantizeMinCombinedTest() 95 void RunDequantizeBfloat16MinCombinedTest(float min_range, float max_range) { in RunDequantizeBfloat16MinCombinedTest() argument 114 AddInputFromArray<float>(TensorShape({}), {max_range}); in RunDequantizeBfloat16MinCombinedTest() 118 ComputeDequantizeMinCombinedUsingEigen<T>(GetInput(0), min_range, max_range, in RunDequantizeBfloat16MinCombinedTest() 152 void RunDequantizeScaledTest(float min_range, float max_range, int axis, in RunDequantizeScaledTest() argument 172 max_ranges[slice_idx] = (slice_idx + 1) * max_range; in RunDequantizeScaledTest()
|
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/ |
D | quantize_and_dequantize_op.cc | 68 xla::XlaOp min_range, max_range; in Compile() local 71 max_range = ctx->Input(2); in Compile() 77 max_range = ReduceAll(input, xla::MinValue(b, xla_type), *fmax); in Compile() 96 max_range = Reduce(input, xla::MinValue(b, xla_type), *fmax, in Compile() 149 Select(Gt(max_quantized * max_range, zero), max_quantized / max_range, in Compile() 156 Select(cond, min_range / min_quantized, max_range / max_quantized); in Compile() 158 max_range = Select(cond, max_quantized * inverse_scale, max_range); in Compile() 172 max_range = convert_to_input_shape(max_range); in Compile() 184 input = Clamp(min_range, input, max_range); in Compile()
|
D | dequantize_op.cc | 69 xla::XlaOp max_range = xla::ConvertElementType(ctx->Input(2), xla::F32); in Compile() local 84 xla::XlaOp scale = (max_range - min_range) / full_range; in Compile()
|
/external/tensorflow/tensorflow/python/ops/ |
D | dequantize_op_test.py | 34 def _testDequantizeOp(self, inputs, min_range, max_range, dtype, argument 38 dequantized = array_ops.dequantize(input_op, min_range, max_range, 53 self.assertLessEqual(max_range, v_max) 62 (max_range - min_range) / type_range) + min_range 66 scale_factor = max(min_range / v_min, max_range / v_max) 120 min_range, max_range = -2.0, 1.6 123 min_range, max_range = [], [] 126 max_range.append(1.6 * (slice_idx + 1)) 129 inputs, min_range, max_range, mode="SCALED", axis=axis)) 134 inputs, min_range, max_range, mode="SCALED", axis=(axis - 4)))
|
D | quantized_ops_test.py | 78 min_range, max_range = -1.0, 0.8 81 min_range, max_range = [], [] 84 max_range.append(0.8 * (slice_idx + 1)) 89 max_range, 100 max_range,
|
D | array_ops.py | 5744 max_range, argument 5763 max_range, 5774 max_range, 5795 max_range, argument 5808 max_range, 5819 max_range, 5835 max_range, argument 5852 max_range, 5859 input, min_range, max_range, mode=mode, name=name, dtype=dtype)
|
/external/tensorflow/tensorflow/core/api_def/base_api/ |
D | api_def_QuantizeV2.pbtxt | 13 name: "max_range" 47 [min_range, max_range] are scalar floats that specify the range for 56 out[i] = (in[i] - min_range) * range(T) / (max_range - min_range) 65 output type is quint8 ([0, 255]). The min_range and max_range values should be 98 The scaling_factor is determined from `min_range` and `max_range` to be as large 99 as possible such that the range from `min_range` to `max_range` is representable 111 (max_T * max_range > 0) ? max_T / max_range : max_float; 117 We next use the scale_factor to adjust min_range and max_range as follows: 121 max_range = max_T / scale_factor; 125 e.g. if T = qint8, and initially min_range = -10, and max_range = 9, we would [all …]
|
D | api_def_Dequantize.pbtxt | 10 name: "max_range" 24 [min_range, max_range] are scalar floats that specify the range for 32 out[i] = min_range + (in[i]* (max_range - min_range) / range(T)) 40 0-6. The min_range and max_range values are therefore 0.0 and 6.0. 60 The scaling_factor is determined from `min_range`, `max_range`, and 72 (std::numeric_limits<T>::min() == 0) ? (max_range / max_expected_T) 74 max_range / max_expected_T);
|
/external/tensorflow/tensorflow/core/kernels/mkl/ |
D | mkl_quantize_op.cc | 258 void ComputeScalar(OpKernelContext* ctx, float min_range, float max_range) { in ComputeScalar() argument 292 scale_factor = (number_of_steps - 1.0) / (max_range - min_range); in ComputeScalar() 299 output_max_tensor->flat<float>()(0) = max_range; in ComputeScalar() 310 float max_range; in Compute() local 327 max_range = std::max(input_max_range, min_range + epsilon); in Compute() 329 max_range = std::max(0.0f, max_range); in Compute() 344 ComputeScalar(ctx, min_range, max_range); in Compute() 442 const float max_abs = std::max(std::abs(min_range), std::abs(max_range)); in Compute() 446 max_range = max_abs; in Compute() 453 max_range = max_abs; in Compute() [all …]
|
D | mkl_dequantize_op.cc | 59 const float max_range = in Compute() local 130 const float max_abs = std::max(std::abs(min_range), std::abs(max_range)); in Compute()
|
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v1/ |
D | Dequantize.pbtxt | 12 name: "max_range" 57 name: "max_range" 103 name: "max_range" 149 name: "max_range" 202 name: "max_range" 262 name: "max_range"
|
D | QuantizeV2.pbtxt | 12 name: "max_range" 65 name: "max_range" 119 name: "max_range" 186 name: "max_range" 253 name: "max_range" 334 name: "max_range"
|
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v2/ |
D | Dequantize.pbtxt | 12 name: "max_range" 57 name: "max_range" 103 name: "max_range" 149 name: "max_range"
|
D | QuantizeV2.pbtxt | 12 name: "max_range" 65 name: "max_range" 119 name: "max_range" 186 name: "max_range" 253 name: "max_range"
|
/external/mesa3d/src/gallium/drivers/r600/ |
D | r600_viewport.c | 190 float left, top, right, bottom, max_range, guardband_x, guardband_y; in r600_emit_guardband() local 213 max_range = GET_MAX_VIEWPORT_RANGE(rctx) - 1; in r600_emit_guardband() 214 left = (-max_range - vp.translate[0]) / vp.scale[0]; in r600_emit_guardband() 215 right = ( max_range - vp.translate[0]) / vp.scale[0]; in r600_emit_guardband() 216 top = (-max_range - vp.translate[1]) / vp.scale[1]; in r600_emit_guardband() 217 bottom = ( max_range - vp.translate[1]) / vp.scale[1]; in r600_emit_guardband()
|
/external/tensorflow/tensorflow/tools/api/golden/v1/ |
D | tensorflow.quantization.pbtxt | 5 …argspec: "args=[\'input\', \'min_range\', \'max_range\', \'mode\', \'name\', \'axis\', \'narrow_ra… 33 …argspec: "args=[\'input\', \'min_range\', \'max_range\', \'T\', \'mode\', \'round_mode\', \'name\'…
|
/external/tensorflow/tensorflow/tools/api/golden/v2/ |
D | tensorflow.quantization.pbtxt | 5 …argspec: "args=[\'input\', \'min_range\', \'max_range\', \'mode\', \'name\', \'axis\', \'narrow_ra… 33 …argspec: "args=[\'input\', \'min_range\', \'max_range\', \'T\', \'mode\', \'round_mode\', \'name\'…
|
/external/mesa3d/src/gallium/drivers/radeonsi/ |
D | si_state_viewport.c | 237 float left, top, right, bottom, max_range, guardband_x, guardband_y; in si_emit_guardband() local 315 max_range = max_viewport_size[vp_as_scissor.quant_mode] / 2; in si_emit_guardband() 316 left = (-max_range - 1 - vp.translate[0]) / vp.scale[0]; in si_emit_guardband() 317 right = (max_range - vp.translate[0]) / vp.scale[0]; in si_emit_guardband() 318 top = (-max_range - 1 - vp.translate[1]) / vp.scale[1]; in si_emit_guardband() 319 bottom = (max_range - vp.translate[1]) / vp.scale[1]; in si_emit_guardband()
|
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/ |
D | convert_nodes.h | 512 float max_range);
|
D | convert_nodes.cc | 1755 float max_range = 0.0f; in PrepareTensorForShape() local 1757 converter->GetWeightRange(input.weights(), &min_range, &max_range)); in PrepareTensorForShape() 1761 if (min_range == 0.0f && max_range == 0.0f) { in PrepareTensorForShape() 1763 max_range = 127.0f; in PrepareTensorForShape() 1765 converter->ProvideQuantizationRange(*tensor, min_range, max_range); in PrepareTensorForShape() 1778 float min_range, float max_range) { in ProvideQuantizationRange() argument 1779 float symmetric_range = std::max(std::abs(min_range), std::abs(max_range)); in ProvideQuantizationRange() 3964 float max_range = 0.0f; in ConvertQuantize() local 3973 max_range = attrs.get<float>("max"); in ConvertQuantize() 3984 max_range = get_weights_value(2); in ConvertQuantize() [all …]
|
/external/mesa3d/src/amd/vulkan/ |
D | si_cmd_buffer.c | 720 const float max_range = 32767.0f; in si_write_scissors() local 738 guardband_x = MIN2(guardband_x, (max_range - fabsf(translate[0])) / scale[0]); in si_write_scissors() 739 guardband_y = MIN2(guardband_y, (max_range - fabsf(translate[1])) / scale[1]); in si_write_scissors()
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/tests/ |
D | ops.mlir | 1176 …%0 = "mhlo.dequantize"(%arg) {min_range = -0.1 : f32, max_range = 0.1 : f32, mode = "MIN_COMBINED"… 1184 …%0 = "mhlo.dequantize"(%arg) {min_range = -0.1 : f32, max_range = 0.1 : f32, mode = "MIN_COMBINED"… 1192 …%0 = "mhlo.dequantize"(%arg) {min_range = -0.1 : f32, max_range = 0.1 : f32, mode = "MIN_COMBINED"… 1200 …%0 = "mhlo.dequantize"(%arg) {min_range = -0.1 : f32, max_range = 0.1 : f32, mode = "hello", trans…
|