[XLA/GPU] do not move local object in a return statement.

This commit is contained in:
Trent Lo 2020-10-26 18:11:41 -07:00
parent df783a99f8
commit b27cbc3e7e

View File

@ -1130,7 +1130,7 @@ HeapSimulator::Result<HloValue> AlternateMemoryBestFitHeap::Finish() {
HeapSimulator::Result<HloValue> result; HeapSimulator::Result<HloValue> result;
result.heap_size = result_.heap_size; result.heap_size = result_.heap_size;
result.heap_results.emplace_back(std::move(result_)); result.heap_results.emplace_back(std::move(result_));
return std::move(result); return result;
} }
void AlternateMemoryBestFitHeap::CreateAllocationValuesFromColocatedIntervals( void AlternateMemoryBestFitHeap::CreateAllocationValuesFromColocatedIntervals(