From 326b65b336b5550411351832bb5dd4bb785f3562 Mon Sep 17 00:00:00 2001 From: Jian Cai Date: Tue, 1 Oct 2024 12:01:52 -0700 Subject: [PATCH] Update comments to reflect the renaming of original_value This updates the comments to reflect the renaming of original_value attribute of HloInstruction to origin in cl/676573775. PiperOrigin-RevId: 681112069 --- xla/hlo/ir/hlo_computation.cc | 4 ++-- xla/hlo/ir/hlo_instructions.cc | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xla/hlo/ir/hlo_computation.cc b/xla/hlo/ir/hlo_computation.cc index 13255a919211e..92b1b1eef6598 100644 --- a/xla/hlo/ir/hlo_computation.cc +++ b/xla/hlo/ir/hlo_computation.cc @@ -1432,8 +1432,8 @@ absl::StatusOr HloComputation::ReplaceInstructionWithDifferentShape( old_instruction->frontend_attributes()); } if (auto old_original_value = old_instruction->original_value()) { - // Fusions are handled separately. The original_value attribute of fused - // instructions is copied when they are added into the fused computation. + // Fusions are handled separately. The original value of fused instructions + // is copied when they are added into the fused computation. if (new_instruction->opcode() != HloOpcode::kFusion) { if (ShapeUtil::Compatible(old_instruction->shape(), new_instruction->shape())) { diff --git a/xla/hlo/ir/hlo_instructions.cc b/xla/hlo/ir/hlo_instructions.cc index 3960414f1ac73..d1c33e477c378 100644 --- a/xla/hlo/ir/hlo_instructions.cc +++ b/xla/hlo/ir/hlo_instructions.cc @@ -2038,7 +2038,7 @@ HloCallableInstruction::CloneAndAppendInstructionIntoCalledComputation( // instruction. Add it as an operand and add a corresponding called // computation parameter instruction. - // No need to create an original_value for an added parameter as the + // No need to create an original value for an added parameter as the // original value is saved in the corresponding argument. called_computation_parameter = AddCallOperand(operand); } @@ -2047,7 +2047,7 @@ HloCallableInstruction::CloneAndAppendInstructionIntoCalledComputation( } if (clone != instruction_to_append) { - // Copy over original_value attribute to the clone of a fused instruction. + // Copy over the original value to the clone of a fused instruction. if (auto original_value = instruction_to_append->original_value()) { clone->set_original_value(original_value); } @@ -2092,7 +2092,7 @@ HloCallableInstruction::CloneAndAppendInstructionIntoCalledComputation( HloInstruction* new_root = called_computation()->AddInstruction( HloInstruction::CreateTuple(tuple_elements)); - // No need to create an original_value for a new root with added outputs + // No need to create an original value for a new root with added outputs // as the original value is saved in the get-tuple-element instructions // that use it. called_computation()->set_root_instruction(new_root, @@ -2425,7 +2425,7 @@ void HloFusionInstruction::MergeFusionInstructionIntoMultiOutput( auto cloned_instruction = parent()->AddInstruction(fused_instruction->CloneWithNewOperands( fused_instruction->shape(), new_operands, /*suffix=*/"clone")); - // Copy over original_value attribute to the clone of a fused instruction. + // Copy over the original value to the clone of a fused instruction. // This is necessary as the clone will be cloned again when the clone is // fused in FuseInstructionIntoMultiOutput(). This can be skipped if we // improve the code to only clone once as stated in the preceding comment.