Home
last modified time | relevance | path

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

123

/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dcast_op.cc48 } else if (xla::primitive_util::IsComplexType(src_type_) && in Compile()
49 !xla::primitive_util::IsComplexType(dst_type_)) { in Compile()
57 xla::primitive_util::IsFloatingPointType(src_type_) && in Compile()
58 xla::primitive_util::IsFloatingPointType(dst_type_), in Compile()
62 xla::primitive_util::SignificandWidth(src_type_) - in Compile()
63 xla::primitive_util::SignificandWidth(dst_type_); in Compile()
69 int src_bitwidth = xla::primitive_util::BitWidth(src_type_); in Compile()
75 xla::primitive_util::UnsignedIntegralTypeForBitWidth(src_bitwidth); in Compile()
119 !xla::primitive_util::IsComplexType(src_type_) && in Compile()
120 !xla::primitive_util::IsComplexType(dst_type_), in Compile()
[all …]
/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()
Dliteral_util.h277 typename T = typename primitive_util::PrimitiveTypeToNative<type>::type>
288 typename T = typename primitive_util::PrimitiveTypeToNative<type>::type>
298 typename T = typename primitive_util::PrimitiveTypeToNative<type>::type>
316 primitive_util::NativeToPrimitiveType<NativeT>(), {})); in CreateR0()
324 ShapeUtil::MakeShape(primitive_util::NativeToPrimitiveType<NativeT>(), in CreateR1()
335 primitive_util::NativeToPrimitiveType<NativeT>(), in CreateR2WithLayout()
421 primitive_util::NativeToPrimitiveType<NativeT>(), dimensions, in CreateSparse()
439 primitive_util::NativeToPrimitiveType<NativeT>(), values.dimensions(), in CreateFromArrayWithLayout()
555 primitive_util::NativeToPrimitiveType<NativeT>(), dimensions)); in CreateFullWithDescendingLayout()
564 using NativeT = typename primitive_util::PrimitiveTypeToNative<type>::type; in CreateRandomLiteral()
[all …]
Dliteral.h872 primitive_util::NativeToPrimitiveType<NativeT>()) in data()
874 << PrimitiveType_Name(primitive_util::NativeToPrimitiveType<NativeT>()) in data()
885 primitive_util::NativeToPrimitiveType<NativeT>()) in data()
887 << PrimitiveType_Name(primitive_util::NativeToPrimitiveType<NativeT>()) in data()
996 primitive_util::NativeToPrimitiveType<NativeT>()); in PopulateR1()
1007 primitive_util::NativeToPrimitiveType<NativeT>()); in PopulateR2()
1030 primitive_util::NativeToPrimitiveType<NativeT>()); in PopulateFromArray()
1087 primitive_util::NativeToPrimitiveType<NativeT>()); in PopulateInternal()
1138 primitive_util::NativeToPrimitiveType<NativeT>()); in PopulateWithValue()
Dshape_util.cc85 return primitive_util::IsArrayType(primitive_type); in IsArrayPrimitiveType()
276 return primitive_util::IsIntegralType(shape.element_type()); in ElementIsIntegral()
288 return primitive_util::BitWidth(shape.element_type()) == bits; in ElementHasBitWidth()
321 return primitive_util::IsComplexType(shape.element_type()); in ElementIsComplex()
325 return primitive_util::IsFloatingPointType(shape.element_type()); in ElementIsFloating()
374 return ChangeElementType(complex_shape, primitive_util::ComplexComponentType( in ComplexComponentShape()
443 primitive_util::LowercasePrimitiveTypeName(shape.element_type()), "[", in HumanString()
459 primitive_util::LowercasePrimitiveTypeName(shape.element_type()), "["); in HumanStringWithLayout()
649 primitive_util::LowercasePrimitiveTypeName(shape.element_type()), in ValidateShapeWithOptionalLayoutInternal()
655 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()
Dshape_util.h273 return primitive_util::BitWidth(a.element_type()) < in HigherPrecisionElementType()
274 primitive_util::BitWidth(b.element_type()) in HigherPrecisionElementType()
393 return ShapeUtil::MakeShape(primitive_util::NativeToPrimitiveType<T>(), in MakeShapeWithType()
Dprimitive_util.h30 namespace primitive_util {
Dprimitive_util.cc25 namespace primitive_util { namespace
Dliteral.cc1240 primitive_util::NativeToPrimitiveType<NativeDestT>())); in ConvertBetweenNativeTypesWithConverter()
1318 typename primitive_util::PrimitiveTypeToNative< in ConvertIfTypesMatch()
1320 typename primitive_util::PrimitiveTypeToNative< in ConvertIfTypesMatch()
1324 typename primitive_util::PrimitiveTypeToNative< in ConvertIfTypesMatch()
1326 typename primitive_util::PrimitiveTypeToNative< in ConvertIfTypesMatch()
1417 if (primitive_util::BitWidth(shape().element_type()) != in BitcastConvert()
1418 primitive_util::BitWidth(primitive_dest_type)) { in BitcastConvert()
1424 primitive_util::BitWidth(shape().element_type()), in BitcastConvert()
1425 primitive_util::BitWidth(primitive_dest_type)); in BitcastConvert()
/external/tensorflow/tensorflow/compiler/xla/tests/
Ddynamic_ops_test.cc128 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR1()
132 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR1()
154 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR2()
158 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR2()
189 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR3()
193 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR3()
380 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR0()
384 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR0()
388 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR0()
407 .Convert(primitive_util::NativeToPrimitiveType<DataT>()) in RunR1()
[all …]
Diota_test.cc75 if (primitive_util::IsFloatingPointType(element_type)) { in TEST_P()
102 if (primitive_util::IsFloatingPointType(element_type)) { in TEST_P()
127 if (primitive_util::IsFloatingPointType(element_type)) { in TEST_P()
Dtest_utils.cc107 primitive_util::NativeToPrimitiveType<FloatT>()); in PopulateWithFloatingPointData()
121 primitive_util::NativeToPrimitiveType<ComplexT>()); in PopulateWithComplexData()
123 result->shape(), primitive_util::NativeToPrimitiveType<InnerFloatT>()); in PopulateWithComplexData()
146 primitive_util::NativeToPrimitiveType<half>()); in PopulateWithFloatingPointData()
160 primitive_util::NativeToPrimitiveType<bfloat16>()); in PopulateWithFloatingPointData()
173 primitive_util::NativeToPrimitiveType<IntT>()); in PopulateWithRandomIntegralData()
278 primitive_util::NativeToPrimitiveType<IntT>()); in PopulateWithRandomIntegralDataWithBounds()
Ddot_operation_test.cc236 auto prim_type = primitive_util::NativeToPrimitiveType<T>(); in TestImpl()
318 auto prim_type = primitive_util::NativeToPrimitiveType<NativeT>(); in TestImpl()
485 auto prim_type = primitive_util::NativeToPrimitiveType<T>(); in TestImpl()
516 auto prim_type = primitive_util::NativeToPrimitiveType<complex64>(); in XLA_TEST_F()
785 auto prim_type = primitive_util::NativeToPrimitiveType<T>(); in XLA_TYPED_TEST()
816 auto prim_type = primitive_util::NativeToPrimitiveType<T>(); in XLA_TYPED_TEST()
/external/tensorflow/tensorflow/compiler/xla/service/
Delemental_ir_emitter.cc176 /*exponent_bits=*/primitive_util::kBFloat16ExponentBits, in EmitF32ToBF16()
177 /*mantissa_bits=*/primitive_util::kBFloat16MantissaBits, b); in EmitF32ToBF16()
195 if (primitive_util::IsSignedIntegralType(from_type)) { in EmitIntegralToFloating()
199 CHECK(primitive_util::IsUnsignedIntegralType(from_type) || in EmitIntegralToFloating()
226 CHECK(primitive_util::IsIntegralType(from_type) || from_type == PRED) in EmitIntegerUnaryOp()
237 if (primitive_util::IsIntegralType(to_type)) { in EmitIntegerUnaryOp()
240 primitive_util::IsSignedIntegralType(from_type)); in EmitIntegerUnaryOp()
242 if (primitive_util::IsFloatingPointType(to_type)) { in EmitIntegerUnaryOp()
251 if (primitive_util::IsComplexType(to_type)) { in EmitIntegerUnaryOp()
253 primitive_util::ComplexComponentType(to_type), module_); in EmitIntegerUnaryOp()
[all …]
Dname_uniquer.cc62 if (primitive_util::IsPrimitiveTypeName(result) && result != "tuple") { in GetSanitizedName()
Dhlo_lexer.cc265 if (primitive_util::IsPrimitiveTypeName(identifier)) { in LexIdentifier()
267 primitive_util::StringToPrimitiveType(identifier).ValueOrDie(); in LexIdentifier()
Dshape_inference.cc284 shape, primitive_util::ComplexComponentType(shape.element_type())); in InferUnaryOpShape()
323 !primitive_util::IsIntegralType(shape.element_type())) { in InferUnaryOpShape()
409 if (primitive_util::IsComplexType(old_element_type) && in InferConvertShape()
410 !primitive_util::IsComplexType(new_element_type)) { in InferConvertShape()
417 !primitive_util::IsArrayType(new_element_type)) { in InferConvertShape()
433 if (primitive_util::IsComplexType(old_element_type) != in InferBitcastConvertShape()
434 primitive_util::IsComplexType(new_element_type)) { in InferBitcastConvertShape()
440 !primitive_util::IsArrayType(new_element_type)) { in InferBitcastConvertShape()
449 if (primitive_util::BitWidth(old_element_type) != in InferBitcastConvertShape()
450 primitive_util::BitWidth(new_element_type)) { in InferBitcastConvertShape()
[all …]
/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()
Dcomparators.cc124 if (primitive_util::IsFloatingPointType(operand_types[0])) { in CreateScalarComparisonComputation()
134 int64 bit_width = primitive_util::BitWidth(compare_type); in CreateScalarComparisonComputation()
Dmath.cc59 if (!primitive_util::IsFloatingPointType(elem_ty)) { in EnsureOperandIsRealFp()
559 primitive_util::IsComplexType(shape.element_type()) && conjugate; in MaybeConjugate()
568 int bitwidth = primitive_util::BitWidth(shape.element_type()); in NextAfter()
569 auto int_type = primitive_util::UnsignedIntegralTypeForBitWidth(bitwidth); in NextAfter()
Dmath_test.cc179 if (primitive_util::IsArrayType(ty)) { in XLA_TEST_F()
209 EXPECT_EQ(b.first_error().ok(), primitive_util::IsFloatingPointType(ty)); in XLA_TEST_F()
Dcomparators_test.cc45 typename T = typename primitive_util::PrimitiveTypeToNative<type>::type>
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dtarget_machine_features.h84 (primitive_util::BitWidth(type) / 8); in vector_register_num_elements()
Ddot_op_emitter.cc266 CHECK(primitive_util::IsFloatingPointType(primitive_type) || in EmitTiledLlvmIrGemv()
267 primitive_util::IsIntegralType(primitive_type)); in EmitTiledLlvmIrGemv()
831 (primitive_util::IsFloatingPointType(element_type) || in GetDotImplementationStrategy()
832 primitive_util::IsIntegralType(element_type))) { in GetDotImplementationStrategy()

123