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

Function XlogyImpl

tensorflow/compiler/tf2xla/kernels/binary_ops.cc:144–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 FloorDivImpl(b, input_type(0), lhs, rhs, broadcast_helper));
143
144xla::XlaOp XlogyImpl(xla::XlaOp x, xla::XlaOp y,
145 const BCast& broadcast_helper) {
146 std::tie(x, y) = XlaBinaryOp::Broadcast(x, y, broadcast_helper);
147 auto zero = xla::ZerosLike(x);
148 auto is_zero = xla::Eq(x, zero);
149 return xla::Select(is_zero, zero, xla::Mul(x, xla::Log(y)));
150}
151XLA_MAKE_BINARY(Xlogy, XlogyImpl(lhs, rhs, broadcast_helper));
152
153xla::XlaOp XdivyImpl(xla::XlaOp x, xla::XlaOp y,

Callers 1

binary_ops.ccFile · 0.85

Calls 6

BroadcastFunction · 0.85
ZerosLikeFunction · 0.50
EqClass · 0.50
SelectFunction · 0.50
MulFunction · 0.50
LogFunction · 0.50

Tested by

no test coverage detected