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

Function XdivyImpl

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

Source from the content-addressed store, hash-verified

151XLA_MAKE_BINARY(Xlogy, XlogyImpl(lhs, rhs, broadcast_helper));
152
153xla::XlaOp XdivyImpl(xla::XlaOp x, xla::XlaOp y,
154 const BCast& broadcast_helper) {
155 std::tie(x, y) = XlaBinaryOp::Broadcast(x, y, broadcast_helper);
156 auto zero = xla::ZerosLike(x);
157 auto is_zero = xla::Eq(x, zero);
158 return xla::Select(is_zero, zero, xla::Div(x, y));
159}
160XLA_MAKE_BINARY(Xdivy, XdivyImpl(lhs, rhs, broadcast_helper));
161
162// Implementation of FloorMod. Pseudo-code:

Callers 1

binary_ops.ccFile · 0.85

Calls 5

BroadcastFunction · 0.85
ZerosLikeFunction · 0.50
EqClass · 0.50
SelectFunction · 0.50
DivFunction · 0.50

Tested by

no test coverage detected