static */
| 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 |
nothing calls this directly
no test coverage detected