Home
last modified time | relevance | path

Searched refs:integer_type (Results 1 – 25 of 30) sorted by relevance

12

/external/tensorflow/tensorflow/lite/kernels/
Dpad_test.cc346 template <typename integer_type, TensorType tensor_dtype>
367 template <typename integer_type, TensorType tensor_dtype>
377 m.template SetQuantizedInput<integer_type>({-0.8, 0.2, 0.9, 0.7}); in SimpleConstTest()
379 EXPECT_THAT(m.template GetDequantizedOutput<integer_type>(), in SimpleConstTest()
396 template <typename integer_type, TensorType tensor_dtype>
403 m.template SetQuantizedInput<integer_type>({-0.8, 0.2, 0.9, 0.7}); in SimpleDynamicTest()
406 EXPECT_THAT(m.template GetDequantizedOutput<integer_type>(), in SimpleDynamicTest()
423 template <typename integer_type, TensorType tensor_dtype>
430 m.template SetQuantizedInput<integer_type>({-0.8, 0.2, 0.9, 0.7, 0.1, -0.3}); in AdvancedConstTest()
432 EXPECT_THAT(m.template GetDequantizedOutput<integer_type>(), in AdvancedConstTest()
[all …]
Dpad.cc136 template <typename integer_type>
139 integer_type pad_value; in EvalInt()
144 std::numeric_limits<integer_type>::min()); in EvalInt()
146 std::numeric_limits<integer_type>::max()); in EvalInt()
147 pad_value = static_cast<integer_type>(op_context.output->params.zero_point); in EvalInt()
155 pad_value = *GetTensorData<integer_type>(op_context.constant_values); in EvalInt()
157 const integer_type pad_value_copy = pad_value; in EvalInt()
161 GetTensorData<integer_type>(op_context.input), &pad_value_copy, in EvalInt()
163 GetTensorData<integer_type>(op_context.output)); in EvalInt()
166 GetTensorData<integer_type>(op_context.input), in EvalInt()
[all …]
Dreduce_test.cc141 template <typename integer_type = int8_t>
144 (max - min) / (std::numeric_limits<integer_type>::max() - in GetTolerance()
145 std::numeric_limits<integer_type>::min()); in GetTolerance()
375 template <typename integer_type, TensorType tensor_dtype>
377 float kQuantizedTolerance = GetTolerance<integer_type>(-255.0, 255.0); in MeanOpConstModelTest()
381 m.QuantizeAndPopulate<integer_type>(m.Input(), data); in MeanOpConstModelTest()
384 EXPECT_THAT(m.GetDequantizedOutput<integer_type>(), in MeanOpConstModelTest()
398 template <typename integer_type, TensorType tensor_dtype>
400 float kQuantizedTolerance = GetTolerance<integer_type>(-5.0, 5.0); in ConstMeanOpTestNonSameScale()
404 m.QuantizeAndPopulate<integer_type>(m.Input(), data); in ConstMeanOpTestNonSameScale()
[all …]
Dreduce.cc348 template <typename integer_type>
365 if (std::is_same<integer_type, uint8_t>::value) { in EvalMeanReferenceOps()
377 GetTensorData<integer_type>(input), in EvalMeanReferenceOps()
380 GetTensorData<integer_type>(op_context.output), in EvalMeanReferenceOps()
388 GetTensorData<integer_type>(input), input->dims->data, in EvalMeanReferenceOps()
389 input->dims->size, GetTensorData<integer_type>(op_context.output), in EvalMeanReferenceOps()
398 GetTensorData<integer_type>(input), input->params.zero_point, in EvalMeanReferenceOps()
400 GetTensorData<integer_type>(op_context.output), in EvalMeanReferenceOps()
/external/tensorflow/tensorflow/lite/delegates/hexagon/builders/tests/
Dpad_test.cc36 template <typename integer_type>
38 QuantizeAndPopulate<integer_type>(input_, data); in SetQuantizedInput()
47 template <typename integer_type>
49 return Dequantize<integer_type>(ExtractVector<integer_type>(output_), in GetDequantizedOutput()
59 template <typename integer_type, TensorType tensor_dtype>
66 m.SetQuantizedInput<integer_type>({-0.8, 0.2, 0.9, 0.7}); in SimpleConstTestImpl()
68 EXPECT_THAT(m.GetDequantizedOutput<integer_type>(), in SimpleConstTestImpl()
75 template <typename integer_type, TensorType tensor_dtype>
80 m.SetQuantizedInput<integer_type>({-0.8, 0.2, 0.9, 0.7, 0.1, -0.3}); in AdvancedConstTestImpl()
82 EXPECT_THAT(m.GetDequantizedOutput<integer_type>(), in AdvancedConstTestImpl()
Dconcat_test.cc85 template <typename integer_type, TensorType tensor_dtype>
93 m0.SetInput<integer_type>(0, {1.0f, 3.0f, 4.0f, 7.0f}); in FourInputsQuantizedSameRangeImpl()
94 m0.SetInput<integer_type>(1, {1.1f, 3.1f, 4.1f, 7.1f}); in FourInputsQuantizedSameRangeImpl()
95 m0.SetInput<integer_type>(2, {1.2f, 3.2f, 4.2f, 7.2f}); in FourInputsQuantizedSameRangeImpl()
96 m0.SetInput<integer_type>(3, {1.3f, 3.3f, 4.3f, 7.3f}); in FourInputsQuantizedSameRangeImpl()
98 EXPECT_THAT(m0.GetDequantizedOutput<integer_type>(), in FourInputsQuantizedSameRangeImpl()
115 template <typename integer_type, TensorType tensor_dtype>
121 std::numeric_limits<integer_type>::min(), in TwoInputsNegativeAxisImpl()
122 std::numeric_limits<integer_type>::max()}, in TwoInputsNegativeAxisImpl()
125 std::numeric_limits<integer_type>::min(), in TwoInputsNegativeAxisImpl()
[all …]
Dsplit_test.cc54 template <typename integer_type, TensorType tensor_dtype>
72 const_m.SetInput<integer_type>(input_data); in CheckSplitBehavior()
76 const_m.GetDequantizedOutput<integer_type>(i), in CheckSplitBehavior()
84 template <typename integer_type, TensorType tensor_dtype>
86 CheckSplitBehavior<integer_type, tensor_dtype>( in CheckFourDimSplitImpl()
93 CheckSplitBehavior<integer_type, tensor_dtype>( in CheckFourDimSplitImpl()
100 CheckSplitBehavior<integer_type, tensor_dtype>( in CheckFourDimSplitImpl()
107 CheckSplitBehavior<integer_type, tensor_dtype>( in CheckFourDimSplitImpl()
Dtranspose_test.cc42 template <typename integer_type>
43 void SetInput(const std::vector<integer_type>& data) { in SetInput()
44 PopulateTensor<integer_type>(input_, data); in SetInput()
47 template <typename integer_type>
48 std::vector<integer_type> GetOutput() { in GetOutput()
49 return ExtractVector<integer_type>(output_); in GetOutput()
58 template <typename integer_type>
61 std::vector<integer_type>* input, in ComputeExpectedTransposeResult()
62 std::vector<integer_type>* input_transposed) { in ComputeExpectedTransposeResult()
87 reference_ops::Transpose<integer_type>(params, input_shape, input->data(), in ComputeExpectedTransposeResult()
Dactivations_test.cc80 template <typename integer_type, TensorType tensor_dtype>
87 model.SetInput<integer_type>({1, 5, 7}); in ReluTestImpl()
91 EXPECT_THAT(model.GetDequantizedOutput<integer_type>(), in ReluTestImpl()
96 template <typename integer_type, TensorType tensor_dtype>
103 model.SetInput<integer_type>({4, -1.0, 8}); in Relu6TestImpl()
107 EXPECT_THAT(model.GetDequantizedOutput<integer_type>(), in Relu6TestImpl()
112 template <typename integer_type, TensorType tensor_dtype>
120 model.SetInput<integer_type>({4, -1.0, 8}); in TanhTestImpl()
124 EXPECT_THAT(model.GetDequantizedOutput<integer_type>(), in TanhTestImpl()
129 template <typename integer_type, TensorType tensor_dtype>
[all …]
Dspace_to_depth_test.cc39 template <typename integer_type>
40 void SetInput(const std::vector<integer_type>& data) { in SetInput()
41 PopulateTensor<integer_type>(input_, data); in SetInput()
44 template <typename integer_type>
45 std::vector<integer_type> GetOutput() { in GetOutput()
46 return ExtractVector<integer_type>(output_); in GetOutput()
Dneg_test.cc31 template <typename integer_type>
33 QuantizeAndPopulate<integer_type>(input_, data); in SetQuantizedInput()
36 template <typename integer_type>
38 return Dequantize<integer_type>(ExtractVector<integer_type>(output_), in GetDequantizedOutput()
Dpack_test.cc38 template <typename integer_type>
40 QuantizeAndPopulate<integer_type>(index, data); in SetInput()
43 template <typename integer_type>
45 return Dequantize<integer_type>(ExtractVector<integer_type>(output_), in GetDequantizedOutput()
Darg_min_max_test.cc75 template <typename integer_type, TensorType tensor_dtype>
91 template <typename integer_type, TensorType tensor_dtype>
108 template <typename integer_type, TensorType tensor_dtype>
/external/tensorflow/tensorflow/lite/kernels/internal/reference/integer_ops/
Dmean.h23 template <typename integer_type>
26 const integer_type* input_data, int32_t input_zero_point, in Mean()
28 integer_type* output_data, int32_t output_zero_point) { in Mean()
51 static constexpr int32_t kMinInt = std::numeric_limits<integer_type>::min(); in Mean()
52 static constexpr int32_t kMaxInt = std::numeric_limits<integer_type>::max(); in Mean()
69 static_cast<integer_type>(acc); in Mean()
/external/tensorflow/tensorflow/lite/delegates/nnapi/
Dnnapi_delegate_test.cc5160 template <typename integer_type, TensorType tensor_dtype>
5164 PadV2OpConstModel<integer_type> m( in SimpleConstTestV2()
5167 m.template SetQuantizedInput<integer_type>({-0.8, 0.2, 0.9, 0.7}); in SimpleConstTestV2()
5168 m.template SetQuantizedPadValue<integer_type>(0); in SimpleConstTestV2()
5170 EXPECT_THAT(m.template GetDequantizedOutput<integer_type>(), in SimpleConstTestV2()
5184 template <typename integer_type, TensorType tensor_dtype>
5186 PadV2OpDynamicModel<integer_type> m({tensor_dtype, {1, 2, 2, 1}, -1.0, 1.0}, in SimpleDynamicTestV2()
5189 m.template SetQuantizedInput<integer_type>({-0.8, 0.2, 0.9, 0.7}); in SimpleDynamicTestV2()
5190 m.template SetQuantizedPadValue<integer_type>(0); in SimpleDynamicTestV2()
5193 EXPECT_THAT(m.template GetDequantizedOutput<integer_type>(), in SimpleDynamicTestV2()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/xla/
Dtype_to_shape.cc63 } else if (auto integer_type = type.dyn_cast<mlir::IntegerType>()) { in TypeToPrimitiveType() local
64 bool is_unsigned = integer_type.isUnsigned(); in TypeToPrimitiveType()
65 switch (integer_type.getWidth()) { in TypeToPrimitiveType()
/external/tensorflow/tensorflow/compiler/mlir/hlo/include/mlir-hlo/Dialect/mhlo/transforms/
Dmap_lmhlo_to_scalar_op.h198 auto integer_type = element_type.dyn_cast<IntegerType>();
201 b->create<::mlir::ConstantIntOp>(loc, 0, integer_type.getWidth());
698 auto integer_type = element_type.dyn_cast<IntegerType>();
701 b->create<::mlir::ConstantIntOp>(loc, 0, integer_type.getWidth());
717 if (auto integer_type = element_type.dyn_cast<IntegerType>()) {
720 b->create<::mlir::ConstantIntOp>(loc, -1, integer_type.getWidth());
886 } else if (auto integer_type = element_type.dyn_cast<IntegerType>()) {
889 b->create<::mlir::ConstantIntOp>(loc, 0, integer_type.getWidth());
891 loc, integer_type.getWidth() - 1, integer_type.getWidth());
893 b->create<::mlir::ConstantIntOp>(loc, 1, integer_type.getWidth());
/external/deqp-deps/SPIRV-Tools/source/opt/
Dconst_folding_rules.cpp430 const analysis::Integer* integer_type = result_type->AsInteger(); in FoldFToIOp() local
433 assert(integer_type != nullptr); in FoldFToIOp()
434 if (integer_type->width() != 32) return nullptr; in FoldFToIOp()
437 uint32_t result = integer_type->IsSigned() in FoldFToIOp()
444 uint32_t result = integer_type->IsSigned() in FoldFToIOp()
461 const analysis::Integer* integer_type = a->type()->AsInteger(); in FoldIToFOp() local
464 assert(integer_type != nullptr); in FoldIToFOp()
465 if (integer_type->width() != 32) return nullptr; in FoldIToFOp()
468 float result_val = integer_type->IsSigned() in FoldIToFOp()
475 double result_val = integer_type->IsSigned() in FoldIToFOp()
/external/angle/third_party/vulkan-deps/spirv-tools/src/source/opt/
Dconst_folding_rules.cpp430 const analysis::Integer* integer_type = result_type->AsInteger(); in FoldFToIOp() local
433 assert(integer_type != nullptr); in FoldFToIOp()
434 if (integer_type->width() != 32) return nullptr; in FoldFToIOp()
437 uint32_t result = integer_type->IsSigned() in FoldFToIOp()
444 uint32_t result = integer_type->IsSigned() in FoldFToIOp()
461 const analysis::Integer* integer_type = a->type()->AsInteger(); in FoldIToFOp() local
464 assert(integer_type != nullptr); in FoldIToFOp()
465 if (integer_type->width() != 32) return nullptr; in FoldIToFOp()
468 float result_val = integer_type->IsSigned() in FoldIToFOp()
475 double result_val = integer_type->IsSigned() in FoldIToFOp()
/external/swiftshader/third_party/SPIRV-Tools/source/opt/
Dconst_folding_rules.cpp430 const analysis::Integer* integer_type = result_type->AsInteger(); in FoldFToIOp() local
433 assert(integer_type != nullptr); in FoldFToIOp()
434 if (integer_type->width() != 32) return nullptr; in FoldFToIOp()
437 uint32_t result = integer_type->IsSigned() in FoldFToIOp()
444 uint32_t result = integer_type->IsSigned() in FoldFToIOp()
461 const analysis::Integer* integer_type = a->type()->AsInteger(); in FoldIToFOp() local
464 assert(integer_type != nullptr); in FoldIToFOp()
465 if (integer_type->width() != 32) return nullptr; in FoldIToFOp()
468 float result_val = integer_type->IsSigned() in FoldIToFOp()
475 double result_val = integer_type->IsSigned() in FoldIToFOp()
/external/rust/crates/bindgen/src/codegen/
Dhelpers.rs106 pub fn integer_type( in integer_type() function
197 _ => super::integer_type(ctx, layout) in float_kind_rust_type()
/external/libabigail/src/
Dabg-comp-filter.cc1305 const type_base *integer_type = 0; in has_harmless_enum_to_int_change() local
1318 integer_type = i; in has_harmless_enum_to_int_change()
1320 integer_type = i; in has_harmless_enum_to_int_change()
1323 && integer_type in has_harmless_enum_to_int_change()
1324 && enum_type->get_size_in_bits() == integer_type->get_size_in_bits()) in has_harmless_enum_to_int_change()
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dvector_support_library.cc146 llvm::Type* integer_type = IntegerTypeForFloatSize(is_vector); in I1ToFloat() local
147 return b()->CreateBitCast(b()->CreateSExt(i1, integer_type, name()), in I1ToFloat()
/external/tensorflow/tensorflow/compiler/xla/service/
Delemental_ir_emitter.cc1596 llvm::IntegerType* integer_type = in SaturateShiftIfNecessary() local
1598 unsigned integer_bitsize = integer_type->getBitWidth(); in SaturateShiftIfNecessary()
1600 llvm::ConstantInt::get(integer_type, integer_bitsize); in SaturateShiftIfNecessary()
1601 llvm::ConstantInt* zero = llvm::ConstantInt::get(integer_type, 0); in SaturateShiftIfNecessary()
1602 llvm::ConstantInt* minus_one = llvm::ConstantInt::get(integer_type, -1); in SaturateShiftIfNecessary()
1624 auto* integer_type = llvm::cast<llvm::IntegerType>(type); in GetIntSMin() local
1625 return llvm::ConstantInt::get(integer_type, llvm::APInt::getSignedMinValue( in GetIntSMin()
1626 integer_type->getBitWidth())); in GetIntSMin()
1630 auto* integer_type = llvm::cast<llvm::IntegerType>(type); in GetMinusOne() local
1632 integer_type, llvm::APInt::getAllOnesValue(integer_type->getBitWidth())); in GetMinusOne()
/external/igt-gpu-tools/assembler/
Dbrw_eu_emit.c482 unsigned integer_type, in brw_set_math_message() argument
520 insn->bits3.math_gen5.int_type = integer_type; in brw_set_math_message()
527 insn->bits3.math.int_type = integer_type; in brw_set_math_message()

12