Update for llvm 71305033d115
PiperOrigin-RevId: 304748166 Change-Id: If3744b05c773cd5343e1328a01a6716a050a8674
This commit is contained in:
parent
802e00d37e
commit
0d61fc79f5
|
@ -79,8 +79,9 @@ struct MappedIvs {
|
||||||
SmallVector<Value, 2> ivs;
|
SmallVector<Value, 2> ivs;
|
||||||
};
|
};
|
||||||
|
|
||||||
MappedIvs MapWindowIvsToInput(ReduceWindowOp op, ArrayRef<Value> ivs,
|
MappedIvs MapWindowIvsToInput(ReduceWindowOp op, ArrayRef<BlockArgument> ivs,
|
||||||
ArrayRef<Value> window_ivs, OpBuilder* b) {
|
ArrayRef<BlockArgument> window_ivs,
|
||||||
|
OpBuilder* b) {
|
||||||
MappedIvs mapped_ivs;
|
MappedIvs mapped_ivs;
|
||||||
|
|
||||||
if (!op.window_strides().hasValue()) {
|
if (!op.window_strides().hasValue()) {
|
||||||
|
@ -418,9 +419,8 @@ class ReduceWindowOpConverter
|
||||||
auto xla_operand_type = xla_operand.getType().cast<MemRefType>();
|
auto xla_operand_type = xla_operand.getType().cast<MemRefType>();
|
||||||
|
|
||||||
MappedIvs mapped_ivs = MapWindowIvsToInput(
|
MappedIvs mapped_ivs = MapWindowIvsToInput(
|
||||||
xla_reduce_window_op,
|
xla_reduce_window_op, output_loop.getInductionVars(),
|
||||||
SmallVector<Value, 2>{output_loop.getInductionVars()},
|
window_loop.getInductionVars(), rewriter);
|
||||||
SmallVector<Value, 2>{window_loop.getInductionVars()}, rewriter);
|
|
||||||
|
|
||||||
auto elem_or_init = rewriter->create<loop::IfOp>(
|
auto elem_or_init = rewriter->create<loop::IfOp>(
|
||||||
loc, xla_operand_type.getElementType(), mapped_ivs.in_bounds,
|
loc, xla_operand_type.getElementType(), mapped_ivs.in_bounds,
|
||||||
|
|
Loading…
Reference in New Issue