From ad171d8e20150bd702ee753b89296f05f8903bf9 Mon Sep 17 00:00:00 2001 From: xla authors Date: Sat, 14 Sep 2024 02:28:55 -0700 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 674603528 --- xla/service/hlo_creation_utils.cc | 2 +- xla/service/hlo_dataflow_analysis_test.cc | 2 +- xla/service/host_offload_legalize_test.cc | 2 -- xla/service/host_offloader.cc | 2 -- xla/service/layout_assignment.cc | 2 +- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/xla/service/hlo_creation_utils.cc b/xla/service/hlo_creation_utils.cc index 034bcba00d528..a94e23d21066e 100644 --- a/xla/service/hlo_creation_utils.cc +++ b/xla/service/hlo_creation_utils.cc @@ -796,7 +796,7 @@ HloInstruction* CreateDummyOp(HloComputation::Builder* b, const Shape& shape) { absl::StatusOr> CreateComputationWithSignature( absl::Span domain, const Shape& range, absl::string_view name) { - HloComputation::Builder b{std::string(name)}; + HloComputation::Builder b{name}; int64_t param_idx = 0; for (const Shape* param_shape : domain) { b.AddInstruction(HloInstruction::CreateParameter( diff --git a/xla/service/hlo_dataflow_analysis_test.cc b/xla/service/hlo_dataflow_analysis_test.cc index 967c2955db20c..f7734f40fe371 100644 --- a/xla/service/hlo_dataflow_analysis_test.cc +++ b/xla/service/hlo_dataflow_analysis_test.cc @@ -2106,7 +2106,7 @@ TEST_F(HloDataflowAnalysisTest, AllGatherStartAndDoneWithTuple) { TF_ASSERT_OK_AND_ASSIGN(module_, ParseAndReturnVerifiedModule(hlo_text)); const HloDataflowAnalysis& analysis = RunAnalysis(/*ssa_form=*/false); absl::Status status = analysis.Verify(); - EXPECT_TRUE(status.ok()) << status.ToString(); + EXPECT_TRUE(status.ok()) << status; HloInstruction* done = module_->entry_computation()->root_instruction(); HloInstruction* start = done->mutable_operand(0); diff --git a/xla/service/host_offload_legalize_test.cc b/xla/service/host_offload_legalize_test.cc index 0322c80a7504c..55c36a5310f6d 100644 --- a/xla/service/host_offload_legalize_test.cc +++ b/xla/service/host_offload_legalize_test.cc @@ -37,8 +37,6 @@ limitations under the License. #include "xla/util.h" #include "tsl/platform/statusor.h" -namespace m = ::xla::match; - namespace xla { namespace { diff --git a/xla/service/host_offloader.cc b/xla/service/host_offloader.cc index 562eb4df84b8e..5cc3cdc13b24a 100644 --- a/xla/service/host_offloader.cc +++ b/xla/service/host_offloader.cc @@ -63,8 +63,6 @@ namespace xla { namespace { -using ::xla::host_memory_offload_annotations::kMoveToDeviceCustomCallTarget; -using ::xla::host_memory_offload_annotations::kMoveToHostCustomCallTarget; using ::xla::host_offload_utils::InstructionAndShapeIndex; void SetMemorySpace(Shape* shape, int64_t memory_space_color) { diff --git a/xla/service/layout_assignment.cc b/xla/service/layout_assignment.cc index f749cdba55d57..02885038251c0 100644 --- a/xla/service/layout_assignment.cc +++ b/xla/service/layout_assignment.cc @@ -85,7 +85,7 @@ BufferLayoutConstraint::BufferLayoutConstraint(const Layout& layout, bool mandatory, bool dfs, int64_t priority) : LayoutConstraint(mandatory, dfs, priority), buffer_(&buffer) { - CHECK(LayoutUtil::ValidateLayoutForShape(layout, buffer.shape()).ok()); + CHECK_OK(LayoutUtil::ValidateLayoutForShape(layout, buffer.shape())); layout_.push_back(layout); }