| 817 | } |
| 818 | |
| 819 | ProgramShape HloComputation::ComputeProgramShape(bool include_ids) const { |
| 820 | ProgramShape program_shape; |
| 821 | |
| 822 | for (auto* param_instruction : param_instructions_) { |
| 823 | *program_shape.add_parameters() = param_instruction->shape(); |
| 824 | *program_shape.add_parameter_names() = |
| 825 | PrintName(param_instruction->name(), include_ids); |
| 826 | } |
| 827 | *program_shape.mutable_result() = root_instruction_->shape(); |
| 828 | |
| 829 | return program_shape; |
| 830 | } |
| 831 | |
| 832 | bool HloComputation::Equal(const HloComputation& other, |
| 833 | bool is_layout_sensitive) const { |