| 45 | } |
| 46 | |
| 47 | bool AllOperandsAreParameters(const HloInstruction& instruction) { |
| 48 | for (const auto& operand : instruction.operands()) { |
| 49 | if (operand->opcode() != HloOpcode::kParameter) { |
| 50 | return false; |
| 51 | } |
| 52 | } |
| 53 | return true; |
| 54 | } |
| 55 | |
| 56 | bool AllOperandsAreConstants(const HloInstruction& instruction) { |
| 57 | for (const auto& operand : instruction.operands()) { |