From dfe75809565abc3c76ed55425d240ba6ab1de510 Mon Sep 17 00:00:00 2001 From: Kyle Lucke Date: Tue, 21 May 2024 13:21:04 -0700 Subject: [PATCH] Replace the use of xla::OkStatus with absl::OkStatus now that they're the same. PiperOrigin-RevId: 635907580 --- third_party/xla/xla/hlo/ir/dfs_hlo_visitor.cc | 4 +-- .../xla/hlo/ir/dfs_hlo_visitor_with_default.h | 4 +-- .../xla/hlo/ir/dynamic_parameter_binding.cc | 6 ++-- third_party/xla/xla/hlo/ir/hlo_computation.cc | 14 ++++---- third_party/xla/xla/hlo/ir/hlo_computation.h | 2 +- .../hlo/ir/hlo_input_output_alias_config.cc | 12 +++---- third_party/xla/xla/hlo/ir/hlo_instruction.cc | 32 +++++++++---------- third_party/xla/xla/hlo/ir/hlo_instruction.h | 2 +- .../xla/xla/hlo/ir/hlo_instructions.cc | 6 ++-- third_party/xla/xla/hlo/ir/hlo_module.cc | 8 ++--- third_party/xla/xla/hlo/ir/hlo_module.h | 2 +- .../xla/xla/hlo/ir/hlo_module_metadata.cc | 6 ++-- third_party/xla/xla/hlo/ir/hlo_schedule.cc | 6 ++-- third_party/xla/xla/hlo/ir/hlo_sharding.cc | 18 +++++------ .../xla/xla/hlo/ir/hlo_sharding_metadata.cc | 8 ++--- 15 files changed, 65 insertions(+), 65 deletions(-) diff --git a/third_party/xla/xla/hlo/ir/dfs_hlo_visitor.cc b/third_party/xla/xla/hlo/ir/dfs_hlo_visitor.cc index a41ec006618271..b89eb721ac1170 100644 --- a/third_party/xla/xla/hlo/ir/dfs_hlo_visitor.cc +++ b/third_party/xla/xla/hlo/ir/dfs_hlo_visitor.cc @@ -64,13 +64,13 @@ void DfsHloVisitorBase::SetVisited( template absl::Status DfsHloVisitorBase::Preprocess( HloInstructionPtr) { - return OkStatus(); + return absl::OkStatus(); } template absl::Status DfsHloVisitorBase::Postprocess( HloInstructionPtr) { - return OkStatus(); + return absl::OkStatus(); } // Explicit instantiations. diff --git a/third_party/xla/xla/hlo/ir/dfs_hlo_visitor_with_default.h b/third_party/xla/xla/hlo/ir/dfs_hlo_visitor_with_default.h index 5a6b46fbf331c5..40317cb77d85ec 100644 --- a/third_party/xla/xla/hlo/ir/dfs_hlo_visitor_with_default.h +++ b/third_party/xla/xla/hlo/ir/dfs_hlo_visitor_with_default.h @@ -284,7 +284,7 @@ class DfsHloVisitorWithDefaultBase // Invoked to inform the visitor that the traversal has completed, and that // the root was "root". absl::Status FinishVisit(HloInstructionPtr /*root*/) override { - return OkStatus(); + return absl::OkStatus(); } private: @@ -320,7 +320,7 @@ class DfsHloRewriteVisitor : public DfsHloVisitorWithDefault { // Default visitor action is to do nothing and return OK. absl::Status DefaultAction(HloInstruction* /*hlo_instruction*/) override { - return OkStatus(); + return absl::OkStatus(); } bool changed() const { return changed_; } diff --git a/third_party/xla/xla/hlo/ir/dynamic_parameter_binding.cc b/third_party/xla/xla/hlo/ir/dynamic_parameter_binding.cc index b1fc5fcab3aa5b..62d35b9d405f84 100644 --- a/third_party/xla/xla/hlo/ir/dynamic_parameter_binding.cc +++ b/third_party/xla/xla/hlo/ir/dynamic_parameter_binding.cc @@ -36,7 +36,7 @@ absl::Status DynamicParameterBinding::Bind( const DynamicDimension& dynamic_dimension) { auto result = bindings_.emplace(dynamic_dimension, dynamic_parameter); TF_RET_CHECK(result.second); - return OkStatus(); + return absl::OkStatus(); } std::optional @@ -71,7 +71,7 @@ absl::Status DynamicParameterBinding::ForEachBinding(BindingFn fn) const { for (const auto& binding : bindings_) { TF_RETURN_IF_ERROR(fn(binding.second, binding.first)); } - return OkStatus(); + return absl::OkStatus(); } absl::Status DynamicParameterBinding::Verify( @@ -99,7 +99,7 @@ absl::Status DynamicParameterBinding::Verify( ->shape(), dynamic_dimension.parameter_index) .rank()); - return OkStatus(); + return absl::OkStatus(); }); } diff --git a/third_party/xla/xla/hlo/ir/hlo_computation.cc b/third_party/xla/xla/hlo/ir/hlo_computation.cc index b424a4b374dc76..f600a482426bfe 100644 --- a/third_party/xla/xla/hlo/ir/hlo_computation.cc +++ b/third_party/xla/xla/hlo/ir/hlo_computation.cc @@ -317,7 +317,7 @@ absl::Status HloComputation::RemoveParameter(int64_t param_no) { param_no++; } - return OkStatus(); + return absl::OkStatus(); } HloInstruction* HloComputation::ReplaceParameter( @@ -371,7 +371,7 @@ absl::Status HloComputation::RemoveUnusedParametersImpl(bool allow_non_fusion) { } } param_instructions_.resize(param_instructions_.size() - removed); - return OkStatus(); + return absl::OkStatus(); } bool HloComputation::IsSafelyRemovable(const HloInstruction* instruction, @@ -471,7 +471,7 @@ absl::Status HloComputation::RemoveInstructionAndUnusedOperands( } } } - return OkStatus(); + return absl::OkStatus(); } absl::Status HloComputation::RemoveInstruction(HloInstruction* instruction) { @@ -515,7 +515,7 @@ absl::Status HloComputation::RemoveInstructionImpl(HloInstruction* instruction, DCHECK_EQ(instructions_.size() - to_be_deleted_.size(), instruction_count()) << "instructions_.size(): " << instructions_.size() << ", to_be_deleted_.size(): " << to_be_deleted_.size(); - return OkStatus(); + return absl::OkStatus(); } void HloComputation::Cleanup() { @@ -1049,7 +1049,7 @@ HloComputation::CreateFromProto( TF_RET_CHECK(parameters_seen_count == parameter_count) << "Not all parameters in range [0, " << parameter_count << ") were referenced"; - return OkStatus(); + return absl::OkStatus(); }()); auto computation = absl::WrapUnique( @@ -1376,7 +1376,7 @@ absl::Status HloComputation::ReplaceInstruction( ReplaceInstruction(old_instruction, new_instruction, /*preserve_sharding=*/false)); DCHECK(changed); - return OkStatus(); + return absl::OkStatus(); } absl::StatusOr HloComputation::ReplaceInstructionWithDifferentShape( @@ -1451,7 +1451,7 @@ absl::Status HloComputation::ReplaceInstructionWithDifferentShape( old_instruction, new_instruction, /*preserve_sharding=*/false)); DCHECK(changed); - return OkStatus(); + return absl::OkStatus(); } std::vector HloComputation::CollectUnreachableRoots() const { diff --git a/third_party/xla/xla/hlo/ir/hlo_computation.h b/third_party/xla/xla/hlo/ir/hlo_computation.h index 8c5b2aa9b29e72..f99bbefb9097c1 100644 --- a/third_party/xla/xla/hlo/ir/hlo_computation.h +++ b/third_party/xla/xla/hlo/ir/hlo_computation.h @@ -116,7 +116,7 @@ class HloComputation { for (const auto& instruction : instructions_) { TF_RETURN_IF_ERROR(func(instruction.get())); } - return OkStatus(); + return absl::OkStatus(); } HloInstruction* last_added_instruction() const { diff --git a/third_party/xla/xla/hlo/ir/hlo_input_output_alias_config.cc b/third_party/xla/xla/hlo/ir/hlo_input_output_alias_config.cc index 23a886814ae08e..6303e4273b2046 100644 --- a/third_party/xla/xla/hlo/ir/hlo_input_output_alias_config.cc +++ b/third_party/xla/xla/hlo/ir/hlo_input_output_alias_config.cc @@ -64,7 +64,7 @@ absl::Status HloInputOutputAliasConfig::SetUpAlias( VLOG(4) << "Set up alias between output index " << output_index.ToString() << " and parameter " << param_number << " at index " << param_index.ToString(); - return OkStatus(); + return absl::OkStatus(); } HloInputOutputAliasProto HloInputOutputAliasConfig::ToProto() const { @@ -189,7 +189,7 @@ absl::Status HloInputOutputAliasConfig::ForEachAliasWithStatus( if (aliased) { TF_RETURN_IF_ERROR(fn(output_index, *aliased)); } - return OkStatus(); + return absl::OkStatus(); }); } @@ -240,7 +240,7 @@ absl::Status HloInputOutputAliasConfig::Verify( alias.parameter_index) == false); *(param_has_seen[alias.parameter_number].mutable_element( alias.parameter_index)) = true; - return OkStatus(); + return absl::OkStatus(); }); } @@ -256,14 +256,14 @@ absl::Status HloBufferDonorConfig::AddBufferDonor( VLOG(4) << "Register the parameter " << param_number << " at index " << param_index.ToString() << " as a buffer donor."; buffer_donor_.emplace(BufferDonor(param_number, param_index)); - return OkStatus(); + return absl::OkStatus(); } absl::Status HloBufferDonorConfig::RemoveBufferDonor( int64_t param_number, const ShapeIndex& param_index) { TF_RET_CHECK(param_number >= 0) << param_number; buffer_donor_.erase(BufferDonor(param_number, param_index)); - return OkStatus(); + return absl::OkStatus(); } HloBufferDonorProto HloBufferDonorConfig::ToProto() const { @@ -344,7 +344,7 @@ absl::Status HloBufferDonorConfig::Verify(const HloModule& module) const { // Since buffer_donor_ is a set, we do not need to check if one input has // registered as a buffer donor many times. - return OkStatus(); + return absl::OkStatus(); } std::ostream& operator<<(std::ostream& out, diff --git a/third_party/xla/xla/hlo/ir/hlo_instruction.cc b/third_party/xla/xla/hlo/ir/hlo_instruction.cc index 9b9bdcbaa7d9d4..992761fedce34e 100644 --- a/third_party/xla/xla/hlo/ir/hlo_instruction.cc +++ b/third_party/xla/xla/hlo/ir/hlo_instruction.cc @@ -103,7 +103,7 @@ absl::Status EraseElementFromVector(PtrVec* container, T value) { auto it = std::find(container->begin(), container->end(), value); TF_RET_CHECK(it != container->end()); container->erase(it); - return OkStatus(); + return absl::OkStatus(); } } // namespace @@ -2707,7 +2707,7 @@ absl::Status HloInstruction::AddControlDependencyTo( instruction->rare()->control_predecessors, this)); instruction->mutable_rare()->control_predecessors.push_back(this); } - return OkStatus(); + return absl::OkStatus(); } absl::Status HloInstruction::RemoveControlDependencyTo( @@ -2721,7 +2721,7 @@ absl::Status HloInstruction::RemoveControlDependencyTo( TF_RETURN_IF_ERROR(EraseElementFromVector( &instruction->mutable_rare()->control_predecessors, this)); } - return OkStatus(); + return absl::OkStatus(); } absl::Status HloInstruction::DropAllControlDeps() { @@ -2738,7 +2738,7 @@ absl::Status HloInstruction::DropAllControlDeps() { r->control_successors.clear(); r->control_predecessors.clear(); } - return OkStatus(); + return absl::OkStatus(); } absl::Status HloInstruction::SafelyDropAllControlDependencies() { @@ -2751,7 +2751,7 @@ absl::Status HloInstruction::SafelyDropAllControlDependencies() { } } TF_RETURN_IF_ERROR(DropAllControlDeps()); - return OkStatus(); + return absl::OkStatus(); } bool HloInstruction::HasControlDependencies() const { @@ -2767,7 +2767,7 @@ absl::Status HloInstruction::CopyAllControlDepsTo(HloInstruction* start, for (auto* ctrl_succ : control_successors()) { TF_RETURN_IF_ERROR(end->AddControlDependencyTo(ctrl_succ)); } - return OkStatus(); + return absl::OkStatus(); } bool HloInstruction::IdenticalInternal( @@ -3057,7 +3057,7 @@ absl::Status HloInstruction::ReplaceUseWithDifferentShape( TF_RETURN_IF_ERROR( Cast(user)->DeduplicateFusionOperands()); } - return OkStatus(); + return absl::OkStatus(); } absl::Status HloInstruction::ReplaceUseWith(HloInstruction* user, @@ -3085,7 +3085,7 @@ absl::Status HloInstruction::ReplaceUseWithDifferentShape( << " to be equal to " << ToString(); user->operands_[operand_number] = new_producer; new_producer->AddUser(user); - return OkStatus(); + return absl::OkStatus(); } absl::Status HloInstruction::ReplaceOperandWith(int64_t operand_num, @@ -3104,7 +3104,7 @@ absl::Status HloInstruction::ReplaceOperandWithDifferentShape( TF_RET_CHECK(operand_num < operand_count()); HloInstruction* old_operand = mutable_operand(operand_num); if (old_operand == new_operand) { - return OkStatus(); + return absl::OkStatus(); } operands_[operand_num] = new_operand; @@ -3116,7 +3116,7 @@ absl::Status HloInstruction::ReplaceOperandWithDifferentShape( old_operand->RemoveUser(this); } new_operand->AddUser(this); - return OkStatus(); + return absl::OkStatus(); } // Copy all the instructions in the given fusion instruction into the fusion @@ -3124,7 +3124,7 @@ absl::Status HloInstruction::ReplaceOperandWithDifferentShape( // instruction with the copy of the fusion expression root. absl::Status HloInstruction::Defuse() { if (opcode() != HloOpcode::kFusion) { - return OkStatus(); + return absl::OkStatus(); } VLOG(2) << "Defusing instruction: " << ToString(); @@ -3187,7 +3187,7 @@ absl::Status HloInstruction::ReplaceAllUsesWithDifferentShape( parent_->set_root_instruction(new_producer, /*accept_different_shape=*/true); } - return OkStatus(); + return absl::OkStatus(); } absl::Status HloInstruction::ReplaceAllUsesWith(HloInstruction* new_producer, @@ -3235,7 +3235,7 @@ absl::Status HloInstruction::ReplaceAllUsesWithDifferentShape( /*accept_different_shape=*/true); } - return OkStatus(); + return absl::OkStatus(); } bool HloInstruction::IsEffectiveBitcast() const { @@ -4438,7 +4438,7 @@ static absl::Status PostOrderDFS( std::reverse(dfs_stack.begin() + old_dfs_stack_size, dfs_stack.end()); } while (!dfs_stack.empty()); - return OkStatus(); + return absl::OkStatus(); } template @@ -4452,7 +4452,7 @@ absl::Status HloInstruction::Accept( if (call_finish_visit) { TF_RETURN_IF_ERROR(visitor->FinishVisit(this)); } - return OkStatus(); + return absl::OkStatus(); } // Explicit instantiations. @@ -4479,7 +4479,7 @@ absl::Status HloInstruction::AcceptWithOperandOrder( VLOG(3) << "HloInstruction::AcceptWithOperandOrder AFTER FINISH VISIT"; } VLOG(2) << "HloInstruction::AcceptWithOperandOrder EXIT"; - return OkStatus(); + return absl::OkStatus(); } const Shape& HloInstruction::shape() const { return shape_; } diff --git a/third_party/xla/xla/hlo/ir/hlo_instruction.h b/third_party/xla/xla/hlo/ir/hlo_instruction.h index a1f7e2e98312fc..15ae6f6ebe84ea 100644 --- a/third_party/xla/xla/hlo/ir/hlo_instruction.h +++ b/third_party/xla/xla/hlo/ir/hlo_instruction.h @@ -2143,7 +2143,7 @@ class HloInstruction { absl::Status set_backend_config(const tsl::protobuf::Message& proto) { backend_config_ = BackendConfigWrapper(proto); - return OkStatus(); + return absl::OkStatus(); } // Getter/setter for raw JSON-encoded backend config. Prefer the diff --git a/third_party/xla/xla/hlo/ir/hlo_instructions.cc b/third_party/xla/xla/hlo/ir/hlo_instructions.cc index b1a44f092a4c4c..9439fcd81f2b99 100644 --- a/third_party/xla/xla/hlo/ir/hlo_instructions.cc +++ b/third_party/xla/xla/hlo/ir/hlo_instructions.cc @@ -2518,7 +2518,7 @@ std::unique_ptr HloFusionInstruction::CloneWithNewOperandsImpl( absl::Status HloFusionInstruction::DeduplicateFusionOperands() { if (IsCustomFusion()) { - return OkStatus(); + return absl::OkStatus(); } absl::flat_hash_map operand_indices; std::vector operands_to_remove; @@ -2533,12 +2533,12 @@ absl::Status HloFusionInstruction::DeduplicateFusionOperands() { } } if (operands_to_remove.empty()) { - return OkStatus(); + return absl::OkStatus(); } TF_RETURN_IF_ERROR(fused_instructions_computation() ->RemoveUnusedParametersFromFusedComputation()); RemoveOperandsAtAscendingIndices(operands_to_remove); - return OkStatus(); + return absl::OkStatus(); } HloCallInstruction::HloCallInstruction(const Shape& shape, diff --git a/third_party/xla/xla/hlo/ir/hlo_module.cc b/third_party/xla/xla/hlo/ir/hlo_module.cc index b5fdd4d074f9f1..146a6cc724c2c0 100644 --- a/third_party/xla/xla/hlo/ir/hlo_module.cc +++ b/third_party/xla/xla/hlo/ir/hlo_module.cc @@ -83,7 +83,7 @@ absl::Status HloModule::set_schedule(HloSchedule schedule) { TF_RET_CHECK(schedule.module() == this); TF_RETURN_IF_ERROR(schedule.Verify()); schedule_ = std::move(schedule); - return OkStatus(); + return absl::OkStatus(); } void HloModule::ReplaceEntryComputation(HloComputation* entry_computation) { @@ -199,7 +199,7 @@ absl::Status HloModule::RemoveEmbeddedComputation(HloComputation* to_remove) { TF_RET_CHECK(it != computations_.end()); TF_RET_CHECK(it->get() == to_remove); computations_.erase(it); - return OkStatus(); + return absl::OkStatus(); } HloComputation* HloModule::AddEmbeddedComputation( @@ -537,7 +537,7 @@ absl::Status HloModule::CheckUniqueNamesAndIdsForComputationsAndInstructions() instruction_ids.insert(instruction->unique_id()); } } - return OkStatus(); + return absl::OkStatus(); } /* static */ @@ -1136,7 +1136,7 @@ absl::Status HloModule::RemoveUnusedComputations() { for (auto computation : to_remove) { TF_RETURN_IF_ERROR(RemoveEmbeddedComputation(computation)); } - return OkStatus(); + return absl::OkStatus(); } HloComputation* HloModule::DeepCloneComputation(HloComputation* computation, diff --git a/third_party/xla/xla/hlo/ir/hlo_module.h b/third_party/xla/xla/hlo/ir/hlo_module.h index cc884d25a3474a..a4eee06131b4d3 100644 --- a/third_party/xla/xla/hlo/ir/hlo_module.h +++ b/third_party/xla/xla/hlo/ir/hlo_module.h @@ -618,7 +618,7 @@ class HloModule { cross_program_prefetches_[prefetch_index]; TF_RET_CHECK(!optional_offset.has_value()); optional_offset = offset; - return OkStatus(); + return absl::OkStatus(); } // Get the list of program arguments to be prefetch across programs. diff --git a/third_party/xla/xla/hlo/ir/hlo_module_metadata.cc b/third_party/xla/xla/hlo/ir/hlo_module_metadata.cc index 9765dee1fcf096..79cad36763f6ed 100644 --- a/third_party/xla/xla/hlo/ir/hlo_module_metadata.cc +++ b/third_party/xla/xla/hlo/ir/hlo_module_metadata.cc @@ -42,7 +42,7 @@ absl::Status HloModuleMetadata::MutateCurrentHloPassMetadata( TF_ASSIGN_OR_RETURN(HloPassMetadata * pass_metadata, GetCurrentHloPassMetadata()); mutator(pass_metadata); - return OkStatus(); + return absl::OkStatus(); } void HloModuleMetadata::RecordPassStart() { @@ -57,7 +57,7 @@ absl::Status HloModuleMetadata::RecordPassEnd() { GetCurrentHloPassMetadata()); pass_metadata->set_end_timestamp_usec(env_->NowMicros()); running_passes_.pop_back(); - return OkStatus(); + return absl::OkStatus(); } void HloModuleMetadata::set_prepartitioning_metadata( @@ -97,7 +97,7 @@ absl::Status HloModuleMetadata::set_custom_metadata( << pass_metadata->pass_id(); return Internal("failed to pack custom metadata"); }; - return OkStatus(); + return absl::OkStatus(); } } // namespace xla diff --git a/third_party/xla/xla/hlo/ir/hlo_schedule.cc b/third_party/xla/xla/hlo/ir/hlo_schedule.cc index 1e0dce4f73a0b1..18747b3ae50f9e 100644 --- a/third_party/xla/xla/hlo/ir/hlo_schedule.cc +++ b/third_party/xla/xla/hlo/ir/hlo_schedule.cc @@ -209,7 +209,7 @@ absl::Status HloSchedule::UpdateComputationSchedule( } set_sequence(computation, std::move(new_sequence)); - return OkStatus(); + return absl::OkStatus(); } absl::Status HloSchedule::Update( @@ -268,7 +268,7 @@ absl::Status HloSchedule::Update( } TF_RETURN_IF_ERROR(Verify()); - return OkStatus(); + return absl::OkStatus(); } absl::flat_hash_map @@ -346,7 +346,7 @@ absl::Status HloSchedule::Verify() const { } } - return OkStatus(); + return absl::OkStatus(); } namespace { diff --git a/third_party/xla/xla/hlo/ir/hlo_sharding.cc b/third_party/xla/xla/hlo/ir/hlo_sharding.cc index 26b2702885b042..71520e196c0718 100644 --- a/third_party/xla/xla/hlo/ir/hlo_sharding.cc +++ b/third_party/xla/xla/hlo/ir/hlo_sharding.cc @@ -617,12 +617,12 @@ absl::Status HloSharding::CheckLeafCount(const Shape& shape) const { int64_t leaf_count = ShapeUtil::GetLeafCount(shape); if (leaf_count == 0 && tuple_elements_.size() == 1) { // Allow (but don't require) empty tuples to have a single sharding - return OkStatus(); + return absl::OkStatus(); } TF_RET_CHECK(leaf_count == tuple_elements_.size()) << "Shape " << ShapeUtil::HumanString(shape) << " has " << leaf_count << " leaf nodes while this sharding has " << tuple_elements_.size(); - return OkStatus(); + return absl::OkStatus(); } absl::StatusOr> HloSharding::AsShapeTree( @@ -692,7 +692,7 @@ absl::Status HloSharding::ValidateTuple( TF_RETURN_IF_ERROR(CheckLeafCount(shape)); if (ShapeUtil::GetLeafCount(shape) == 0 && tuple_elements_.empty()) { // Empty tuples are allowed to not have sharding - return OkStatus(); + return absl::OkStatus(); } // Now we've validated the number of tuple elements, it's safe to request a @@ -709,13 +709,13 @@ absl::Status HloSharding::ValidateTuple( return status; } } - return OkStatus(); + return absl::OkStatus(); } absl::Status HloSharding::Validate(const Shape& shape, std::optional num_devices) const { if (shape.IsToken()) { - return OkStatus(); + return absl::OkStatus(); } absl::Status status = IsTuple() ? ValidateTuple(shape, num_devices) : ValidateNonTuple(shape, num_devices); @@ -734,7 +734,7 @@ absl::Status HloSharding::ValidateNonTuple( "Validation shape is a tuple but sharding is not."); } if (replicated_) { - return OkStatus(); + return absl::OkStatus(); } // All tile assignments must be less than the number of available devices and @@ -754,7 +754,7 @@ absl::Status HloSharding::ValidateNonTuple( "device ", device, " is not unique in tile assignment")); } seen_devices.insert(device); - return OkStatus(); + return absl::OkStatus(); }); TF_RETURN_IF_ERROR(status); all_devices_seen = @@ -765,7 +765,7 @@ absl::Status HloSharding::ValidateNonTuple( } if (IsTileMaximal() || IsManual() || IsUnknown()) { - return OkStatus(); + return absl::OkStatus(); } // The tile assignment tensor must have the same rank as the tiled data rank. @@ -790,7 +790,7 @@ absl::Status HloSharding::ValidateNonTuple( "sharding was intended, use HloSharding::Replicated(). If a device " "placement was intended, use HloSharding::AssignDevice()"); } - return OkStatus(); + return absl::OkStatus(); } /*static*/ absl::StatusOr HloSharding::FromProto( diff --git a/third_party/xla/xla/hlo/ir/hlo_sharding_metadata.cc b/third_party/xla/xla/hlo/ir/hlo_sharding_metadata.cc index 3a9eebaadaac26..5bc48d8ee29e51 100644 --- a/third_party/xla/xla/hlo/ir/hlo_sharding_metadata.cc +++ b/third_party/xla/xla/hlo/ir/hlo_sharding_metadata.cc @@ -137,7 +137,7 @@ absl::Status FixupPassThroughDomainLinks(const DomainMetadata::Domain& domain, pass_through.operand->parent()->set_root_instruction(gte); } } - return OkStatus(); + return absl::OkStatus(); } // For tuple shardings if every element have the same sharding then we want to @@ -166,7 +166,7 @@ absl::Status ApplyDomainSingleSharding(const DomainMetadata::Domain& domain, << instruction->sharding(); } } - return OkStatus(); + return absl::OkStatus(); } // Return the ShapeTree of the user argument. The user argument @@ -377,7 +377,7 @@ absl::Status ApplyDomainSharding(const DomainMetadata::Domain& domain, } } // Should we error out if unassigned > 0? - return OkStatus(); + return absl::OkStatus(); } absl::StatusOr> @@ -466,7 +466,7 @@ absl::Status ShardingMetadata::NormalizeShardingDomain( VLOG(1) << "Unable to find common sharding"; } } - return OkStatus(); + return absl::OkStatus(); } // Creates a kDomain instruction to be placed between instruction and operand.