| 70 | namespace m = match; |
| 71 | |
| 72 | bool IsAll(const HloInstruction* op, int8 value) { |
| 73 | switch (op->opcode()) { |
| 74 | case HloOpcode::kBroadcast: |
| 75 | return IsAll(op->operand(0), value); |
| 76 | case HloOpcode::kConstant: |
| 77 | return op->literal().IsAll(value); |
| 78 | default: |
| 79 | return false; |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | bool IsAnyOperandComplex(const HloInstruction* hlo) { |
| 84 | for (auto operand : hlo->operands()) { |
no test coverage detected