Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
faiss gpu: fix DeviceVector reallocations (facebookresearch#3256)
Summary: Pull Request resolved: facebookresearch#3256 Per facebookresearch#3251 there are two problems with DeviceVector resizing and capacity growth. The first is that if you resize a vector with enough capacity available for the new size, it will go ahead and re-allocate memory anyways. The second is that the calculation that was supposed to produce x + 0.25 * x was actually producing x + 4 * x for determining the new size of the allocated memory for a vector. This is also fixed. Reviewed By: mdouze Differential Revision: D53813207 fbshipit-source-id: 5aa67bc0a87c171a070645bdcc6bc5d22ba6b36b
- Loading branch information