| 1981 | } |
| 1982 | |
| 1983 | XlaOp XlaBuilder::ReduceWindow(XlaOp operand, XlaOp init_value, |
| 1984 | const XlaComputation& computation, |
| 1985 | absl::Span<const int64> window_dimensions, |
| 1986 | absl::Span<const int64> window_strides, |
| 1987 | Padding padding) { |
| 1988 | return ReportErrorOrReturn([&]() -> StatusOr<XlaOp> { |
| 1989 | TF_ASSIGN_OR_RETURN(const Shape* operand_shape, GetShapePtr(operand)); |
| 1990 | TF_RETURN_IF_ERROR( |
| 1991 | ValidatePaddingValues(AsInt64Slice(operand_shape->dimensions()), |
| 1992 | window_dimensions, window_strides)); |
| 1993 | |
| 1994 | std::vector<std::pair<int64, int64>> padding_values = |
| 1995 | MakePadding(AsInt64Slice(operand_shape->dimensions()), |
| 1996 | window_dimensions, window_strides, padding); |
| 1997 | return ReduceWindowWithGeneralPadding( |
| 1998 | operand, init_value, computation, window_dimensions, window_strides, |
| 1999 | /*base_dilations=*/{}, /*window_dilations=*/{}, padding_values); |
| 2000 | }); |
| 2001 | } |
| 2002 | |
| 2003 | XlaOp XlaBuilder::ReduceWindowWithGeneralPadding( |
| 2004 | XlaOp operand, XlaOp init_value, const XlaComputation& computation, |
no test coverage detected