| 2324 | } |
| 2325 | |
| 2326 | XlaOp XlaBuilder::SelectAndScatter(XlaOp operand, const XlaComputation& select, |
| 2327 | absl::Span<const int64> window_dimensions, |
| 2328 | absl::Span<const int64> window_strides, |
| 2329 | Padding padding, XlaOp source, |
| 2330 | XlaOp init_value, |
| 2331 | const XlaComputation& scatter) { |
| 2332 | return ReportErrorOrReturn([&]() -> StatusOr<XlaOp> { |
| 2333 | TF_ASSIGN_OR_RETURN(const Shape* operand_shape, GetShapePtr(operand)); |
| 2334 | return SelectAndScatterWithGeneralPadding( |
| 2335 | operand, select, window_dimensions, window_strides, |
| 2336 | MakePadding(AsInt64Slice(operand_shape->dimensions()), |
| 2337 | window_dimensions, window_strides, padding), |
| 2338 | source, init_value, scatter); |
| 2339 | }); |
| 2340 | } |
| 2341 | |
| 2342 | XlaOp XlaBuilder::SelectAndScatterWithGeneralPadding( |
| 2343 | XlaOp operand, const XlaComputation& select, |
no test coverage detected