Home
last modified time | relevance | path

Searched refs:primitive_util (Results 1 – 25 of 72) sorted by relevance

123

/external/tensorflow/tensorflow/compiler/xla/
Dprimitive_util_test.cc32 primitive_util::StringToPrimitiveType(str)); in TEST()
40 EXPECT_IS_NOT_OK(primitive_util::StringToPrimitiveType("F32").status()); in TEST()
41 EXPECT_IS_NOT_OK(primitive_util::StringToPrimitiveType("Pred").status()); in TEST()
42 EXPECT_IS_NOT_OK(primitive_util::StringToPrimitiveType("preD").status()); in TEST()
46 EXPECT_EQ(primitive_util::SignificandWidth(F32), 24); in TEST()
47 EXPECT_EQ(primitive_util::SignificandWidth(BF16), 8); in TEST()
48 EXPECT_EQ(primitive_util::ExponentWidth(F32), 8); in TEST()
49 EXPECT_EQ(primitive_util::ExponentWidth(BF16), 8); in TEST()
Dliteral_util.h259 typename T = typename primitive_util::PrimitiveTypeToNative<type>::type>
270 typename T = typename primitive_util::PrimitiveTypeToNative<type>::type>
280 typename T = typename primitive_util::PrimitiveTypeToNative<type>::type>
298 primitive_util::NativeToPrimitiveType<NativeT>(), {})); in CreateR0()
306 ShapeUtil::MakeShape(primitive_util::NativeToPrimitiveType<NativeT>(), in CreateR1()
317 primitive_util::NativeToPrimitiveType<NativeT>(), in CreateR2WithLayout()
406 primitive_util::NativeToPrimitiveType<NativeT>(), values.dimensions(), in CreateFromArrayWithLayout()
522 primitive_util::NativeToPrimitiveType<NativeT>(), dimensions)); in CreateFullWithDescendingLayout()
531 using NativeT = typename primitive_util::PrimitiveTypeToNative<type>::type; in CreateLiteralWithGenerator()
542 using NativeT = typename primitive_util::PrimitiveTypeToNative<type>::type; in CreateRandomLiteral()
Dliteral.h897 primitive_util::NativeToPrimitiveType<NativeT>()) in data()
899 << PrimitiveType_Name(primitive_util::NativeToPrimitiveType<NativeT>()) in data()
910 primitive_util::NativeToPrimitiveType<NativeT>()) in data()
912 << PrimitiveType_Name(primitive_util::NativeToPrimitiveType<NativeT>()) in data()
998 primitive_util::NativeToPrimitiveType<NativeT>()); in PopulateR1()
1009 primitive_util::NativeToPrimitiveType<NativeT>()); in PopulateR2()
1032 primitive_util::NativeToPrimitiveType<NativeT>()); in PopulateFromArray()
1064 primitive_util::NativeToPrimitiveType<NativeT>()); in PopulateInternal()
1115 primitive_util::NativeToPrimitiveType<NativeT>()); in PopulateWithValue()
Dshape_util.h282 ? primitive_util::OverflowExponent(shape.element_type()) in HigherPrecisionElementType()
287 ? primitive_util::SignificandWidth(shape.element_type()) in HigherPrecisionElementType()
290 primitive_util::BitWidth(shape.element_type()), in HigherPrecisionElementType()
292 primitive_util::IsSignedIntegralType(shape.element_type())); in HigherPrecisionElementType()
455 return ShapeUtil::MakeShape(primitive_util::NativeToPrimitiveType<T>(), in MakeShapeWithType()
Dshape_util.cc114 return primitive_util::IsArrayType(primitive_type); in IsArrayPrimitiveType()
433 return primitive_util::IsIntegralType(shape.element_type()); in ElementIsIntegral()
445 return primitive_util::BitWidth(shape.element_type()) == bits; in ElementHasBitWidth()
478 return primitive_util::IsComplexType(shape.element_type()); in ElementIsComplex()
482 return primitive_util::IsFloatingPointType(shape.element_type()); in ElementIsFloating()
531 return ChangeElementType(complex_shape, primitive_util::ComplexComponentType( in ComplexComponentShape()
600 primitive_util::LowercasePrimitiveTypeName(shape.element_type()), "[", in HumanString()
806 primitive_util::LowercasePrimitiveTypeName(shape.element_type()), in ValidateShapeWithOptionalLayoutInternal()
812 primitive_util::LowercasePrimitiveTypeName(shape.element_type()), in ValidateShapeWithOptionalLayoutInternal()
Dliteral_util.cc53 primitive_util::NativeToPrimitiveType<FromNativeT>()) { in ConvertType()
55 primitive_util::NativeToPrimitiveType<ToNativeT>()); in ConvertType()
67 primitive_util::NativeToPrimitiveType<FromNativeT>()) { in ConvertType()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dcast_op.cc53 } else if (xla::primitive_util::IsComplexType(src_type_) && in Compile()
54 !xla::primitive_util::IsComplexType(dst_type_)) { in Compile()
62 xla::primitive_util::IsFloatingPointType(src_type_) && in Compile()
63 xla::primitive_util::IsFloatingPointType(dst_type_), in Compile()
67 xla::primitive_util::SignificandWidth(src_type_) - in Compile()
68 xla::primitive_util::SignificandWidth(dst_type_); in Compile()
74 int src_bitwidth = xla::primitive_util::BitWidth(src_type_); in Compile()
80 xla::primitive_util::UnsignedIntegralTypeForBitWidth(src_bitwidth); in Compile()
126 !xla::primitive_util::IsComplexType(src_type_) && in Compile()
127 !xla::primitive_util::IsComplexType(dst_type_), in Compile()
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/
Doperand_upcaster_test.cc34 return primitive_util::BitWidth(operand_type) < in ShouldUpcast()
35 primitive_util::BitWidth(result_type); in ShouldUpcast()
51 module_tmpl, primitive_util::LowercasePrimitiveTypeName(lhs_type), in TEST_P()
52 primitive_util::LowercasePrimitiveTypeName(rhs_type), in TEST_P()
53 primitive_util::LowercasePrimitiveTypeName(result_type)); in TEST_P()
66 primitive_util::LowercasePrimitiveTypeName(result_type)))) in TEST_P()
73 primitive_util::LowercasePrimitiveTypeName(result_type)))) in TEST_P()
80 primitive_util::LowercasePrimitiveTypeName(result_type))))); in TEST_P()
Dcomparison_expander.cc69 primitive_util::IsFloatingPointType(lhs->shape().element_type())) { in InstructionMatchesPattern()
87 CHECK(primitive_util::IsFloatingPointType(compare_type)); in ExpandInstruction()
100 int64 bit_width = primitive_util::BitWidth(compare_type); in ExpandInstruction()
102 primitive_util::SignedIntegralTypeForBitWidth(bit_width); in ExpandInstruction()
104 primitive_util::UnsignedIntegralTypeForBitWidth(bit_width); in ExpandInstruction()
Delemental_ir_emitter.cc74 if (!primitive_util::IsFloatingPointType(src_ty)) { in EmitReducePrecisionIR()
86 int src_mantissa_bits = primitive_util::SignificandWidth(src_ty) - 1; in EmitReducePrecisionIR()
203 /*dest_exponent_bits=*/primitive_util::ExponentWidth(BF16), in EmitF32ToBF16()
204 /*dest_mantissa_bits=*/primitive_util::SignificandWidth(BF16) - 1, in EmitF32ToBF16()
223 if (primitive_util::IsSignedIntegralType(from_type)) { in EmitIntegralToFloating()
227 CHECK(primitive_util::IsUnsignedIntegralType(from_type) || in EmitIntegralToFloating()
254 CHECK(primitive_util::IsIntegralType(from_type) || from_type == PRED) in EmitIntegerUnaryOp()
265 if (primitive_util::IsIntegralType(to_type)) { in EmitIntegerUnaryOp()
268 primitive_util::IsSignedIntegralType(from_type)); in EmitIntegerUnaryOp()
270 if (primitive_util::IsFloatingPointType(to_type)) { in EmitIntegerUnaryOp()
[all …]
Drng_expander.cc36 int64 bit_width = primitive_util::BitWidth(shape.element_type()); in GetNumberOf32bitUnits()
100 if (primitive_util::IsFloatingPointType(result_shape.element_type())) { in GetComputationForRng()
133 if (primitive_util::BitWidth(old_primitive_type) < 32) { in ExpandInstruction()
Dshape_inference.cc225 if (primitive_util::IsIntegralType(from_type) != in MaybeUpcast()
226 primitive_util::IsIntegralType(*preferred_element_type)) { in MaybeUpcast()
231 if (!primitive_util::IsSignedIntegralType(from_type) != in MaybeUpcast()
232 !primitive_util::IsSignedIntegralType(*preferred_element_type)) { in MaybeUpcast()
237 if (!primitive_util::IsFloatingPointType(from_type) && in MaybeUpcast()
238 primitive_util::BitWidth(*preferred_element_type) < in MaybeUpcast()
239 primitive_util::BitWidth(from_type)) { in MaybeUpcast()
310 shape, primitive_util::ComplexComponentType(shape.element_type())); in InferUnaryOpShape()
357 !primitive_util::IsIntegralType(shape.element_type())) { in InferUnaryOpShape()
454 if (primitive_util::IsComplexType(old_element_type) && in InferConvertShape()
[all …]
Dname_uniquer.cc63 if (primitive_util::IsPrimitiveTypeName(result) && result != "tuple") { in GetSanitizedName()
Dhlo_lexer.cc258 if (primitive_util::IsPrimitiveTypeName(identifier)) { in LexIdentifier()
260 primitive_util::StringToPrimitiveType(identifier).ValueOrDie(); in LexIdentifier()
/external/tensorflow/tensorflow/compiler/xla/tests/
Ddynamic_ops_test.cc129 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR1()
133 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR1()
155 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR2()
159 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR2()
190 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR3()
194 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR3()
381 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR0()
385 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR0()
389 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR0()
408 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR1()
[all …]
Diota_test.cc105 if (primitive_util::IsFloatingPointType(element_type)) { in XLA_TEST_P()
137 if (primitive_util::IsFloatingPointType(element_type)) { in XLA_TEST_P()
Dtest_utils.cc151 primitive_util::NativeToPrimitiveType<FloatT>()); in PopulateWithFloatingPointData()
167 primitive_util::NativeToPrimitiveType<ComplexT>()); in PopulateWithComplexData()
169 result->shape(), primitive_util::NativeToPrimitiveType<InnerFloatT>()); in PopulateWithComplexData()
194 primitive_util::NativeToPrimitiveType<half>()); in PopulateWithFloatingPointData()
211 primitive_util::NativeToPrimitiveType<bfloat16>()); in PopulateWithFloatingPointData()
243 primitive_util::NativeToPrimitiveType<IntT>()); in PopulateWithRandomIntegralData()
357 primitive_util::NativeToPrimitiveType<IntT>()); in PopulateWithRandomIntegralDataWithBounds()
Dexhaustive_op_test_utils.h82 using NativeT = typename primitive_util::PrimitiveTypeToNative<T>::type;
87 using NativeT = typename primitive_util::PrimitiveTypeToNative<T>::type;
137 using NativeT = typename primitive_util::PrimitiveTypeToNative<T>::type;
139 typename primitive_util::PrimitiveTypeToNative<RefT::value>::type;
141 typename primitive_util::PrimitiveTypeToNative<ComponentT::value>::type;
142 using ComponentNativeRefT = typename primitive_util::PrimitiveTypeToNative<
145 typename primitive_util::PrimitiveTypeToNative<
/external/tensorflow/tensorflow/compiler/xla/client/lib/
Dconstants.h36 !(primitive_util::IsFloatingPointType(type) || in ConstantR0WithType()
37 primitive_util::IsComplexType(type))) { in ConstantR0WithType()
43 !primitive_util::IsComplexType(type)) { in ConstantR0WithType()
Dmath.cc91 if (!primitive_util::IsFloatingPointType(elem_ty)) { in EnsureOperandIsRealFp()
1143 if (primitive_util::IsComplexType(shape.element_type())) { in Acos()
1146 Zero(b, primitive_util::ComplexComponentType(shape.element_type())), in Acos()
1147 One(b, primitive_util::ComplexComponentType(shape.element_type()))); in Acos()
1200 if (primitive_util::IsComplexType(shape.element_type())) { in Acosh()
1237 if (primitive_util::IsComplexType(shape.element_type())) { in Asinh()
1275 if (primitive_util::IsComplexType(shape.element_type())) { in Atanh()
1322 if (primitive_util::IsComplexType(shape.element_type())) { in Sinh()
1352 primitive_util::IsComplexType(shape.element_type()) && conjugate; in MaybeConjugate()
1361 int bitwidth = primitive_util::BitWidth(shape.element_type()); in NextAfter()
[all …]
Darithmetic_test.cc83 MinMaxImpl(x, primitive_util::NativeToPrimitiveType<NativeT>()); in TestArgMinMaxImpl()
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dgpu_scatter_expander.cc30 primitive_util::BitWidth(inst->shape().element_type()) > 64; in InstructionMatchesPattern()
Dcudnn_batchnorm_runner.cc249 primitive_util::LowercasePrimitiveTypeName(config.output_type) in RunCudnnBatchNormForwardInference()
278 primitive_util::LowercasePrimitiveTypeName(config.output_type) in RunCudnnBatchNormForwardTraining()
310 primitive_util::LowercasePrimitiveTypeName(config.output_type) in RunCudnnBatchNormBackward()
/external/tensorflow/tensorflow/core/tpu/kernels/xla/
Dhost_compute_ops.cc159 xla::primitive_util::LowercasePrimitiveTypeName( in Compile()
219 xla::primitive_util::LowercasePrimitiveTypeName( in Compile()
424 xla::primitive_util::LowercasePrimitiveTypeName( in Compile()
476 xla::primitive_util::LowercasePrimitiveTypeName( in Compile()
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dtarget_machine_features.h90 (primitive_util::BitWidth(type) / 8); in vector_register_num_elements()

123