376 Commits

Author SHA1 Message Date
Jeff Johnson
92f2391f41 Remove unused nvidia host fp16 headers/functions
Summary: Removes unused host fp16 code, the dependency upon which was removed a while ago.

Reviewed By: beauby

Differential Revision: D24279982

fbshipit-source-id: 5f6820c41eb387f766b2bed7e70203f5e01f49e9
2020-10-13 11:47:00 -07:00
Lucas Hosseini
70eaa9b1a3 Add missing copyright headers. (#1460)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1460

Reviewed By: wickedfoo

Differential Revision: D24278804

Pulled By: beauby

fbshipit-source-id: 5ea96ceb63be76a34f1eb4da03972159342cd5b6
2020-10-13 11:15:59 -07:00
Jeff Johnson
e796f4f9df Improve Faiss / PyTorch GPU interoperability
Summary:
PyTorch GPU in general is free to use whatever stream it currently wants, based on `torch.cuda.current_stream()`. Due to C++/python language barrier issues, we couldn't previously pass the actual `cudaStream_t` that is currently in use on a given device from PyTorch C++ to Faiss C++ via python.

This diff adds conversion functions to convert a Python integer representing a pointer to a `cudaStream_t` (which is itself a `CUstream_st*`), so we can pass the stream specified in `torch.cuda.current_stream()` to `StandardGpuResources::setDefaultStream`. We thus guarantee that all Faiss work is ordered on the same stream that is in use in PyTorch.

For use in Python, there is now the `faiss.contrib.pytorch_tensors.using_stream` context object which automatically sets and unsets the current PyTorch stream within Faiss. This takes a `StandardGpuResources` object in Python, and an optional `torch.cuda.Stream` if one wants to use a different stream, otherwise it uses the current one. This is how it is used:

```
# Create a non-default stream
s = torch.cuda.Stream()

# Have Torch use it
with torch.cuda.stream(s):

  # Have Faiss use the same stream as the above
  with faiss.contrib.pytorch_tensors.using_stream(res):
    # Do some work on the GPU
    faiss.bfKnn(res, args)
```

`using_stream` uses the same pattern as the Pytorch `torch.cuda.stream` object.

This replaces any brute-force GPU/CPU synchronization work that was necessary before.

Other changes in this diff:
- cleans up the config objects in the GpuIndex subclasses, to distinguish between read-only parameters that can only be set upon index construction, versus those that can be changed at runtime.
- StandardGpuResources now more properly distinguishes between user-supplied streams (like the PyTorch one) which will not be destroyed upon resources destruction, versus internal streams.
- `search_index_pytorch` now needs to take a `StandardGpuResources` object as well, there is no way to get this from an index instance otherwise (or at least, I would have to return a `shared_ptr`, in which case we should just update the Python SWIG stuff to use `shared_ptr` for GpuResources or something.

Reviewed By: mdouze

Differential Revision: D24260026

fbshipit-source-id: b18bb0eb34eb012584b1c923088228776c10b720
2020-10-13 09:11:19 -07:00
Lucas Hosseini
b459931ae4 Mark ~BufferedIOWriter() noexcept(false) (#1459)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1459

In C++11, destructors default to `noexcept(true)`. This destructor can throw (through `FAISS_THROW_IF_NOT()`), so marking it accordingly.

Reviewed By: mdouze

Differential Revision: D24253879

fbshipit-source-id: 7ba40387ed214dc2a03a495bc0d31ac9601c4c15
2020-10-13 06:55:27 -07:00
Lucas Hosseini
882d4f1051 Fix conda build cmd for nightly packages.
Reviewed By: mdouze

Differential Revision: D24269549

fbshipit-source-id: 8e6800781ae54a67c1d2424611a761f838d12026
2020-10-12 22:17:11 -07:00
Lucas Hosseini
52c6465a5e Test reporting in CircleCI (#1452)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1452

Reviewed By: mdouze

Differential Revision: D24269693

Pulled By: beauby

fbshipit-source-id: a1a98d263ef4b20107c845421615b1f35b52c6e2
2020-10-12 22:13:31 -07:00
Lucas Hosseini
8e44bff055 Nightly builds (#1451)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1451

Reviewed By: mdouze

Differential Revision: D24245777

Pulled By: beauby

fbshipit-source-id: f2ce92b28e3d7ffdc2e85bcd78d321da15fec87e
2020-10-12 14:40:52 -07:00
Lucas Hosseini
0aaf0a6357 Enable tests by default. (#1458)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1458

Reviewed By: mdouze

Differential Revision: D24252321

Pulled By: beauby

fbshipit-source-id: 38dc1f710c63ff1a292e962c636c380d82281b7f
2020-10-12 10:39:35 -07:00
Lucas Hosseini
38bf9f64e9 Get rid of stale generated docs.
Summary: Those docs are not very useful as is, and having to re-generate the html manually leads to them being stale most of the time. Should we decide that we want to have them, we can bring them back with some automated generation.

Reviewed By: mdouze

Differential Revision: D24246072

fbshipit-source-id: 39798b2861ff25ee3fa1f95abdbc3e7ddf3469ed
2020-10-12 00:33:37 -07:00
Lucas Hosseini
0fb6c00cfa Bump version to 1.6.4 (#1453)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1453

Reviewed By: mdouze

Differential Revision: D24243546

Pulled By: beauby

fbshipit-source-id: 190e0601bad3f08c5fac37923170a68ba1e83f16
v1.6.4
2020-10-12 00:01:06 -07:00
Lucas Hosseini
81b1aeea5e Fix warnings.
Reviewed By: wickedfoo

Differential Revision: D24168429

fbshipit-source-id: 0f5fe5eee0f313224a4681dc84ba05169ceb482d
2020-10-09 16:49:18 -07:00
Matthijs Douze
8b05434a50 Remove useless function
Summary:
Removed an unused function that caused compile errors in some configurations.
Added contrib function (exhaustive_search.knn) to compute the k nearest neighbors without constructing an index.
Renamed the equivalent GPU function as exhaustive_search.knn_gpu (it does not make much sense to mention numpy in the name as all functions take numpy arguments by default).

Reviewed By: beauby

Differential Revision: D24215427

fbshipit-source-id: 6d8e1eafa7c57593304b7b76f83b3015e4d2a2bb
2020-10-09 07:57:04 -07:00
Jeff Johnson
0412d761e5 GPU brute-force kNN can take int32 indices (#1445)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1445

As requested in https://github.com/facebookresearch/faiss/issues/1304, `bfKnn` can now produce int32 indices for output.

The native kernels themselves for brute-force kNN only operate on int32 indices in any case, so this is faster.

Also added a SWIG definition for float16 numpy arrays. As there is not a native half type, the reverse definition is undefined, so this is only really used for taking float16 data (e.g., from numpy) as input when in Python.

Added a `knn_numpy_gpu` wrapper as well that handles calling the `bfKnn` GPU implementation using CPU numpy arrays. This handles transposition and f32/f16/i32 data types as needed.

Reviewed By: mdouze

Differential Revision: D24152296

fbshipit-source-id: caa7daea23438cf26aa248e380f0dab2b6b907fd
2020-10-08 17:50:42 -07:00
cclauss
efa1e3f64f Use print() function in both Python 2 and Python 3 (#1443)
Summary:
Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3.

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1443

Reviewed By: LowikC

Differential Revision: D24157415

Pulled By: mdouze

fbshipit-source-id: 4ec637aa26b61272e5337d47b7796a330ce25bad
2020-10-08 00:27:29 -07:00
Jeff Johnson
9b007c7418 GPU supports arbitrary dimensions per PQ sub-quantizer
Summary:
This diff removes a long-standing limitation with GpuIndexIVFPQ, in that only a limited number of dimensions per sub-quantizer were supported when not using precomputed codes. This is part of the general cleanup and extension/optimization that I am performing of the GPU PQ code.

Now, we keep the same old specialized distance computations, but if we attempt to use a number of dimensions per sub-Q that are not specialized, we fall back to a general implementation based on batch matrix multiplication for computing PQ distances per code.

The batch MM PQ distance computation is enabled automatically if you use an odd number of dimensions per sub-quantizer (say, 7, 11, 53, ...). It can also be manually enabled via the `useMMCodeDistance` option in `GpuIndexIVFPQConfig` for testing purposes, though the result should be within some epsilon of the other implementation.

This diff also removes the iterated GEMM wrapper. I don't honestly know why I was using this instead of `cublasGemmStridedBatchedEx`, maybe I couldn't find that or this was originally implemented in a much older version of CUDA. The iterated GEMM call was used in a few other places (e.g., precomputed code computation). Now, this (and the PQ distance computation) use batch MM which is a single CUDA call.

This diff also adds stream synchronization to the temporary memory manager, as the fallback PQ distance computation needs to use temporary memory, and there were too many buffers for these to pre-allocate.

It also fixes the bug in https://github.com/facebookresearch/faiss/issues/1421.

Reviewed By: mdouze

Differential Revision: D24130629

fbshipit-source-id: 1c8bc53c86d0523832ad89c8bd4fa4b5fc187cae
2020-10-06 11:06:03 -07:00
Matthijs Douze
5ad630635c expose threat-safe stats (#1438)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1438

This diff changes Faiss and the `combined_index.py` to propagate thread-safe stats to handler.py

Reviewed By: MDSilber

Differential Revision: D24082543

fbshipit-source-id: 944e6b7630daeede5eb9501b81557a6fe5afec44
2020-10-03 23:26:36 -07:00
Jeff Johnson
6918f4ee48 Alternative GPU IVFPQ layout + unify IVF handling code
Summary:
This diff contains the following changes:

- adds support for an alternative IVFPQ memory layout, where the codes are interleaved by vector in groups of 32 rather than sub-quantizer, in order to support a variety of SIMD-like optimizations for PQ lookup kernels (eg like SCANN or other techniques that use in-register storage). This internal GPU-only format is transparent to the rest of the code, and attempts to copy an index to/from CPU deal with the difference in layout. The feature is enabled using `GpuIndexIVFPQConfig::alternativeLayout` upon index construction, which is not intended for general use yet, though it is functional.

This is the difference in layout explained:

```
  /// The default memory layout is [vector][PQ component]:
  /// (v0 d0) (v0 d1) ... (v0 dD-1) (v1 d0) (v1 d1) ...
  ///
  /// An alternative memory layout (layoutBy32) is
  /// [vector / 32][PQ component][vector % 32] with padding:
  /// (v0 d0) (v1 d0) ... (v31 d0) (v0 d1) (v1 d1) ... (v31 dD-1) (v31 dD-1) (v33
  /// d0) ...
  /// so the list length is always a multiple of numSubQuantizers * 32
```

- adds kernels to support IVFPQ query using this format. These new kernels are naive implementations that do not use register or shared memory at all to store the code distance information, however unlike the prior GPU IVFPQ code, they support arbitrary-sized PQ encodings (arbitrary dimensions per sub-quantizer and arbitrary number of sub-quantizers per vector). This is enabled for both precomputed and normal codes. It is my intention that I will eventually remove the restriction on dimensions per sub-Q / number of sub-Qs in the GPU code so that it functions more like the CPU code, though due to the necessity of implementation specialization, it will be likely that a small number of choices will be optimized, leaving the rest to use slower fallback implementations.

It is likely that this will eventually become the default / only format supported by the GPU, but the optimized kernels have not yet been developed using this layout. This diff is being checked in first in order to checkpoint the development. The existing lookup kernels and storage have not been affected.

Furthermore, it may be likely that IVFFlat and IVFSQ eventually change to this interleaved format as they offer some advantages in implementation.

- Unifies the IVF handling and copy code more between IVFFlat, IVFPQ and IVFScalarQuantizer on the GPU. There was a lot of copy pasta/duplicated code between the three implementations which was also divergent. This code is now all handled by the IVFBase and GpuIndexIVF classes.

- Adds a logging feature to StandardGpuResources which allows for printing all memory allocation/deallocation requests to the console as they happen in real time. This is useful for debugging.

Reviewed By: mdouze

Differential Revision: D24064745

fbshipit-source-id: 434fb4ec39aaba32271742ba7a40460847386141
2020-10-02 09:37:28 -07:00
Matthijs Douze
65ee09484f Test GPU ground-truth computation (#1432)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1432

The contrib function knn_ground_truth does not provide exactly the same resutls on GPU and CPU (but relative accuracy is still 1e-7). This diff relaxes the constraint on CPU and added test on GPU.

Reviewed By: wickedfoo

Differential Revision: D24012199

fbshipit-source-id: aaa20dbdf42b876b3ed7da34028646dbb20833d3
2020-09-30 11:14:18 -07:00
Jeff Johnson
ef6e53f8ba Cleanup flag/data propagation for IndexShards and IndexReplicas
Summary:
This diff fixes https://github.com/facebookresearch/faiss/issues/1412

There were various inconsistencies in how the shard and replica wrappers updated their internal state as the sub-indices were updated. This makes the two container classes work in the same way with similar synchronization functionality.

Reviewed By: beauby

Differential Revision: D23974186

fbshipit-source-id: c688c0c9124f823e4239aa2ff617b007b4564859
2020-09-29 10:25:46 -07:00
adream307
c69c18ef32 fix ivflib (#1410)
Summary:
if `ils = dynamic_cast<ArrayInvertedLists *> (index_ivf->invlists)` failed, `ils` would be `nullptr`.
so check if `ils` is `nullptr` before use it.

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1410

Reviewed By: beauby

Differential Revision: D23985814

Pulled By: mdouze

fbshipit-source-id: f62a3988e74b4de1f1c9a127475368302a35d4a5
2020-09-29 03:40:05 -07:00
Matthijs Douze
27393c436c remove Lua support
Summary:
For some obscure reason Lua support depends on python2, which is going to be removed.

https://fb.workplace.com/groups/311767668871855/permalink/4219593711422545/

Since the Lua interface is not used in any active code it seems, it's easier to just remove the Lua interface.

It also removes the Faiss Lua dep in the few occurrences where it is used (omry see recog-eval).

Reviewed By: wickedfoo

Differential Revision: D23865458

fbshipit-source-id: 4149517af18acce29179d04152c7364c2548efa0
2020-09-23 22:51:59 -07:00
Lucas Hosseini
3ac3ca0fab Update conda packages build. (#1422)
Summary:
This PR paves the way for nightly builds.

+ Get rid of cmake 3.17 manual install as cmake 3.18 is now available
in conda.
+ Update docker files for conda packages.
+ Specify CUDA architectures via CMake's `CMAKE_CUDA_ARCHITECTURES`.

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1422

Reviewed By: mdouze

Differential Revision: D23870447

Pulled By: beauby

fbshipit-source-id: 40ae7517e83356443a007a43261713e7e3a140d4
2020-09-23 10:18:25 -07:00
Matthijs Douze
d8af5138cd fix double free on std::string
Summary:
there was a dynamic allocation on a std::string from multiple threads. Instead of adding a mutex in perfromance sensitive code, I use a statically allocated string instead.

The stress test crashed before, now it runs fine.

Reviewed By: wickedfoo

Differential Revision: D23702154

fbshipit-source-id: 5dd37f1c151d8ce7f756f54a059235d8673cdabc
2020-09-18 00:57:50 -07:00
Matthijs Douze
15ffe976f0 fix tutorial files
Summary:
Added TARGETS files and fixed GPU tutorial code.
Related to issue https://github.com/facebookresearch/faiss/issues/1408

Reviewed By: beauby

Differential Revision: D23728732

fbshipit-source-id: 22bec7d439ffc187c144575e1e984111bfbfcbb2
2020-09-17 07:32:56 -07:00
Matthijs Douze
d2d32af6c5 properly propagate exceptions in inverted list reading (#1407)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1407

When Inverted list reading throws an exception, it is propagated until it reaches the openmp loop, which crashes the caller.
This diff catches the exception and properly propagates it to the caller in Python.
It should be possible to test it with an ondisk instead of relying on Manifold.

Reviewed By: MDSilber

Differential Revision: D23688968

fbshipit-source-id: 0943fac41d4e9b8b86535439e3fdee18ce96d4a5
2020-09-14 17:40:13 -07:00
Jeff Johnson
8f6a019ecd fix float16 precomputed code issues (#1406)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1406

I appear to have broken this with the rework of float16 support in Faiss GPU, though I cannot figure out why the tests only started failing recently.

cuBLAS does not support a f16 x f32 = f32 matrix multiplication. With a f16 coarse quantizer and IVFPQ precomputed codes, we were attempting to perform such a multiplication.

Now, in the precomputed code calculation, we intercept this and change it to a f32 x f32 = f32 computation.

The test when run by itself was also failing separately, though when run in series with the other test_gpu_index_ivfpq tests it was succeeding, due to the fact that the seed is only initialized once. The epsilon needed to change a slight bit.

Reviewed By: mdouze

Differential Revision: D23687070

fbshipit-source-id: 14a535407ed433eeaef3bc77cb0d6f5909c55b9f
2020-09-14 16:17:57 -07:00
Matthijs Douze
b4b576b139 Replace lower() numeric_limits (#1402)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1402

in C++03 there was no way to get the min value that is portable between int and float types (for float min returns the lowests strictly positive value). For C++11 this is lowest, so let's use it in the heap funcs.

Reviewed By: beauby

Differential Revision: D23622612

fbshipit-source-id: d3e3b2b7f695d971866f7b45bfc41986cd6b9bf4
2020-09-10 13:29:18 -07:00
Lucas Hosseini
9873376d8c Add GPU CI. (#1378)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1378

Reviewed By: mdouze

Differential Revision: D23370605

Pulled By: beauby

fbshipit-source-id: 6a9de47b6167ba8be12cce2735b1132991a190ab
2020-09-01 06:51:56 -07:00
Jeff Johnson
630a6f9702 reduced precision fix (#1388)
Summary:
Fix to https://github.com/facebookresearch/faiss/issues/1385, set the value during cuBLAS handle construction.

Also the tensor core option is deprecated for CUDA 11+.

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1388

Test Plan: Unable to test numerical results, but builds on GCP A100 instance with CUDA 11.

Reviewed By: mdouze

Differential Revision: D23427285

Pulled By: wickedfoo

fbshipit-source-id: d9487559035175ec7e06600dcd8f6a307f50abad
2020-09-01 00:26:50 -07:00
Lucas Hosseini
bf7e5d1b2f Bundle all files from contrib/ in python extension. (#1386)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1386

Reviewed By: mdouze

Differential Revision: D23416997

Pulled By: beauby

fbshipit-source-id: 9fc64d709046f65f49268cf2b9908dbd853d108d
2020-08-31 01:11:59 -07:00
Matthijs Douze
c97f890651 make sure swig_ptr and rev_swig_ptr work on all primitive types (#1382)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1382

The array types supported for swig_ptr were not complete. This diff fixes that.

Reviewed By: wickedfoo

Differential Revision: D23411297

fbshipit-source-id: d94249b140aeb8c8179d9da3fcbc97eb034eac91
2020-08-28 23:43:52 -07:00
Matthijs Douze
8dfd51d3a7 Moved pytorch interop code to contrib
Summary:
The pytorch interop code was in a test until now. However, it is better if people can rely on it to be updated when the API is updated. Therefore, we move it into contrib.
Also added a README.md

Reviewed By: wickedfoo

Differential Revision: D23392962

fbshipit-source-id: 9b7c0e388a7ea3c0b73dc0018322138f49191673
2020-08-28 17:50:49 -07:00
Matthijs Douze
f849680777 Dataset access in contrib
Summary:
This diff adds an object for a few useful dataset in faiss.contrib.
This includes synthetic datasets and the classic ones.
It is intended to work on:
- the FAIR cluster
- gluster
- manifold

Reviewed By: wickedfoo

Differential Revision: D23378763

fbshipit-source-id: 2437a7be9e712fd5ad1bccbe523cc1c936f7ab35
2020-08-27 19:19:33 -07:00
Matthijs Douze
6d73c2ff69 Fix int64 for python tests in windows (#1381)
Summary:
`long` is 32 bits on windows and so is the default int type for numpy (eg. the one used for `np.arange`).
This diff explicitly specifies 64-bit ints for all occurrences where it matters.

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1381

Reviewed By: wickedfoo

Differential Revision: D23371232

Pulled By: mdouze

fbshipit-source-id: 220262cd70ee70379f83de93561a4eae71c94b04
2020-08-27 12:40:55 -07:00
Jeff Johnson
57506c6f4d Update kWarpSize for A100 arch (#1380)
Summary:
Update define for 8.0 compute capability.

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1380

Test Plan: A100 builds on Google Cloud.

Reviewed By: mdouze

Differential Revision: D23357243

Pulled By: wickedfoo

fbshipit-source-id: 5c64ecc93bfe0bfa853e9d12def15c6bbe4c5c0e
2020-08-27 10:19:49 -07:00
Lucas Hosseini
8941160678 Fix CMake build of python GPU wrapper.
Summary: Properties on swig sources must be set prior to the `swig_add_library()` call.

Reviewed By: mdouze

Differential Revision: D23338668

fbshipit-source-id: 71fdd1221ef0fabbd5597eff5e71d36e26435304
2020-08-25 22:52:21 -07:00
Lucas Hosseini
3a9eb87af2 Windows CI + conda packaging. (#1377)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1377

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314728

Pulled By: beauby

fbshipit-source-id: fb74b1e832233aeeea47f3acdd606c6be65c143f
2020-08-25 16:58:25 -07:00
Lucas Hosseini
bbdbc41bdf Fix dynamic size arrays. (#1376)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1376

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314734

Pulled By: beauby

fbshipit-source-id: 0ea33812e2f8b9044830989ea8ba7607b5a1eb0c
2020-08-25 16:58:25 -07:00
Lucas Hosseini
51ff90ac01 Add __PRETTY_FUNCTION__ polyfill. (#1375)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1375

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314740

Pulled By: beauby

fbshipit-source-id: f11b6f9753981742be9181247a30b786cc5d0e81
2020-08-25 16:58:25 -07:00
Lucas Hosseini
7c6a446bf5 Avoid building OnDiskInvertedLists on Windows. (#1374)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1374

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314729

Pulled By: beauby

fbshipit-source-id: 5ad7fa3ed830b17a5be66fb2995dd94e079d8507
2020-08-25 16:58:24 -07:00
Lucas Hosseini
e520756b1c Export static/extern globals. (#1373)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1373

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314736

Pulled By: beauby

fbshipit-source-id: 321d1fe510d9cb9fbb08b7b089a0ea420e215fa8
2020-08-25 16:58:24 -07:00
Lucas Hosseini
6d3c49bad6 Fix target export for Windows. (#1372)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1372

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314733

Pulled By: beauby

fbshipit-source-id: 1042428ac35ec4e6f68879001af9f2d8fe880a7e
2020-08-25 16:58:24 -07:00
Lucas Hosseini
b9cfa46c92 Fix guard clause on get_mem_usage_kb(). (#1371)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1371

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314741

Pulled By: beauby

fbshipit-source-id: f64e80fbb24bac25134a3d619845839274db898b
2020-08-25 16:58:24 -07:00
Lucas Hosseini
2450f5ee4c Fix swig build on Windows. (#1370)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1370

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314739

Pulled By: beauby

fbshipit-source-id: 1a48e6bc14fe24b7fbffbbc60f40997d6441e46e
2020-08-25 16:58:24 -07:00
Lucas Hosseini
2ccecbcd7e Windows implementation of getmillisecs(). (#1369)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1369

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314738

Pulled By: beauby

fbshipit-source-id: 72590eea929edcd8bd133c65265778b6cf6574a9
2020-08-25 16:58:24 -07:00
Lucas Hosseini
e3044c407e Add __builtin_ctzll/__builtin_clzll polyfills. (#1368)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1368

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314730

Pulled By: beauby

fbshipit-source-id: ccddb11ef1ce32e0183497640454cfc176edba01
2020-08-25 16:58:24 -07:00
Lucas Hosseini
86ac808fd3 Add __builtin_popcountl polyfill. (#1367)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1367

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314742

Pulled By: beauby

fbshipit-source-id: f15ae3a06d5cc55d4578443bc56f1af520bbc715
2020-08-25 16:58:24 -07:00
Lucas Hosseini
95216f91f4 Add strtok_r polyfill. (#1366)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1366

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314735

Pulled By: beauby

fbshipit-source-id: ee0f9c1fb14d80da7820b2cd614a24c01f87370e
2020-08-25 16:58:24 -07:00
Lucas Hosseini
dc4d3c2013 Fix setup.py for Windows. (#1365)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1365

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314737

Pulled By: beauby

fbshipit-source-id: e9ba69c5559f1e22855912ef301a060e27d2193d
2020-08-25 16:58:24 -07:00
Lucas Hosseini
e5d2defaae Disable contrib tests for python2. (#1364)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1364

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314732

Pulled By: beauby

fbshipit-source-id: 788465c353bbc65947a6c766e8509f35f35e4134
2020-08-25 16:58:24 -07:00