Skip to content

Commit

Permalink
[XLA] Change attribute name skip-simplify-while-loops/trip-count-one …
Browse files Browse the repository at this point in the history
…to skip-simplify-while-loops_trip-count-one because / is not valid for attribute names.

PiperOrigin-RevId: 657729693
  • Loading branch information
carlos-guia authored and copybara-github committed Jul 30, 2024
1 parent d351295 commit 78418c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xla/service/while_loop_simplifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,8 @@ static absl::StatusOr<bool> TryRemoveWhileLoop(HloInstruction* while_op) {
// inline the call.
const auto& attrs = while_op->frontend_attributes().map();
bool skip_trip_count_one_simplification =
attrs.contains("skip-simplify-while-loops/trip-count-one") &&
(attrs.at("skip-simplify-while-loops/trip-count-one") == "true");
attrs.contains("skip-simplify-while-loops_trip-count-one") &&
(attrs.at("skip-simplify-while-loops_trip-count-one") == "true");
if (trip_count && *trip_count == 1 && !skip_trip_count_one_simplification) {
// Do not simplify the loop away when there is a side-effectful op,
// otherwise the infeed op may not inherit the data dependency from
Expand Down

0 comments on commit 78418c6

Please sign in to comment.