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

Method ReduceWindow

tensorflow/compiler/xla/client/xla_builder.cc:1983–2001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1981}
1982
1983XlaOp 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
2003XlaOp XlaBuilder::ReduceWindowWithGeneralPadding(
2004 XlaOp operand, XlaOp init_value, const XlaComputation& computation,

Callers 1

ReduceWindowFunction · 0.45

Calls 5

ValidatePaddingValuesFunction · 0.85
MakePaddingFunction · 0.85
AsInt64SliceFunction · 0.50
dimensionsMethod · 0.45

Tested by

no test coverage detected