/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_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() 74 test::FillFn<qint32>(&quantized_tensor, [](int n) { return qint32(n); }); in BM_RequantizationRange() 76 qint32 actual_min; in BM_RequantizationRange() 77 qint32 actual_max; in BM_RequantizationRange()
|
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 | 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_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() 288 ConcatHelper<qint32>(state, 0 /* concat_dimension */, true /* same_limits */, in BM_QConcatDim0SameLimitQInt32() 295 ConcatHelper<qint32>(state, 1 /* concat_dimension */, true /* same_limits */, in BM_QConcatDim1SameLimitQInt32() [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 | requantize.cc | 76 if (meta::IsSupportedAndEnabled() && std::is_same<T1, qint32>() && in Compute() 78 auto input_i32_array = input.flat<qint32>(); in Compute() 98 .TypeConstraint<qint32>("Tinput") 100 RequantizeOp<qint32, quint8>); 104 .TypeConstraint<qint32>("Tinput") 106 RequantizeOp<qint32, qint8>);
|
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_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_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_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 | 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 | 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 | quantization_utils.h | 248 inline void RequantizeManyInNewRangeReference(const qint32* input, int64 count, in RequantizeManyInNewRangeReference() 296 float min_output, float max_output, qint32* output) { in RequantizeManyInNewRange8To32BitReference() 300 FloatToQuantizedUnclamped<qint32>(code_0_float, min_output, max_output); in RequantizeManyInNewRange8To32BitReference() 302 FloatToQuantizedUnclamped<qint32>(code_1_float, min_output, max_output); in RequantizeManyInNewRange8To32BitReference() 305 static_cast<int64>(Eigen::NumTraits<qint32>::lowest()); in RequantizeManyInNewRange8To32BitReference() 307 static_cast<int64>(Eigen::NumTraits<qint32>::highest()); in RequantizeManyInNewRange8To32BitReference() 320 inline void RequantizeManyInNewRangeNeon(const qint32* input, int64 count, in RequantizeManyInNewRangeNeon() 407 inline void RequantizeManyInNewRange<qint32, quint8>( 408 const qint32* input, int64 count, float min_input, float max_input, 597 inline void RequantizeManyInNewRange<quint8, qint32>( [all …]
|
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()
|
/external/tensorflow/tensorflow/core/kernels/mkl/ |
D | mkl_qmatmul_op_test.cc | 87 .Attr("Toutput", DataTypeToEnum<qint32>::v()) in TEST_F() 88 .Attr("T", DataTypeToEnum<qint32>::v()) in TEST_F() 102 AddInputFromArray<qint32>(TensorShape({4}), {1, 2, 3, 4}); in TEST_F() 129 test::FillValues<qint32>(&expected, {75, 82, 89, 96, 174, 190, 206, 222}); in TEST_F() 135 conv_comp.ConvertMKL2TF<qint32>(DT_QINT32, output, mkl_shape_tensor, in TEST_F() 138 test::ExpectTensorEqual<qint32>(expected, output_quantized); in TEST_F() 160 .Attr("Toutput", DataTypeToEnum<qint32>::v()) in TEST_F() 161 .Attr("T", DataTypeToEnum<qint32>::v()) in TEST_F() 175 AddInputFromArray<qint32>(TensorShape({4}), {100, -200, 300, -400}); in TEST_F() 202 test::FillValues<qint32>(&expected, in TEST_F() [all …]
|
D | mkl_requantize_ops_test.cc | 94 test::FillValues<qint32>( in Setup() 136 .Attr("T", DataTypeToEnum<qint32>::v()) in TEST_F() 142 AddInputFromArray<qint32>(input_tensor_qint32.shape(), in TEST_F() 143 input_tensor_qint32.flat<qint32>()); in TEST_F() 197 .Attr("T", DataTypeToEnum<qint32>::v()) in TEST_F() 203 AddInputFromArray<qint32>(input_tensor_qint32.shape(), in TEST_F() 204 input_tensor_qint32.flat<qint32>()); in TEST_F() 259 .Attr("T", DataTypeToEnum<qint32>::v()) in TEST_F() 265 AddInputFromArray<qint32>(input_tensor_qint32.shape(), in TEST_F() 266 input_tensor_qint32.flat<qint32>()); in TEST_F()
|
D | mkl_quantized_conv_ops_test.cc | 90 .Attr("out_type", DataTypeToEnum<qint32>::v()) in ConfigureQuantizedConv2D() 164 test::FillValues<qint32>(&expected, {229, 301, 133, 181, 483, 597, 267, in RunQuantizedDepthwiseConv2DOp() 167 test::FillValues<qint32>(&expected, {228, 300, 132, 180, 482, 596, 266, in RunQuantizedDepthwiseConv2DOp() 176 conv_comp.ConvertMklToTF<qint32>(DT_QINT32, output, output_mkl_metadata, in RunQuantizedDepthwiseConv2DOp() 179 test::ExpectTensorEqual<qint32>(expected, output_quantized); in RunQuantizedDepthwiseConv2DOp() 277 conv_comp.ConvertMklToTF<qint32>(DT_QINT32, output, output_mkl_metadata, in TEST_F() 283 QuantizedTensorToFloat<qint32>(output_quantized, output_min, output_max); in TEST_F() 318 .Attr("out_type", DataTypeToEnum<qint32>::v()) in TEST_F() 381 conv_comp.ConvertMklToTF<qint32>(DT_QINT32, output, output_mkl_metadata, in TEST_F() 387 QuantizedTensorToFloat<qint32>(output_quantized, output_min, output_max); in TEST_F() [all …]
|
D | mkl_qmatmul_op.cc | 321 std::is_same<Toutput, qint32>::value) { in Compute() 344 MklQuantizationRangeForMultiplication<quint8, qint8, qint32>( in ComputeOutputRangeForInt32() 401 if (std::is_same<Tbias, qint32>::value) { in GetBiasHandle() 538 .TypeConstraint<qint32>("Toutput"), 547 .TypeConstraint<qint32>("Toutput") 549 MklDnnQuantizedMatMulOp<CPUDevice, quint8, qint8, float, qint32>); 555 .TypeConstraint<qint32>("Tbias") 556 .TypeConstraint<qint32>("Toutput") 558 MklDnnQuantizedMatMulOp<CPUDevice, quint8, qint8, qint32, qint32>); 567 .TypeConstraint<qint32>("Toutput"), [all …]
|
D | mkl_conv_ops.cc | 1412 MklQuantizationRangeForMultiplication<Tinput, qint8, qint32>( in Compute() 1429 MklQuantizationRangeForMultiplication<Tinput, qint8, qint32>( in Compute() 1507 if (std::is_same<Tbias, qint32>::value) { in GetBiasHandle() 1845 .TypeConstraint<qint32>("out_type"), 1860 .TypeConstraint<qint32>("out_type"), 1867 .TypeConstraint<qint32>("out_type") 1869 MklQuantizedConv2DOp<CPUDevice, quint8, float, qint32, 1870 qint32, false, false>); 1877 .TypeConstraint<qint32>("out_type") 1879 MklQuantizedConv2DOp<CPUDevice, quint8, float, qint32, [all …]
|
D | mkl_requantization_range_per_channel_op.cc | 66 auto input_matrix = input.flat_inner_dims<qint32>(); in Compute() 88 Eigen::Tensor<qint32, 0, Eigen::RowMajor> min = in Compute() 90 Eigen::Tensor<qint32, 0, Eigen::RowMajor> max = in Compute() 132 .TypeConstraint<qint32>("T"),
|
D | mkl_requantize_per_channel_op.cc | 103 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() 174 .TypeConstraint<qint32>("T") 180 .TypeConstraint<qint32>("T")
|
/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> {};
|