MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MaxFiniteValue

Function MaxFiniteValue

tensorflow/compiler/xla/client/lib/constants.cc:109–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109XlaOp MaxFiniteValue(XlaBuilder* builder, PrimitiveType type) {
110 switch (type) {
111 case F16:
112 return ConstantR0<Eigen::half>(builder,
113 Eigen::NumTraits<Eigen::half>::highest());
114 case BF16:
115 return ConstantR0<Eigen::bfloat16>(
116 builder, Eigen::NumTraits<Eigen::bfloat16>::highest());
117 case F32:
118 return ConstantR0<float>(builder, std::numeric_limits<float>::max());
119 case F64:
120 return ConstantR0<double>(builder, std::numeric_limits<double>::max());
121 default:
122 return MaxValue(builder, type);
123 }
124}
125
126XlaOp NanValue(XlaBuilder* builder, PrimitiveType type) {
127 return builder->ReportErrorOrReturn([&]() -> StatusOr<XlaOp> {

Callers 9

CompileMethod · 0.85
InitialValueMethod · 0.85
IgammaFunction · 0.85
IgammaGradAFunction · 0.85
RandomGammaGradFunction · 0.85
IgammacFunction · 0.85
AcoshFunction · 0.85
AsinhFunction · 0.85
XLA_TEST_FFunction · 0.85

Calls 2

MaxValueFunction · 0.85
maxFunction · 0.50

Tested by 1

XLA_TEST_FFunction · 0.68