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

Method Broadcast

tensorflow/compiler/tf2xla/kernels/cwise_ops.cc:89–102  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

87}
88
89/* static */ std::pair<xla::XlaOp, xla::XlaOp> XlaBinaryOp::Broadcast(
90 xla::XlaOp lhs, xla::XlaOp rhs, const BCast& broadcast_helper) {
91 auto lhs_output = BroadcastTo(lhs, broadcast_helper.output_shape());
92 if (!lhs_output.ok()) {
93 xla::XlaOp error = lhs.builder()->ReportError(lhs_output.status());
94 return {error, error};
95 }
96 auto rhs_output = BroadcastTo(rhs, broadcast_helper.output_shape());
97 if (!rhs_output.ok()) {
98 xla::XlaOp error = rhs.builder()->ReportError(rhs_output.status());
99 return {error, error};
100 }
101 return {lhs_output.ValueOrDie(), rhs_output.ValueOrDie()};
102}
103
104} // namespace tensorflow

Callers

nothing calls this directly

Calls 6

BroadcastToFunction · 0.50
output_shapeMethod · 0.45
okMethod · 0.45
ReportErrorMethod · 0.45
builderMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected