/external/tensorflow/tensorflow/compiler/xla/ |
D | primitive_util_test.cc | 32 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()
|
D | literal_util.h | 259 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()
|
D | literal.h | 897 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()
|
D | shape_util.h | 282 ? 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()
|
D | shape_util.cc | 114 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()
|
D | literal_util.cc | 53 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/ |
D | cast_op.cc | 53 } 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/ |
D | operand_upcaster_test.cc | 34 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()
|
D | comparison_expander.cc | 69 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()
|
D | elemental_ir_emitter.cc | 74 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 …]
|
D | rng_expander.cc | 36 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()
|
D | shape_inference.cc | 225 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 …]
|
D | name_uniquer.cc | 63 if (primitive_util::IsPrimitiveTypeName(result) && result != "tuple") { in GetSanitizedName()
|
D | hlo_lexer.cc | 258 if (primitive_util::IsPrimitiveTypeName(identifier)) { in LexIdentifier() 260 primitive_util::StringToPrimitiveType(identifier).ValueOrDie(); in LexIdentifier()
|
/external/tensorflow/tensorflow/compiler/xla/tests/ |
D | dynamic_ops_test.cc | 129 .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 …]
|
D | iota_test.cc | 105 if (primitive_util::IsFloatingPointType(element_type)) { in XLA_TEST_P() 137 if (primitive_util::IsFloatingPointType(element_type)) { in XLA_TEST_P()
|
D | test_utils.cc | 151 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()
|
D | exhaustive_op_test_utils.h | 82 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/ |
D | constants.h | 36 !(primitive_util::IsFloatingPointType(type) || in ConstantR0WithType() 37 primitive_util::IsComplexType(type))) { in ConstantR0WithType() 43 !primitive_util::IsComplexType(type)) { in ConstantR0WithType()
|
D | math.cc | 91 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 …]
|
D | arithmetic_test.cc | 83 MinMaxImpl(x, primitive_util::NativeToPrimitiveType<NativeT>()); in TestArgMinMaxImpl()
|
/external/tensorflow/tensorflow/compiler/xla/service/gpu/ |
D | gpu_scatter_expander.cc | 30 primitive_util::BitWidth(inst->shape().element_type()) > 64; in InstructionMatchesPattern()
|
D | cudnn_batchnorm_runner.cc | 249 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/ |
D | host_compute_ops.cc | 159 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/ |
D | target_machine_features.h | 90 (primitive_util::BitWidth(type) / 8); in vector_register_num_elements()
|