Checks if the given two instructions share the same channel id.
| 1309 | |
| 1310 | // Checks if the given two instructions share the same channel id. |
| 1311 | Status CheckSameChannel(const HloInstruction* instr1, |
| 1312 | const HloInstruction* instr2) { |
| 1313 | if (instr1->channel_id() != instr2->channel_id()) { |
| 1314 | return InternalError( |
| 1315 | "Expected to have the same channel id, actual channel ids are: %s " |
| 1316 | "(%d), %s (%d)", |
| 1317 | instr1->ToString(), *instr1->channel_id(), instr2->ToString(), |
| 1318 | *instr2->channel_id()); |
| 1319 | } |
| 1320 | return Status::OK(); |
| 1321 | } |
| 1322 | |
| 1323 | // Checks if the given two instructions have the same is_host_transfer |
| 1324 | // attribute value. Intsructions must be send/recv instructions or their |
no test coverage detected