Skip to content

Commit

Permalink
[XLA:HOST_OFFLOAD] Add Copy to the list of movable opcodes between ho…
Browse files Browse the repository at this point in the history
…st to

device and dynamic slice.

PiperOrigin-RevId: 632690123
  • Loading branch information
blakehechtman authored and tensorflower-gardener committed May 11, 2024
1 parent 442e5d8 commit b69159c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion third_party/xla/xla/service/host_offloader.cc
Expand Up @@ -158,7 +158,8 @@ absl::StatusOr<std::vector<HloInstruction*>> GetBufferUsersOfType(
// And the buffer is passed through the first operand.
// This is used to trace the graph between an annotation and its relevant slice.
bool CanTraverseOpBetweenAnnotation(HloInstruction* hlo) {
if (hlo->opcode() == HloOpcode::kBitcast) {
if (hlo->opcode() == HloOpcode::kBitcast ||
hlo->opcode() == HloOpcode::kCopy) {
return true;
} else if (hlo->opcode() == HloOpcode::kReshape) {
return ShapeUtil::ReshapeIsBitcast(hlo->operand(0)->shape(), hlo->shape());
Expand Down

0 comments on commit b69159c

Please sign in to comment.