Commit Graph

10 Commits (50f323249be955180f2f84db76444729bbef67f0)

Author SHA1 Message Date
Michael Norris eff0898a13 Enable linting: lint config changes plus arc lint command (#3966)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3966

This actually enables the linting.

Manual changes:
- tools/arcanist/lint/fbsource-licenselint-config.toml
- tools/arcanist/lint/fbsource-lint-engine.toml

Automated changes:
`arc lint --apply-patches --take LICENSELINT --paths-cmd 'hg files faiss'`

Reviewed By: asadoughi

Differential Revision: D64484165

fbshipit-source-id: 4f2f6e953c94ef6ebfea8a5ae035ccfbea65ed04
2024-10-22 09:46:48 -07:00
Richard Barnes a35eb0ac11 Remove unused variables in faiss/IndexIVF.cpp
Summary:
LLVM-15 has a warning `-Wunused-but-set-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused variables can compromise readability or, worse, performance.

This diff either (a) removes an unused variable and, possibly, it's associated code, or (b) qualifies the variable with `[[maybe_unused]]`, mostly in cases where the variable _is_ used, but, eg, in an `assert` statement that isn't present in production code.

 - If you approve of this diff, please use the "Accept & Ship" button :-)

Reviewed By: dmm-fb

Differential Revision: D56065763

fbshipit-source-id: b0541b8a759c4b6ca0e8753fc24b8c227047bd3d
2024-04-12 13:03:17 -07:00
chasingegg 6218111233 Fix some typos (#3056)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3056

Reviewed By: pemazare

Differential Revision: D49617607

Pulled By: mlomeli1

fbshipit-source-id: b2d5df67e88e029882e697597af9f3fc8fe1e64c
2023-09-27 03:17:41 -07:00
Matthijs Douze a996a4a052 Put idx_t in the faiss namespace (#2582)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2582

A few more or less cosmetic improvements
* Index::idx_t was in the Index object, which does not make much sense, this diff moves it to faiss::idx_t
* replace multiprocessing.dummy with multiprocessing.pool
* add Alexandr as a core contributor of Faiss in the README ;-)

```
for i in $( find . -name \*.cu -o -name \*.cuh -o -name \*.h -o -name \*.cpp ) ; do
  sed -i s/Index::idx_t/idx_t/ $i
done
```

For the fbcode deps:
```
for i in $( fbgs Index::idx_t --exclude fbcode/faiss -l ) ; do
   sed -i s/Index::idx_t/idx_t/ $i
done
```

Reviewed By: algoriddle

Differential Revision: D41437507

fbshipit-source-id: 8300f2a3ae97cace6172f3f14a9be3a83999fb89
2022-11-30 08:25:30 -08:00
Lucas Hosseini e86bf8cae1 Enable clang-format + autofix.
Summary: Format whole codebase with clang-format.

Reviewed By: mdouze

Differential Revision: D22891341

fbshipit-source-id: 673032b2444d61026d1e2c3fa2c5659f178cf58b
2021-02-25 04:46:10 -08:00
Matthijs Douze f351a83ef6 Update demo_imi_pq.cpp (#1636)
Summary:
remove long.
This is to close PR https://github.com/facebookresearch/faiss/issues/1050

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

Reviewed By: beauby

Differential Revision: D25994690

Pulled By: mdouze

fbshipit-source-id: 35dfa4295602f64053883594b5a7d0b9b7293545
2021-01-22 00:04:19 -08: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 a8118acbc5
Facebook sync (May 2019) + relicense (#838)
Changelog:

- changed license: BSD+Patents -> MIT
- propagates exceptions raised in sub-indexes of IndexShards and IndexReplicas
- support for searching several inverted lists in parallel (parallel_mode != 0)
- better support for PQ codes where nbit != 8 or 16
- IVFSpectralHash implementation: spectral hash codes inside an IVF
- 6-bit per component scalar quantizer (4 and 8 bit were already supported)
- combinations of inverted lists: HStackInvertedLists and VStackInvertedLists
- configurable number of threads for OnDiskInvertedLists prefetching (including 0=no prefetch)
- more test and demo code compatible with Python 3 (print with parentheses)
- refactored benchmark code: data loading is now in a single file
2019-05-28 16:17:22 +02:00
Lucas Hosseini 6880286ea0
Facebook sync (#504)
* Facebook sync

* Update swig wrappers.

* Fix comment.
2018-07-06 14:12:11 +02:00
Matthijs Douze 0c482e54eb sync with FB version 2018-02-23 (#347)
- support on-disk IVF
2018-02-23 07:49:45 -08:00