/external/tensorflow/tensorflow/core/kernels/ |
D | quantization_utils_test.cc | 36 const std::vector<qint32>& values_quantized, in TestRequantizeMany() 48 tensorflow::test::AsTensor(gtl::ArraySlice<qint32>(values_quantized)); in TestRequantizeMany() 53 auto input_array = i_tensor.flat<qint32>(); in TestRequantizeMany() 58 RequantizeManyInNewRangeUsingEigen<qint32, quint8>( in TestRequantizeMany() 81 std::vector<qint32> expected_values; in TestRequantizeMany8To32Bit() 84 expected_values.push_back(FloatToQuantized<qint32>( in TestRequantizeMany8To32Bit() 92 auto output_values = o_tensor.flat<qint32>(); in TestRequantizeMany8To32Bit() 101 const qint32 e = expected_values[value_index]; in TestRequantizeMany8To32Bit() 102 const qint32 v = output_values(value_index); in TestRequantizeMany8To32Bit() 132 std::vector<qint32> values_quantized; in TestRequantizeManyInNewRange32To8Bit() [all …]
|
D | quantized_add_op.cc | 66 float output_min, float output_max, qint32* output) { in ScalarAddition() 67 const int32 scalar_in_output_range = RequantizeInNewRange<quint8, qint32>( in ScalarAddition() 75 FloatToQuantizedUnclamped<qint32>(input_0_float, output_min, output_max); in ScalarAddition() 77 FloatToQuantizedUnclamped<qint32>(input_1_float, output_min, output_max); in ScalarAddition() 81 static_cast<int64>(Eigen::NumTraits<qint32>::lowest()); in ScalarAddition() 83 static_cast<int64>(Eigen::NumTraits<qint32>::highest()); in ScalarAddition() 123 float output_min, float output_max, qint32* output) { in ScalarAddition() 124 const int32 scalar_in_output_range = RequantizeInNewRange<quint8, qint32>( in ScalarAddition() 132 FloatToQuantizedUnclamped<qint32>(input_0_float, output_min, output_max); in ScalarAddition() 134 FloatToQuantizedUnclamped<qint32>(input_1_float, output_min, output_max); in ScalarAddition() [all …]
|
D | requantization_range_op.cc | 34 void CalculateUsedRange(const Tensor& input, qint32* used_min_quantized, in CalculateUsedRange() 35 qint32* used_max_quantized) { in CalculateUsedRange() 36 auto input_array = input.flat<qint32>(); in CalculateUsedRange() 37 Eigen::Tensor<qint32, 0, Eigen::RowMajor> min = input_array.minimum(); in CalculateUsedRange() 38 Eigen::Tensor<qint32, 0, Eigen::RowMajor> max = input_array.maximum(); in CalculateUsedRange() 56 qint32 used_min_quantized; in Compute() 57 qint32 used_max_quantized; in Compute() 75 .TypeConstraint<qint32>("Tinput"),
|
D | requantization_range_op_test.cc | 33 void CalculateUsedRange(const Tensor& input, qint32* actual_min_quantized, 34 qint32* actual_max_quantized); 47 .Attr("Tinput", DataTypeToEnum<qint32>::v()) in TEST_F() 57 AddInputFromArray<qint32>(TensorShape({value_count}), in TEST_F() 77 test::FillFn<qint32>(&quantized_tensor, [](int n) { return qint32(n); }); in BM_RequantizationRange() 79 qint32 actual_min; in BM_RequantizationRange() 80 qint32 actual_max; in BM_RequantizationRange()
|
D | quantized_concat_op_test.cc | 138 .Attr("T", DataTypeToEnum<qint32>::v()) in TestSmall32Bit() 148 FloatTensorToQuantized<qint32>(first_float, first_min, first_max); in TestSmall32Bit() 157 FloatTensorToQuantized<qint32>(second_float, second_min, second_max); in TestSmall32Bit() 167 AddInputFromArray<qint32>(first_quantized.shape(), in TestSmall32Bit() 168 first_quantized.flat<qint32>()); in TestSmall32Bit() 169 AddInputFromArray<qint32>(second_quantized.shape(), in TestSmall32Bit() 170 second_quantized.flat<qint32>()); in TestSmall32Bit() 180 QuantizedTensorToFloat<qint32>(output_quantized, output_min, output_max); in TestSmall32Bit() 289 ConcatHelper<qint32>(iters, 0 /* concat_dimension */, true /* same_limits */, in BM_QConcatDim0SameLimitQInt32() 294 ConcatHelper<qint32>(iters, 1 /* concat_dimension */, true /* same_limits */, in BM_QConcatDim1SameLimitQInt32() [all …]
|
D | mkl_requantize_ops_test.cc | 95 test::FillValues<qint32>( in Setup() 137 .Attr("T", DataTypeToEnum<qint32>::v()) in TEST_F() 143 AddInputFromArray<qint32>(input_tensor_qint32.shape(), in TEST_F() 144 input_tensor_qint32.flat<qint32>()); in TEST_F() 198 .Attr("T", DataTypeToEnum<qint32>::v()) in TEST_F() 204 AddInputFromArray<qint32>(input_tensor_qint32.shape(), in TEST_F() 205 input_tensor_qint32.flat<qint32>()); in TEST_F() 260 .Attr("T", DataTypeToEnum<qint32>::v()) in TEST_F() 266 AddInputFromArray<qint32>(input_tensor_qint32.shape(), in TEST_F() 267 input_tensor_qint32.flat<qint32>()); in TEST_F()
|
D | quantized_matmul_op_test.cc | 52 .Attr("Toutput", DataTypeToEnum<qint32>::v()) in TEST_F() 81 test::FillValues<qint32>(&expected, {74, 80, 86, 92, 173, 188, 203, 218}); in TEST_F() 82 test::ExpectTensorEqual<qint32>(expected, *GetOutput(0)); in TEST_F() 103 .Attr("Toutput", DataTypeToEnum<qint32>::v()) in TEST_F() 131 test::FillValues<qint32>(&expected, {-1}); in TEST_F() 132 test::ExpectTensorEqual<qint32>(expected, *GetOutput(0)); in TEST_F() 153 .Attr("Toutput", DataTypeToEnum<qint32>::v()) in TEST_F() 193 .Attr("Toutput", DataTypeToEnum<qint32>::v()) in TEST_F() 256 test::FillValues<qint32>(&expected, { in TEST_F() 266 test::ExpectTensorEqual<qint32>(expected, *GetOutput(0)); in TEST_F() [all …]
|
D | quantized_conv_ops_test.cc | 51 .Attr("out_type", DataTypeToEnum<qint32>::v()) in TEST_F() 130 QuantizedTensorToFloat<qint32>(output_quantized, output_min, output_max); in TEST_F() 143 .Attr("out_type", DataTypeToEnum<qint32>::v()) in TEST_F() 171 test::FillValues<qint32>( in TEST_F() 174 test::ExpectTensorEqual<qint32>(expected, *GetOutput(0)); in TEST_F() 186 .Attr("out_type", DataTypeToEnum<qint32>::v()) in TEST_F() 214 test::FillValues<qint32>(&expected, {348, 252, 274, 175}); in TEST_F() 215 test::ExpectTensorEqual<qint32>(expected, *GetOutput(0)); in TEST_F() 227 .Attr("out_type", DataTypeToEnum<qint32>::v()) in TEST_F() 257 test::FillValues<qint32>(&expected, {348, 252, 274, 175, // in TEST_F() [all …]
|
D | mkl_quantized_conv_ops_test.cc | 92 .Attr("out_type", DataTypeToEnum<qint32>::v()) in ConfigureQuantizedConv2D() 195 conv_comp.ConvertMklToTF<qint32>(DT_QINT32, output, output_mkl_metadata, in TEST_F() 201 QuantizedTensorToFloat<qint32>(output_quantized, output_min, output_max); in TEST_F() 249 test::FillValues<qint32>( in TEST_F() 258 conv_comp.ConvertMklToTF<qint32>(DT_QINT32, output, output_mkl_metadata, in TEST_F() 261 test::ExpectTensorEqual<qint32>(expected, output_quantized); in TEST_F() 285 .Attr("out_type", DataTypeToEnum<qint32>::v()) in TEST_F() 331 test::FillValues<qint32>( in TEST_F() 340 conv_comp.ConvertMklToTF<qint32>(DT_QINT32, output, output_mkl_metadata, in TEST_F() 343 test::ExpectTensorEqual<qint32>(expected, output_quantized); in TEST_F() [all …]
|
D | quantized_bias_add_op.cc | 68 std::is_same<T2, quint8>() && std::is_same<T3, qint32>()) { in Compute() 77 output->flat<qint32>().data()); in Compute() 98 .TypeConstraint<qint32>("out_type"), 99 QuantizedBiasAddOp<quint8, quint8, qint32>); 104 .TypeConstraint<qint32>("out_type"), 105 QuantizedBiasAddOp<qint8, qint8, qint32>);
|
D | quantized_resize_bilinear_op_test.cc | 249 image_quantized_tensor.flat<qint32>()(i) = in TestResizeBilinearOneDim() 250 FloatToQuantized<qint32>(static_cast<float>(i), MIN, MAX); in TestResizeBilinearOneDim() 264 QuantizedToFloat<qint32>(outputs.at(0).flat<qint32>()(i), MIN, MAX); in TestResizeBilinearOneDim() 267 expected_val = QuantizedToFloat<qint32>( in TestResizeBilinearOneDim() 268 image_quantized_tensor.flat<qint32>()(i / 2), MIN, MAX); in TestResizeBilinearOneDim() 270 const float image_val0 = QuantizedToFloat<qint32>( in TestResizeBilinearOneDim() 271 image_quantized_tensor.flat<qint32>()(i / 2), MIN, MAX); in TestResizeBilinearOneDim() 272 const float image_val1 = QuantizedToFloat<qint32>( in TestResizeBilinearOneDim() 273 image_quantized_tensor.flat<qint32>()(i / 2 + 1), MIN, MAX); in TestResizeBilinearOneDim() 282 CheckTensorValue<qint32>(image_quantized_tensor.flat<qint32>().data(), in TestResizeBilinearOneDim() [all …]
|
D | quantized_activation_ops.cc | 100 .TypeConstraint<qint32>("Tinput") 101 .TypeConstraint<qint32>("out_type"), 102 QuantizedReluOp<qint32>); 111 .TypeConstraint<qint32>("Tinput") 112 .TypeConstraint<qint32>("out_type"), 113 QuantizedRelu6Op<qint32>);
|
D | quantized_resize_bilinear_op.cc | 167 inline int32x2_t ToInt32x2(const qint32* v0, const qint32* v1) { in ToInt32x2() 178 const qint32* top_left0, const qint32* top_right0, in ComputeLerpx2() 179 const qint32* bottom_left0, const qint32* bottom_right0, in ComputeLerpx2() 180 const qint32* top_left1, const qint32* top_right1, in ComputeLerpx2() 181 const qint32* bottom_left1, const qint32* bottom_right1, in ComputeLerpx2() 337 const qint32* const ys_input_lower_ptr, in OutputLerp32x4x1() 338 const qint32* const ys_input_upper_ptr, in OutputLerp32x4x1() 339 qint32* output_y_ptr) { in OutputLerp32x4x1() 374 OutputLerpForChannels<RESOLUTION, qint32, int32, int64>( in OutputLerp32x4x1() 385 const qint32* const ys_input_lower_ptr, in OutputLerp32x4x3() [all …]
|
D | requantize_op_test.cc | 40 .Attr("Tinput", DataTypeToEnum<qint32>::v()) in ConfigureRequantize() 54 AddInputFromArray<qint32>(TensorShape({value_count}), in TEST_F() 72 AddInputFromArray<qint32>(TensorShape({value_count}), in TEST_F() 86 AddInputFromArray<qint32>(TensorShape({value_count}), in TEST_F()
|
D | requantize.cc | 77 if (meta::IsSupportedAndEnabled() && std::is_same<T1, qint32>() && in Compute() 79 auto input_i32_array = input.flat<qint32>(); in Compute() 99 .TypeConstraint<qint32>("Tinput") 101 RequantizeOp<qint32, quint8>);
|
D | quantization_utils.h | 239 inline void RequantizeManyInNewRangeReference(const qint32* input, int64 count, in RequantizeManyInNewRangeReference() 287 float min_output, float max_output, qint32* output) { in RequantizeManyInNewRange8To32BitReference() 291 FloatToQuantizedUnclamped<qint32>(code_0_float, min_output, max_output); in RequantizeManyInNewRange8To32BitReference() 293 FloatToQuantizedUnclamped<qint32>(code_1_float, min_output, max_output); in RequantizeManyInNewRange8To32BitReference() 296 static_cast<int64>(Eigen::NumTraits<qint32>::lowest()); in RequantizeManyInNewRange8To32BitReference() 298 static_cast<int64>(Eigen::NumTraits<qint32>::highest()); in RequantizeManyInNewRange8To32BitReference() 311 inline void RequantizeManyInNewRangeNeon(const qint32* input, int64 count, in RequantizeManyInNewRangeNeon() 398 inline void RequantizeManyInNewRange<qint32, quint8>( 399 const qint32* input, int64 count, float min_input, float max_input, 588 inline void RequantizeManyInNewRange<quint8, qint32>( [all …]
|
D | quantize_down_and_shrink_range.cc | 83 if (meta::IsSupportedAndEnabled() && std::is_same<T1, qint32>() && in Compute() 85 auto input_i32_array = input.flat<qint32>(); in Compute() 103 .TypeConstraint<qint32>("Tinput") 105 QuantizeDownAndShrinkRangeOp<qint32, quint8>);
|
D | mkl_requantization_range_per_channel_op.cc | 64 auto input_matrix = input.flat_inner_dims<qint32>(); in Compute() 78 Eigen::Tensor<qint32, 0, Eigen::RowMajor> min = in Compute() 80 Eigen::Tensor<qint32, 0, Eigen::RowMajor> max = in Compute() 121 .TypeConstraint<qint32>("T"),
|
D | meta_support.h | 71 const quint8* a_data, const quint8* b_data, qint32* c_data, 79 void Requantize(OpKernelContext* context, const qint32* input, int count, 102 qint32* output);
|
D | quantized_bias_add_op_test.cc | 48 .Attr("out_type", DataTypeToEnum<qint32>::v()) in TEST_F() 86 QuantizedTensorToFloat<qint32>(output_quantized, output_min, output_max); in TEST_F() 98 .Attr("out_type", DataTypeToEnum<qint32>::v()) in TEST_F() 168 QuantizedTensorToFloat<qint32>(output_quantized, output_min, output_max); in TEST_F()
|
D | mkl_conv_ops.cc | 1559 MklQuantizationRangeForMultiplication<quint8, qint8, qint32>( in Compute() 1605 MklQuantizationRangeForMultiplication<quint8, qint8, qint32>( in ExtendConvFwdParams() 1641 if (std::is_same<Tbias, qint32>::value) { in GetBiasHandle() 1851 .TypeConstraint<qint32>("out_type"), 1867 .TypeConstraint<qint32>("out_type") 1869 MklQuantizedConv2DOp<CPUDevice, float, qint32, qint32, false>); 1878 MklQuantizedConv2DOp<CPUDevice, qint32, qint8, qint8, false>); 1887 .TypeConstraint<qint32>("out_type"), 1903 .TypeConstraint<qint32>("out_type") 1905 MklQuantizedConv2DOp<CPUDevice, float, qint32, qint32, true>); [all …]
|
D | quantized_mul_op.cc | 50 void ScalarMultiply<quint8, qint32>(OpKernelContext* context, in ScalarMultiply() 54 int32 scalar_input_offset, qint32* output) { in ScalarMultiply() 124 void VectorMultiply<quint8, qint32>(OpKernelContext* context, in VectorMultiply() 127 int64 num_elements, qint32* output) { in VectorMultiply() 202 void VectorTensorMultiply<quint8, qint32>( in VectorTensorMultiply() 205 qint32* output) { in VectorTensorMultiply() 389 .TypeConstraint<qint32>("Toutput"), 390 QuantizedMulOp<quint8, qint32>);
|
D | mkl_requantize_per_channel_op.cc | 98 memory::desc input_md = memory::desc(dims_mkl_order, MklDnnType<qint32>(), in Compute() 113 static_cast<void*>(const_cast<qint32*>(input.flat<qint32>().data())); in Compute() 167 .TypeConstraint<qint32>("T")
|
/external/tensorflow/tensorflow/core/grappler/ |
D | utils_test.cc | 558 TestSetTensorValue<qint32>(DT_QINT32, -8, /*success=*/true, /*error_msg=*/""); in TEST() 559 TestSetTensorValue<qint32>(DT_QINT32, 0, /*success=*/true, /*error_msg=*/""); in TEST() 560 TestSetTensorValue<qint32>(DT_QINT32, 8, /*success=*/true, /*error_msg=*/""); in TEST() 561 TestSetTensorValue<qint32>(DT_QINT32, std::numeric_limits<qint32>::min(), in TEST() 563 TestSetTensorValue<qint32>(DT_QINT32, std::numeric_limits<qint32>::max(), in TEST() 565 TestSetTensorValue<qint32>(DT_QINT32, kMinInt, /*success=*/true, in TEST() 567 TestSetTensorValue<qint32>(DT_QINT32, kMaxInt, /*success=*/true, in TEST()
|
/external/tensorflow/tensorflow/core/framework/ |
D | type_traits.h | 45 struct is_quantized<qint32> : true_type {}; 92 class numeric_limits<tensorflow::qint32> 105 struct is_signed<tensorflow::qint32> : public is_signed<tensorflow::int32> {};
|