Skip to content

Commit

Permalink
[XLA] Remove a check that verified channel_ids for host send/recv ins…
Browse files Browse the repository at this point in the history
…tructions were unique.

We can't think of why this check is needed in the first place, and it breaks as soon as one has a host send/recv inside an inner computation in the presence of inlining.

For example, consider the pseudo-code:

```
def f(...):
  send(..., channel_id=42)

def main(...):
  f(...)
  f(...)
```

If we inline `f`, then we now violate that invariant. But inlining is something that should always be safe to do.

PiperOrigin-RevId: 689478598
  • Loading branch information
hawkinsp authored and Google-ML-Automation committed Oct 24, 2024
1 parent 17851a6 commit b689344
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions xla/service/hlo_verifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2515,11 +2515,6 @@ absl::Status VerifyChannels(const HloModule& module,
<< "channel " << pair.first
<< " is used for different types of channel instructions";
}
if (sendrecv->is_host_transfer()) {
TF_RET_CHECK(instructions.size() == 2)
<< "channel " << pair.first
<< " is used for multiple host send/recv instructions";
}
} else {
for (const HloInstruction* instr : instructions) {
if (opts.verify_unique_channel_ids) {
Expand Down

0 comments on commit b689344

Please sign in to comment.