We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a78f9ef + 28be9c4 commit 492bd6aCopy full SHA for 492bd6a
tensorflow/compiler/xla/client/client.cc
@@ -380,7 +380,9 @@ StatusOr<std::vector<DeviceHandle>> Client::GetDeviceHandles(
380
}
381
382
std::vector<DeviceHandle> device_handles;
383
- for (const DeviceHandle& device_handle : response.device_handles()) {
+ const auto& response_device_handles = response.device_handles();
384
+ device_handles.reserve(response_device_handles.size());
385
+ for (const DeviceHandle& device_handle : response_device_handles) {
386
device_handles.push_back(device_handle);
387
388
0 commit comments