Skip to content

Commit

Permalink
Some chore fixes (#4010)
Browse files Browse the repository at this point in the history
Summary:
- Fix a typo in comment
- Add missing header files to `FAISS_HEADERS` in CMake config

There should be some check against the inconsistency between `FAISS_HEADERS` and actual files, e.g. test compiling with installed headers and shared library (otherwise it always succeeds in the source dir).

This is not the first time that headers are missing (#3218).

Pull Request resolved: #4010

Reviewed By: junjieqi

Differential Revision: D65630647

Pulled By: kuarora

fbshipit-source-id: 2efcfc4bbd0b2d29efa817e1ff9371942c15d30a
  • Loading branch information
Harry-Chen authored and facebook-github-bot committed Nov 20, 2024
1 parent 3c25a68 commit 98d335b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions faiss/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ set(FAISS_HEADERS
IndexIVFPQR.h
IndexIVFSpectralHash.h
IndexLSH.h
IndexNeuralNetCodec.h
IndexLattice.h
IndexNNDescent.h
IndexNSG.h
Expand Down Expand Up @@ -168,6 +169,7 @@ set(FAISS_HEADERS
impl/ScalarQuantizer.h
impl/ThreadedIndex-inl.h
impl/ThreadedIndex.h
impl/index_read_utils.h
impl/io.h
impl/io_macros.h
impl/kmeans1d.h
Expand All @@ -179,13 +181,17 @@ set(FAISS_HEADERS
impl/code_distance/code_distance.h
impl/code_distance/code_distance-generic.h
impl/code_distance/code_distance-avx2.h
impl/code_distance/code_distance-avx512.h
impl/code_distance/code_distance-sve.h
invlists/BlockInvertedLists.h
invlists/DirectMap.h
invlists/InvertedLists.h
invlists/InvertedListsIOHook.h
invlists/OnDiskInvertedLists.h
utils/AlignedTable.h
utils/bf16.h
utils/Heap.h
utils/NeuralNet.h
utils/WorkerThread.h
utils/distances.h
utils/extra_distances-inl.h
Expand All @@ -204,8 +210,10 @@ set(FAISS_HEADERS
utils/sorting.h
utils/simdlib.h
utils/simdlib_avx2.h
utils/simdlib_avx512.h
utils/simdlib_emulated.h
utils/simdlib_neon.h
utils/simdlib_ppc64.h
utils/utils.h
utils/distances_fused/avx512.h
utils/distances_fused/distances_fused.h
Expand All @@ -216,6 +224,7 @@ set(FAISS_HEADERS
utils/approx_topk/mode.h
utils/approx_topk_hamming/approx_topk_hamming.h
utils/transpose/transpose-avx2-inl.h
utils/transpose/transpose-avx512-inl.h
utils/hamming_distance/common.h
utils/hamming_distance/generic-inl.h
utils/hamming_distance/hamdis-inl.h
Expand Down
2 changes: 1 addition & 1 deletion faiss/impl/ResidualQuantizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ struct ResidualQuantizer : AdditiveQuantizer {

/** lower-level encode function
*
* @param n number of vectors to hanlde
* @param n number of vectors to handle
* @param residuals vectors to encode, size (n, beam_size, d)
* @param beam_size input beam size
* @param new_beam_size output beam size (should be <= K * beam_size)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_graph_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def test_build_invalid_knng(self):
"""Make some invalid entries in the input knn graph.
It would cause a warning but IndexNSG should be able
to handel this.
to handle this.
"""
knn_graph = self.make_knn_graph(faiss.METRIC_L2)
knn_graph[:100, 5] = -111
Expand Down

0 comments on commit 98d335b

Please sign in to comment.