faiss/tests
Junjie Qi 55dc880c2f Change cmake to build googletest from source (#3319)
Summary:
In the https://github.com/facebookresearch/faiss/pull/3278, we to find_package to link to GTest. However, it needs to have googletest to build independently. Not everyone builds their googletest locally first. In this diff, we still try to build googletest from source and combine find_package together.

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

Test Plan:
STEP 1: Install deps
```
conda install -y -q python=3.11 cmake make swig=4.0.2 mkl=2023 mkl-devel=2023 numpy scipy pytest gxx_linux-64 sysroot_linux-64
```

STEP2: Compile

```
cmake -B build \
      -DBUILD_TESTING=ON \
      -DBUILD_SHARED_LIBS=ON \
      -DFAISS_ENABLE_GPU=OFF \
      -DFAISS_ENABLE_RAFT=OFF \
      -DFAISS_OPT_LEVEL=avx2 \
      -DFAISS_ENABLE_C_API=ON \
      -DPYTHON_EXECUTABLE=$(which python) \
      -DCMAKE_BUILD_TYPE=Release \
      -DBLA_VENDOR=Intel10_64_dyn \
      -DCMAKE_CUDA_FLAGS="-gencode arch=compute_75,code=sm_75" \
      .
```

Reviewed By: algoriddle

Differential Revision: D55358059

Pulled By: junjieqi

fbshipit-source-id: 95ad4a745238b88b438728de64173f99d3d50dbe
2024-03-27 10:53:49 -07:00
..
CMakeLists.txt Change cmake to build googletest from source (#3319) 2024-03-27 10:53:49 -07:00
common_faiss_tests.py Make tests a little less verbose 2023-07-04 07:02:53 -07:00
test_RCQ_cropping.cpp Enable for faiss tests (#3002) 2023-08-14 08:03:40 -07:00
test_approx_topk.cpp Remove unused exception parameter from files inc faiss/tests/test_approx_topk.cpp 2023-12-08 05:37:19 -08:00
test_autotune.py
test_binary_factory.py
test_binary_flat.cpp
test_binary_hashindex.py
test_binary_io.py
test_build_blocks.py Cleanup clustering code (#3030) 2023-08-31 01:11:45 -07:00
test_clone.py OSS legal requirements (#2698) 2023-02-07 14:32:56 -08:00
test_clustering.py
test_code_distance.cpp Enable for faiss tests (#3002) 2023-08-14 08:03:40 -07:00
test_contrib.py Index pretransform support in search_preassigned (#3225) 2024-01-30 09:20:07 -08:00
test_contrib_with_scipy.py faiss: use autovectorization for inner product (#2712) 2023-02-16 10:24:25 -08:00
test_cppcontrib_sa_decode.cpp Enable for faiss tests (#3002) 2023-08-14 08:03:40 -07:00
test_cppcontrib_uintreader.cpp Enable for faiss tests (#3002) 2023-08-14 08:03:40 -07:00
test_dealloc_invlists.cpp
test_disable_pq_sdc_tables.cpp Skip HNSWPQ sdc init with new io flag (#3250) 2024-03-01 04:27:49 -08:00
test_distances_simd.cpp Enable for faiss tests (#3002) 2023-08-14 08:03:40 -07:00
test_documentation.py
test_doxygen_documentation.py
test_extra_distances.py Implemented Jaccard distance (#2684) 2023-02-27 07:49:42 -08:00
test_factory.py make nbits configurable for graph indices based on PQ (#3031) 2023-09-01 02:37:33 -07:00
test_fast_scan.py Support RAFT from python (#2864) 2023-05-19 20:49:01 -07:00
test_fast_scan_ivf.py Fix IVFPQFastScan decode function (#3312) 2024-03-25 11:19:40 -07:00
test_fastscan_perf.cpp fix perf test (#3255) 2024-02-15 10:38:55 -08:00
test_graph_based.py Fix HNSW stats (#3309) 2024-03-22 12:55:30 -07:00
test_heap.cpp addn_query_subset_with_ids float index bug (#2834) 2023-04-28 05:14:18 -07:00
test_hnsw.cpp AVX2 version of faiss::HNSW::MinimaxHeap::pop_min() (#2874) 2023-05-26 11:35:21 -07:00
test_index.py Generalize ResultHanlder, support range search for HNSW and Fast Scan (#3190) 2024-01-11 11:46:30 -08:00
test_index_accuracy.py avx512 CI + conda packages (#3197) 2024-01-11 08:26:33 -08:00
test_index_binary.py Adding test for IndexBinaryFlat.reconstruct_n() (#3310) 2024-03-22 15:04:01 -07:00
test_index_binary_from_float.py
test_index_composite.py Search and return codes (#3143) 2023-11-25 13:57:25 -08:00
test_io.py Fix some typos (#3056) 2023-09-27 03:17:41 -07:00
test_ivf_index.cpp add a context parameter to InvertedLists and InvertedListsIterator (#3247) 2024-02-09 09:14:38 -08:00
test_ivflib.py
test_ivfpq_codec.cpp
test_ivfpq_indexing.cpp
test_local_search_quantizer.py relax test_lut rtol (#3016) 2023-08-18 03:47:19 -07:00
test_lowlevel_ivf.cpp
test_mem_leak.cpp
test_merge.cpp Skip HNSWPQ sdc init with new io flag (#3250) 2024-03-01 04:27:49 -08:00
test_merge_index.py OSS legal requirements (#2698) 2023-02-07 14:32:56 -08:00
test_meta_index.py IndexShards with common quantizer (#2682) 2023-02-15 06:48:47 -08:00
test_omp_threads.cpp
test_omp_threads_py.py
test_ondisk_ivf.cpp Remove semicolon(s) from 3 files inc facer/engine/utils/UDPServer.h 2024-02-14 14:37:40 -08:00
test_oom_exception.py
test_pairs_decoding.cpp Enable for faiss tests (#3002) 2023-08-14 08:03:40 -07:00
test_params_override.cpp
test_partition.py support range search from GPU (#2860) 2023-05-16 00:27:53 -07:00
test_partitioning.cpp faiss-gpu-raft package (#2992) 2023-08-16 09:30:41 -07:00
test_pq_encoding.cpp
test_product_quantizer.py
test_referenced_objects.py
test_refine.py Add search parameters for IndexRefine::search() and IndexRefineFlat::search() (#3122) 2023-11-05 15:07:39 -08:00
test_residual_quantizer.py fix test TestCrossCodebookComputations::test_precomp 2023-10-31 09:50:05 -07:00
test_rowwise_minmax.py
test_search_params.py fix ACCESS VIOLATION error when searching using IDSelectorArray 2024-01-29 23:08:45 -08:00
test_simdlib.cpp Enable for faiss tests (#3002) 2023-08-14 08:03:40 -07:00
test_sliding_ivf.cpp
test_standalone_codec.py Search and return codes (#3143) 2023-11-25 13:57:25 -08:00
test_threaded_index.cpp Remove unused variables in faiss/tests/test_threaded_index.cpp 2024-02-14 15:59:23 -08:00
test_transfer_invlists.cpp
test_util.h Skip HNSWPQ sdc init with new io flag (#3250) 2024-03-01 04:27:49 -08:00
torch_test_contrib.py