8000 [XLA] Small refactor in sharding propagation. · IBMZ-Linux-OSS-Python/tensorflow@180f95f · GitHub
[go: up one dir, main page]

Skip to content

Commit 180f95f

Browse files
mkupersttensorflower-gardener
authored andcommitted
[XLA] Small refactor in sharding propagation.
Since we now propagate to both while bodies and while conditionals, while doesn't need to be handled in a special way. PiperOrigin-RevId: 766257287
1 parent be3c982 commit 180f95f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

third_party/xla/xla/service/sharding_propagation.cc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3265,13 +3265,8 @@ absl::StatusOr<bool> ShardingPropagation::Run(
32653265
inst->copy_sharding(sharded_inst);
32663266
}
32673267
}
3268-
if (instruction->opcode() == HloOpcode::kWhile) {
3269-
computation_map[instruction->while_body()] = instruction;
3270-
computation_map[instruction->while_condition()] = instruction;
3271-
} else {
3272-
for (HloComputation* c : instruction->called_computations()) {
3273-
computation_map[c] = instruction;
3274-
}
3268+
for (HloComputation* c : instruction->called_computations()) {
3269+
computation_map[c] = instruction;
32753270
}
32763271
}
32773272
}

0 commit comments

Comments
 (0)
0