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
Lucas Hosseini
c689bd010c
Update conda packaging. ( #1363 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1363
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23314731
Pulled By: beauby
fbshipit-source-id: b57a66cf5c44788837ee379fbb7f73adbdbf1274
2020-08-25 16:58:24 -07:00
Matthijs Douze
24d00ccc5b
Change throw error to warning
...
Summary:
Precomputing code does not make sense for IP search (it is useful only for L2). Previously, this throwed an exception. This diff just prints a warning.
Another error showed up that I am not sure how to fix:
https://www.internalfb.com/intern/testinfra/testconsole/testrun/1407375052636748/
Reviewed By: wickedfoo
Differential Revision: D23314697
fbshipit-source-id: e11b2ded43f9579d637963a142499693f5c15b71
2020-08-25 13:23:26 -07:00
Lucas Hosseini
2434e91ef7
Fix leaking fd in test_io. ( #1362 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1362
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23311998
Pulled By: beauby
fbshipit-source-id: 9de47f9650eee2a07d302ac1753d60d0d00c2f0f
2020-08-24 23:53:27 -07:00
Lucas Hosseini
00dfdd3085
Fix format specifier in python_callbacks. ( #1361 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1361
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23312001
Pulled By: beauby
fbshipit-source-id: 006536827463e14eb5747cb464e41163c0cf6490
2020-08-24 23:53:27 -07:00
Lucas Hosseini
ef28350b4b
Move definition of inner_product_to_L2sqr() to distances.cpp. ( #1359 )
...
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1359
The declaration is in distances.h, which utils.cpp does not include,
confusing the linker on Windows.
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23311999
Pulled By: beauby
fbshipit-source-id: 6ebf26248a4376abc9dd90996e5dc43fa343e0b4
2020-08-24 23:53:27 -07:00
Lucas Hosseini
b23b2f66df
Fix VectorDistance initialization. ( #1358 )
...
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1358
The MSVC compiler gets confused by aggregate initialization with parentheses.
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23312003
Pulled By: beauby
fbshipit-source-id: 9ceb10ac84fd4aee19bf6352298b24def95f1493
2020-08-24 23:53:27 -07:00
Lucas Hosseini
1cc5c6d095
Remove extraneous unix header include. ( #1356 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1356
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23312000
Pulled By: beauby
fbshipit-source-id: b54250df7f5a8b69f707546649024d82adefd745
2020-08-24 23:53:27 -07:00
Lucas Hosseini
39d7a33840
Make OOMException test Linux-only. ( #1354 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1354
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23292455
Pulled By: beauby
fbshipit-source-id: 50b096fd869724ef8e87f697887e8617522324e3
2020-08-24 06:46:52 -07:00
Lucas Hosseini
24c4460dd2
Avoid leaking file descriptors in python tests. ( #1353 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1353
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23292456
Pulled By: beauby
fbshipit-source-id: 44458eb16d037883ff39827accf5edddb1b1bb89
2020-08-24 06:46:52 -07:00
Lucas Hosseini
e0423f7fcd
Fix long used as uint64_t in lattice_Zn. ( #1352 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1352
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23292457
Pulled By: beauby
fbshipit-source-id: 58720b750ec6c06068be5fb0844aa581725efc4a
2020-08-24 06:46:52 -07:00
Lucas Hosseini
10bddff11c
Fix unclosed thread pool. ( #1351 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1351
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23292458
Pulled By: beauby
fbshipit-source-id: 5f134178d2991d90bb5bbd50414af6febafb141d
2020-08-24 06:46:52 -07:00
Lucas Hosseini
c37e71456b
Get rid of non-portable drand48. ( #1349 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1349
Reviewed By: mdouze
Differential Revision: D23289393
Pulled By: beauby
fbshipit-source-id: a626bbf252ced4ae01abbc3dce4be50d9e628728
2020-08-24 00:42:21 -07:00
Lucas Hosseini
1d4b1571e9
Update INSTALL.md ( #1346 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1346
Reviewed By: mdouze
Differential Revision: D23246125
Pulled By: beauby
fbshipit-source-id: 3bc3da50e26226e6010af8a6f7db23111d922a50
2020-08-22 22:32:18 -07:00
Lucas Hosseini
9a7f2b9bd0
Avoid OpenMP 4.0 custom reduction. ( #1344 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1344
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23234970
Pulled By: beauby
fbshipit-source-id: 38aad08c0c856be425cea163bef7d29715a4cd39
2020-08-20 10:45:28 -07:00
Lucas Hosseini
b35dec740d
Fix unsigned OpenMP loop indices (disallowed in OpenMP 2). ( #1343 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1343
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23234967
Pulled By: beauby
fbshipit-source-id: e4f1541c4460052a9cbccc3a9365206bfa330694
2020-08-20 10:45:28 -07:00
Lucas Hosseini
91ab745da8
Fix long literals used as 64 bit. ( #1342 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1342
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23234963
Pulled By: beauby
fbshipit-source-id: 1c28f9c88777b31c1e2f432966c51f2986746965
2020-08-20 10:45:28 -07:00
Lucas Hosseini
7cc320e438
Replace finite() with std::isfinite(). ( #1341 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1341
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23234968
Pulled By: beauby
fbshipit-source-id: f7ba7bd473e05f2ba4d0ca555bc78965f5aa3fd1
2020-08-20 10:45:27 -07:00
Lucas Hosseini
7b615ed5d9
Replace bzero (deprecated in POSIX 2001) with memset. ( #1340 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1340
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23234969
Pulled By: beauby
fbshipit-source-id: 0e016c3502cd2e97eae2c2a010525e08f32ec5e2
2020-08-20 10:45:27 -07:00
Lucas Hosseini
7c1c7f81d2
Fix division by zero. ( #1339 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1339
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23234966
Pulled By: beauby
fbshipit-source-id: 43142bbf2e30ce69dd15dfc1818d3e3079c7ec48
2020-08-20 10:45:27 -07:00
Lucas Hosseini
a97ebeeabd
Fix format specifiers for size_t/idx_t. ( #1338 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1338
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23234964
Pulled By: beauby
fbshipit-source-id: 2222d90d8ca3f9a6ac3a9e624e7ec87072da3a25
2020-08-20 10:45:27 -07:00
Lucas Hosseini
8438062b88
Add missing algorithm header. ( #1337 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1337
Test Plan: Imported from OSS
Reviewed By: mdouze
Differential Revision: D23234965
Pulled By: beauby
fbshipit-source-id: 1b4af90fdda37d4554f9f8774ac4559f481197a0
2020-08-20 10:45:27 -07:00
Lucas Hosseini
f3727a62f5
Remove python shebangs in tests.
...
Reviewed By: mdouze
Differential Revision: D23167048
fbshipit-source-id: 98196f489461bc922e6124e88e0bfb32dfe507ca
2020-08-17 11:46:26 -07:00
Lucas Hosseini
b539a73e58
Linter auto-fix.
...
Summary: `arc lint faiss/**/*`
Reviewed By: LowikC
Differential Revision: D22891305
fbshipit-source-id: 45bab7294ccccf70898b4967b03683894b6ae4c4
2020-08-16 19:52:27 -07:00
psj8252
e1985c3005
Remove wrong assertion ( #1327 )
...
Summary:
https://github.com/facebookresearch/faiss/issues/1316
Maybe when updating metrics inner product for hnsw, this should be removed.
removed wrong throw line.
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1327
Reviewed By: beauby
Differential Revision: D23105148
Pulled By: mdouze
fbshipit-source-id: 1dabcafd1fc9d766722b82b002d398954bd59397
2020-08-15 16:09:24 -07:00
Lucas Hosseini
b7b261cad1
Move from TravisCI to CircleCI ( #1315 )
...
Summary:
Depends on https://github.com/facebookresearch/faiss/issues/1313 .
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1315
Reviewed By: mdouze
Differential Revision: D23148557
Pulled By: beauby
fbshipit-source-id: 0a35f17d22aa04db6bd1c16cfc5ff8eee28f1f74
2020-08-15 04:00:51 -07:00
Lucas Hosseini
a8e4c5e2d5
Move build to CMake ( #1313 )
...
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1313
Reviewed By: mdouze
Differential Revision: D22948267
Pulled By: beauby
fbshipit-source-id: ec16fa0342f37672d46fb7886ecc55c7996011c4
2020-08-14 15:03:10 -07:00