| 686 | } |
| 687 | |
| 688 | StatusOr<llvm::SmallVector<mlir::Value, 4>> HloFunctionImporter::GetOperands( |
| 689 | HloInstruction* instruction) { |
| 690 | llvm::SmallVector<mlir::Value, 4> operands; |
| 691 | for (const auto& operand : instruction->operands()) { |
| 692 | auto input_it = instruction_value_map_.find(operand); |
| 693 | if (input_it == instruction_value_map_.end()) { |
| 694 | return tensorflow::errors::Internal( |
| 695 | absl::StrCat("Could not find input value: ", operand->name(), |
| 696 | " for instruction ", instruction->name())); |
| 697 | } |
| 698 | operands.push_back(input_it->second); |
| 699 | } |
| 700 | return operands; |
| 701 | } |
| 702 | |
| 703 | tensorflow::Status HloFunctionImporter::GetMlirTypes( |
| 704 | const std::vector<HloInstruction*>& instructions, |