diff --git a/third_party/xla/xla/service/gpu/buffer_comparator_test.cc b/third_party/xla/xla/service/gpu/buffer_comparator_test.cc index 5c1c8d92022711..9faa3156a84965 100644 --- a/third_party/xla/xla/service/gpu/buffer_comparator_test.cc +++ b/third_party/xla/xla/service/gpu/buffer_comparator_test.cc @@ -351,20 +351,20 @@ TEST_F(BufferComparatorTest, BF16) { auto stream = stream_exec_->CreateStream().value(); - se::ScopedDeviceMemory lhs( + se::DeviceMemoryHandle lhs( stream_exec_, stream_exec_->AllocateArray(element_count)); - InitializeBuffer(stream.get(), BF16, &rng_state, *lhs.ptr()); + InitializeBuffer(stream.get(), BF16, &rng_state, lhs.memory()); - se::ScopedDeviceMemory rhs( + se::DeviceMemoryHandle rhs( stream_exec_, stream_exec_->AllocateArray(element_count)); - InitializeBuffer(stream.get(), BF16, &rng_state, *rhs.ptr()); + InitializeBuffer(stream.get(), BF16, &rng_state, rhs.memory()); BufferComparator comparator(ShapeUtil::MakeShape(BF16, {element_count}), HloModuleConfig()); - EXPECT_FALSE( - comparator.CompareEqual(stream.get(), *lhs.ptr(), *rhs.ptr()).value()); + EXPECT_FALSE(comparator.CompareEqual(stream.get(), lhs.memory(), rhs.memory()) + .value()); } } // namespace