[go: nahoru, domu]

Skip to content

Commit

Permalink
[mlir] Switching accessors to prefixed form (NFC)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 418872930
  • Loading branch information
jpienaar authored and TensorFlow MLIR Team committed Dec 30, 2021
1 parent 5ce489b commit 64352df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Value ApplySingleResultLhloCode(Location loc, ValueRange operands,
// LHLO ops.
void ConvertToReductionOperator(Location loc, scf::ReduceOp reduce_op,
Block* lhlo_block, OpBuilder* b) {
Block& loop_reduce_op_body = reduce_op.reductionOperator().front();
Block& loop_reduce_op_body = reduce_op.getReductionOperator().front();
OpBuilder::InsertionGuard guard(*b);
b->setInsertionPointToStart(&loop_reduce_op_body);
b->create<scf::ReduceReturnOp>(
Expand Down Expand Up @@ -456,10 +456,10 @@ class ReduceWindowOpConverter

OpBuilder else_builder =
elem_or_init.getElseBodyBuilder(rewriter->getListener());
else_builder.create<scf::YieldOp>(loc, *window_loop.initVals().begin());
else_builder.create<scf::YieldOp>(loc, *window_loop.getInitVals().begin());

return rewriter->create<scf::ReduceOp>(loc,
*elem_or_init.results().begin());
*elem_or_init.getResults().begin());
}
};

Expand Down
6 changes: 3 additions & 3 deletions lib/Dialect/mhlo/transforms/rank_specialization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ Value MaterializeScalarRankSpecializationCase(
},
else_builder_fn);

return if_op.results().front();
return if_op.getResults().front();
}

Value MaterializeEqualShapesRankSpecializationCase(
Expand Down Expand Up @@ -549,7 +549,7 @@ Value MaterializeEqualShapesRankSpecializationCase(
},
else_builder_fn);

return if_op.results().front();
return if_op.getResults().front();
}

Value MaterializeTargetRankSpecializationCase(
Expand Down Expand Up @@ -627,7 +627,7 @@ Value RecusivelyMaterializeTargetRankSpecializationCases(
else_builder, loc, op, shapes, max_rank, min_target_rank + 1,
max_target_rank));

return if_op.results().front();
return if_op.getResults().front();
}

Value MaterializeGenericRankSpecializationCases(
Expand Down

0 comments on commit 64352df

Please sign in to comment.