Some chore fixes (#4010)

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 (https://github.com/facebookresearch/faiss/issues/3218).

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

Reviewed By: junjieqi

Differential Revision: D65630647

Pulled By: kuarora

fbshipit-source-id: 2efcfc4bbd0b2d29efa817e1ff9371942c15d30a
pull/4036/head
Shengqi Chen 2024-11-19 16:48:35 -08:00 committed by Facebook GitHub Bot
parent 3c25a68e52
commit 98d335b172
3 changed files with 11 additions and 2 deletions

View File

@ -125,6 +125,7 @@ set(FAISS_HEADERS
IndexIVFPQR.h
IndexIVFSpectralHash.h
IndexLSH.h
IndexNeuralNetCodec.h
IndexLattice.h
IndexNNDescent.h
IndexNSG.h
@ -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
@ -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
@ -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
@ -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

View File

@ -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)

View File

@ -335,7 +335,7 @@ class TestNSG(unittest.TestCase):
"""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