Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 657916008
  • Loading branch information
tensorflower-gardener authored and copybara-github committed Jul 31, 2024
1 parent 4d96769 commit 8bef836
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xla/service/transfer_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ absl::Status TransferManager::WriteRootTupleIndexTable(
device_memory.size());

std::vector<se::DeviceMemoryBase> elements;
elements.reserve(
ShapeUtil::TupleElementCount(device_buffer.on_device_shape()));
for (int64_t i = 0;
i < ShapeUtil::TupleElementCount(device_buffer.on_device_shape()); ++i) {
elements.push_back(device_buffer.buffer({i}));
Expand All @@ -290,6 +292,7 @@ absl::Status TransferManager::WriteRootTupleIndexTable(
device_memory.size());

std::vector<se::DeviceMemoryBase> elements;
elements.reserve(ShapeUtil::TupleElementCount(buffer_tree.shape()));
for (int64_t i = 0; i < ShapeUtil::TupleElementCount(buffer_tree.shape());
++i) {
elements.push_back(buffer_tree.element({i}).AsDeviceMemoryBase());
Expand Down

0 comments on commit 8bef836

Please sign in to comment.