Skip to content

Commit 8138086

Browse files
committed
Fix staging allocation for GCC 11
1 parent c9e2641 commit 8138086

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tpu_sync/weight_sync/weight_synchronizer_base.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ absl::StatusOr<raiden::PjRtCopyFuture> WeightSynchronizerBase::H2dLayer(
346346
tpu_raiden::weight_sync::GetTiledBufferElements(shard_hold.shape) *
347347
itemsize;
348348
auto temp_buffer =
349-
std::make_shared_for_overwrite<uint8_t[]>(physical_bytes);
349+
std::shared_ptr<uint8_t[]>(new uint8_t[physical_bytes]);
350350
auto tile_start = absl::Now();
351351
auto status = tpu_raiden::weight_sync::TileBuffer(
352352
shard_info.host_ptr, temp_buffer.get(), shard_hold.shape,
@@ -463,7 +463,7 @@ absl::StatusOr<raiden::PjRtCopyFuture> WeightSynchronizerBase::D2hLayer(
463463
tpu_raiden::weight_sync::GetTiledBufferElements(shard_hold.shape) *
464464
itemsize;
465465
auto temp_buffer =
466-
std::make_shared_for_overwrite<uint8_t[]>(physical_bytes);
466+
std::shared_ptr<uint8_t[]>(new uint8_t[physical_bytes]);
467467
uint8_t* temp_buffer_ptr = temp_buffer.get();
468468

469469
xla::Future<> copy_future =

0 commit comments

Comments
 (0)