Skip to content

Commit

Permalink
[Cleanup] Use HloPredicateIs(Not)Op in all_reduce_blueconnect.cc
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 699048665
  • Loading branch information
frgossen authored and Google-ML-Automation committed Nov 22, 2024
1 parent 603e97f commit f708b19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xla/service/gpu/transforms/all_reduce_blueconnect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ absl::StatusOr<bool> AllReduceBlueConnect::Run(
for (HloComputation* computation :
module->MakeNonfusionComputations(execution_threads)) {
for (HloInstruction* instruction : computation->instructions()) {
if (instruction->opcode() == HloOpcode::kAllReduce) {
if (HloPredicateIsOp<HloOpcode::kAllReduce>(instruction)) {
all_reduces.push_back(Cast<HloAllReduceInstruction>(instruction));
}
}
Expand Down

0 comments on commit f708b19

Please sign in to comment.