22 Commits
Author SHA1 Message Date
Michael Norris 6bbb068ad8 Measure 20-byte Hamming codes eight at a time (#5587)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/5587

**TL;DR:** Adds a batched 20-byte Hamming kernel that measures eight codes per call, the only thing that helps the 160-bit width, worth 1.21x end to end.

A 20-byte code has no vector kernel at any x86 SIMD level. `HammingComputer20` measures one distance with three scalar popcounts at every level, including `AVX512_VPOPCNT`, so a scan of 160-bit codes runs the same code everywhere.

Vectorizing a single 20-byte distance does not help. A masked 256-bit load plus `vpopcntq` plus a horizontal reduction measures the same as the scalar body, because the reduction costs more than the three popcounts it replaces.

Measuring several codes per call does help, because it amortizes that reduction. This adds `hamming_batch()` to `HammingComputer20` at `AVX512_VPOPCNT`, which measures eight codes at once:

- Eight codes span 160 bytes. `_mm512_popcnt_epi8` gives a count per byte.
- `_mm512_sad_epu8` sums each aligned 8-byte group.
- A 20-byte code covers two whole groups plus half of a group it shares with its neighbour, so each code needs one scalar popcount for its half.

`IVFBinaryScannerL2::scan_codes` and `IVFBinaryScannerL2::scan_codes_range` call `hamming_batch()` when the computer declares a `batch_size`, then measure the remaining codes one at a time. A computer without a `batch_size` keeps the existing loop, so no other code size changes.

The scanner holds the tiled query, and the constructor rejects a code size that does not match the computer. A caller therefore cannot reach the batch kernel with a stride the kernel does not read.

The byte-wise popcount needs `AVX512_BITALG`, which is a separate CPUID bit from `AVX512_VPOPCNTDQ`. This adds the flag to the `AVX512_VPOPCNT` level and requires both bits to select it. Every CPU that has VPOPCNTDQ also has BITALG, so no CPU loses the level.

An alternative byte-wise popcount built from `vpshufb`, which needs neither bit and would run at the plain `AVX512` level, measures only 1.08x against 1.54x, so it is not worth the wider reach.

Reviewed By: alibeklfc

Differential Revision: D118971285

fbshipit-source-id: 5fd4637c972e5c55e2695b32b9b15fba8181a242
2026-09-10 09:32:36 -07:00
Aalekh Patel cda4f6e713 Expose IndexBinaryIVF.set_direct_map_type via the C API (#5451)
Summary:
Expose the `set_direct_map_type` method of binary IVF indexes via the C API. This enables support for the `index.set_direct_map_type` API in languages other than Python.

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

Reviewed By: alibeklfc

Differential Revision: D114681970

Pulled By: mnorris11

fbshipit-source-id: 1342eeb225d6fd9fdea76c6b9417cedde55c1d3a
2026-09-04 09:39:33 -07:00
Alexandr Guzhva 799bf3aaec Introduce early stop facilities for IVF, attempt 2 (#5160)
Summary:
# Introduce early-stop controls for IVF search

This PR adds optional early-stop controls to IVF search through `SearchParametersIVF`.

IVF search looks in a sequence of buckets. Normally it keeps looking until it has checked all requested buckets. This PR adds a few ways to stop earlier:

- stop after enough candidate vectors have been checked,
- stop FastScan after enough buckets have been checked,
- stop range search after several nearby buckets produce no results.

All new fields default to disabled, so existing searches keep their current behavior unless callers opt in.

## New SearchParametersIVF fields

Default values:

| Field | Default | Effect |
|---|---:|---|
| `ensure_topk_full` | `false` | disabled; keep the existing hard `max_codes` behavior |
| `max_lists_num` | `0` | disabled; FastScan is bounded only by `nprobe` |
| `max_empty_result_buckets` | `0` | disabled; range search scans all requested probes |

`ensure_topk_full`

For k-NN search, `max_codes` limits how many candidate vectors are scanned. With `ensure_topk_full=false`, the search stops when the budget is reached.

With `ensure_topk_full=true`, very small budgets become less aggressive: `max_codes` is treated as at least `k` post-filter scans. This helps when `max_codes < k`, or when an `IDSelector` filters out many candidates before a distance is computed.

In the generic IVF path this is supported for `parallel_mode` 0 and 3. In FastScan k-NN it is supported by the per-query implementations 10 and 11.

`max_lists_num`

FastScan k-NN can also stop after visiting a limited number of inverted lists. `0` means disabled. With `ensure_topk_full`, this list budget is treated as at least `k` lists. This is only used by the FastScan per-query path (`search_implem_10`, also used for implementation 11).

When FastScan is left on `implem = 0`, setting an early-stop k-NN option makes the dispatcher choose the per-query implementation automatically. If an incompatible FastScan implementation is selected explicitly, Faiss throws instead of ignoring the option.

`max_empty_result_buckets`

This is for range search. It stops probing a query after that many consecutive probed lists add no in-radius results. The counter resets as soon as a list adds at least one result.

`0` means disabled. Setting this trades recall for less work: once nearby buckets repeatedly produce no hits, farther buckets are less likely to help.

The generic IVF range path supports this in `parallel_mode == 0`. FastScan range search also supports it through implementation 10. With `implem = 0`, FastScan selects implementation 10 automatically when this option is set; explicit incompatible implementations throw.

## Selector-aware scan accounting

This PR adds `InvertedListScannerStats`, returned by inverted-list scanner methods. It currently reports:

- `scan_cnt`: number of distances actually computed,
- `nheap_updates`: number of result updates.

The important behavior change is that `IndexIVFStats::ndis` now uses `scan_cnt`. With an `IDSelector`, candidates rejected by the selector are not counted as computed distances. Without a selector, this matches the previous count because every scanned code reaches distance computation.

This same post-filter count is used by `ensure_topk_full`, so a restrictive selector no longer consumes the search budget with candidates that were never eligible for the result heap.

## FastScan behavior

FastScan k-NN now applies `max_codes`, `max_lists_num`, and `ensure_topk_full` in the per-query implementation. The code keeps separate counters per query, so multi-query batches have independent budgets.

For `max_codes`, FastScan uses the result handler's scanned-row count. This means filtered-out rows do not consume the code budget.

FastScan range search rejects k-NN-only options (`max_codes`, `max_lists_num`, and `ensure_topk_full`). It accepts `max_empty_result_buckets` when the selected implementation can preserve per-query probe order.

## API exposure

The new fields are exposed through:

- C++ `SearchParametersIVF`,
- Python bindings,
- the C API.

The statistics is tracked via `InvertedListScanner::scan_codes(..., ResultHandler& handler)` call. In order to make it work inside `IndexIVF::search()`, it has been decided to transition it into this particular override of `InvertedListScanner::scan_codes()`. As a result, non-`ResultHandler` version of `scan_codes()` has been marked as non-virtual, so the custom `InvertedListScanner` implementations should override `ResultHandler`-based versions only. Another consequence is that `IndexIVFPQFastScanScanner` and `IndexIVFRaBitQFastScanScanner` accept only `HeapResultHandler` types of `ResultHandler`. These are the compromises that had to be made.

## Tests

The tests cover:

- default parameters preserving baseline k-NN and range-search results,
- `ensure_topk_full` filling more result slots under tight budgets,
- selector-aware `IndexIVFStats::ndis`,
- range-search early exit and counter reset behavior,
- unsupported parallel modes and FastScan implementations,
- FastScan k-NN and range-search early-stop behavior,
- Python and C API field exposure.

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

Reviewed By: limqiying

Differential Revision: D103044128

Pulled By: mnorris11

fbshipit-source-id: 80f1241c13ffc8173a3da0f2974fa9b6dd318890
2026-05-01 12:23:05 -07:00
mulugetam 91843bdbd3 Use explicit ISA flags instead of -march/-mtune=sapphirerapids (#5034)
Summary:
In GCC, `-mtune=sapphirerapids` sets prefer-vector-width to 256 via `X86_TUNE_AVX256_OPTIMAL`. In LLVM, the same default is set via the prefer-256-bit subtarget feature. This was originally added to avoid AVX-512 frequency throttling on Skylake-SP, but the penalty is negligible since Sapphire Rapids. Switching to explicit ISA flags allows the auto-vectorizer to use zmm registers. I don't see any performance regression. Below is an example.

```cpp
// bench_ip.cpp

#include <benchmark/benchmark.h>
#include <vector>
#include <random>
#include <thread>
#include <numeric>
#include <cstdlib>

_Pragma("GCC push_options") \
_Pragma("GCC optimize (\"unroll-loops,associative-math,no-signed-zeros\")")
static float inner_product(const float *a, const float *b, int n) {
    float sum = 0.0f;
    for (int i = 0; i < n; i++) {
        sum += a[i] * b[i];
    }
    return sum;
}
_Pragma("GCC pop_options")

static void BM_InnerProduct(benchmark::State &state) {
    const int n = state.range(0);

    std::mt19937 rng(42 + state.thread_index());
    std::uniform_real_distribution<float> dist(-1.0f, 1.0f);

    std::vector<float> a(n), b(n);
    for (int i = 0; i < n; i++) {
        a[i] = dist(rng);
        b[i] = dist(rng);
    }

    for (auto _ : state) {
        float result = inner_product(a.data(), b.data(), n);
        benchmark::DoNotOptimize(result);
    }

    state.SetItemsProcessed(state.iterations() * n);
    state.SetBytesProcessed(state.iterations() * n * 2 * sizeof(float));
}

int main(int argc, char **argv) {
    int num_threads = 1;

    // Parse --threads=N before passing to benchmark
    for (int i = 1; i < argc; i++) {
        if (std::string(argv[i]).rfind("--threads=", 0) == 0) {
            num_threads = std::atoi(argv[i] + 10);
            // Remove from argv so benchmark doesn't choke
            for (int j = i; j < argc - 1; j++)
                argv[j] = argv[j + 1];
            argc--;
            i--;
        }
    }

    std::vector<int64_t> sizes = {384, 768, 1536};
    for (auto sz : sizes) {
        benchmark::RegisterBenchmark("BM_InnerProduct", BM_InnerProduct)
            ->Arg(sz)
            ->Threads(num_threads)
            ->UseRealTime();
    }

    benchmark::Initialize(&argc, argv);
    benchmark::RunSpecifiedBenchmarks();
    return 0;
}
```

**Current**:
`g++ -O3 -march=sapphirerapids -mtune=sapphirerapids  bench_ip.cpp -lbenchmark -lpthread`

```text
---------------------------------------------------------------------------------------------------
Benchmark                                         Time             CPU   Iterations UserCounters...
---------------------------------------------------------------------------------------------------
BM_InnerProduct/384/real_time/threads:1        20.7 ns         20.6 ns     33860063 bytes_per_second=138.529Gi/s items_per_second=18.5931G/s
BM_InnerProduct/768/real_time/threads:1        43.0 ns         43.0 ns     16293169 bytes_per_second=133.043Gi/s items_per_second=17.8567G/s
BM_InnerProduct/1536/real_time/threads:1       86.5 ns         86.3 ns      7699745 bytes_per_second=132.321Gi/s items_per_second=17.7598G/s

----------------------------------------------------------------------------------------------------
Benchmark                                          Time             CPU   Iterations UserCounters...
----------------------------------------------------------------------------------------------------
BM_InnerProduct/384/real_time/threads:64        31.2 ns         31.1 ns     22750464 bytes_per_second=91.7077Gi/s items_per_second=12.3088G/s
BM_InnerProduct/768/real_time/threads:64        59.3 ns         59.2 ns     10872768 bytes_per_second=96.4611Gi/s items_per_second=12.9468G/s
BM_InnerProduct/1536/real_time/threads:64        130 ns          130 ns      5561152 bytes_per_second=87.9984Gi/s items_per_second=11.8109G/s
```

**This PR**: `g++ -O3 -mavx512f bench_ip.cpp -lbenchmark -lpthread`

```text
---------------------------------------------------------------------------------------------------
Benchmark                                         Time             CPU   Iterations UserCounters...
---------------------------------------------------------------------------------------------------
BM_InnerProduct/384/real_time/threads:1        17.5 ns         17.5 ns     40056065 bytes_per_second=163.685Gi/s items_per_second=21.9695G/s
BM_InnerProduct/768/real_time/threads:1        34.2 ns         34.1 ns     20446203 bytes_per_second=167.326Gi/s items_per_second=22.4582G/s
BM_InnerProduct/1536/real_time/threads:1       72.4 ns         72.3 ns      9451952 bytes_per_second=158.094Gi/s items_per_second=21.219G/s

----------------------------------------------------------------------------------------------------
Benchmark                                          Time             CPU   Iterations UserCounters...
----------------------------------------------------------------------------------------------------
BM_InnerProduct/384/real_time/threads:64        23.4 ns         23.4 ns     27661760 bytes_per_second=122.456Gi/s items_per_second=16.4358G/s
BM_InnerProduct/768/real_time/threads:64        49.1 ns         48.9 ns     13923776 bytes_per_second=116.614Gi/s items_per_second=15.6517G/s
BM_InnerProduct/1536/real_time/threads:64        105 ns          105 ns      6088320 bytes_per_second=108.736Gi/s items_per_second=14.5943G/s
```

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

Test Plan: Verified flag consistency across all three CMake files. Added missing -mavx512vpopcntdq required by hamming_distance/avx512-inl.h and rabitq_avx512.cpp.

Reviewed By: mnorris11

Differential Revision: D99687322

Pulled By: alibeklfc

fbshipit-source-id: 1a27191149f9d0ff9dc392183bbd3c97c9915aa3
2026-04-06 13:40:40 -07:00
Aalekh Patel 5cf2c4203f Expose IndexBinaryFlat to the C API. (#4834)
Summary:
Primarily for the sake of completeness, we could expose an IndexBinaryFlat to the C API.

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

Reviewed By: junjieqi

Differential Revision: D94736003

Pulled By: gtwang01

fbshipit-source-id: 563a0b2b6684bead170ace6df08cc8ddd29c77d5
2026-03-03 06:42:19 -08:00
Gilbert Gilb's f72867d4ab support SearchParameters for IndexBinary (#4761)
Summary:
- Add support ParameterSpace for IndexBinaryHNSW and IndexBinaryIVF
- Add support SearchParameters in search() method for IndexBinaryHNSW and IndexBinaryIVF
- Add support for passing parameters to IndexBinaryHNSW and IndexBinaryIVF from CAPI

fixes https://github.com/facebookresearch/faiss/issues/3503

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

Reviewed By: mdouze

Differential Revision: D91060658

Pulled By: juancarpio27

fbshipit-source-id: f8cd87fc020d410bf2982636d2aa393e6d7e3410
2026-02-04 00:03:15 -08:00
Michael Norris 514b44fca8 OSS changes: Enable ROCm to work with Faiss on BUCK (#4485)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4485

hipify.sh currently generates .hip files into a separate directory called `gpu-rocm`. The swigfaiss.swig file expects them there too. But to use internal hipification, it needs to be generated into the same directory `gpu`. That means swigfaiss.swig has to change `gpu-rocm` to just `gpu`, same directory as .cu files. If swigfaiss.swig changes, then the hipify.sh has to change as well, otherwise OSS CI breaks.

OSS changes
- Requires changing `swigfaiss.swig`, because the internal BUCK approach builds in the same directory as `.cu` files, aka `gpu/`.
- Because it builds in same `gpu/` directory, we need to change the OSS side `hipify.sh`. After this diff, it just builds in `gpu/`. The rocm CI still passes.

Reviewed By: junjieqi

Differential Revision: D79145713

fbshipit-source-id: a83b805c8a7bf286a7e6cff50c8eb2ddd72f518c
2025-08-15 12:06:27 -07:00
Aloxaf Yin faa5c85234 Expose IndexBinaryIVF to C API (#4302)
Summary:
This PR implements the C API for IndexBinaryIVF.

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

Reviewed By: mnorris11

Differential Revision: D73885352

Pulled By: satymish

fbshipit-source-id: a67b37fc7b75dde9e83a367c4352970aadc43119
2025-05-06 19:48:19 -07:00
Kaival Parikh a4401c13d8 Allow using custom index readers and writers (#4180)
Summary:
### Description

- Create custom readers and writers for index IO, which take function pointers as input
- Also expose these from the C_API

This is helpful for FFI use, where calling processes would pass upcall stubs for streamlined IO

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

Reviewed By: gtwang01

Differential Revision: D71208266

Pulled By: mnorris11

fbshipit-source-id: ab82397d4780a2a07c7bfdc52329968377f42af4
2025-04-01 11:05:29 -07:00
Kaival Parikh 13255a8bf0 Publish the C API to Conda (#4186)
Summary:
Addresses https://github.com/facebookresearch/faiss/issues/4181

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

Reviewed By: junjieqi

Differential Revision: D70328657

Pulled By: mnorris11

fbshipit-source-id: a8bda4f3342af557369b625e8ace13e9a1d92d65
2025-03-30 20:11:39 -07:00
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
Ramil Bakhshyiev a757309408 ROCm CMake configuration cleanup (#3716)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3716

Renaming `USE_ROCM` to `FAISS_ENABLE_ROCM` in CMake files, `FAISS_ENABLE_ROCM` in SWIG files, and `USE_AMD_ROCM` in other source files to follow the existing naming convention.

Reviewed By: mnorris11

Differential Revision: D60673731

fbshipit-source-id: 1aaa3f2ff6836830c4eb733ee7f41554f79f9695
2024-08-02 15:07:01 -07:00
iotamudelta b670cb1cc6 ROCm support (#3462)
Summary:
* add hipify at configure time
* ROCm specific code paths behind USE_ROCM guards
* support for wavefront 32 (Navi) and 64 (MI)
* use builtins to match inline PTX
* support C API on ROCm
* support Python API on ROCm

---------

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

Reviewed By: asadoughi

Differential Revision: D60431193

Pulled By: ramilbakhshyiev

fbshipit-source-id: ac82d5ecb38f995c467e100ed583d5178ae489ee
2024-07-31 15:00:10 -07:00
Bhavik Sheth 4cfa63865f add get_version() for c_api. (#3688)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3688
Looks like our previous changes only modified the cpp API. Not the c_api like the request wanted. This attempts to add faiss_get_version to c_api

Reviewed By: ramilbakhshyiev

Differential Revision: D60207739

fbshipit-source-id: 07184aeae92a154bb3f440279595077f002851f3
2024-07-25 23:38:46 -07:00
Carter McClellan e52101689f Summary: Add Binary Index i.o to c_api (#2233)
Summary:
Add Binary Index i.o to c_api

In reference to isse: https://github.com/facebookresearch/faiss/issues/2225

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

Test Plan: Only changes to the C API

Reviewed By: beauby

Differential Revision: D34815076

Pulled By: mdouze

fbshipit-source-id: 70e0bb15ff02044995460c274bd50465b44ccc5b
2022-03-16 03:28:46 -07:00
Alexander Andreev 8a2860c1dc Improve meta indexes (#1982)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1982

Reviewed By: beauby

Differential Revision: D30762188

Pulled By: mdouze

fbshipit-source-id: 55b92f7829a417195a42870940c158373ed98bc1
2021-09-08 10:02:47 -07:00
Alexander Andreev f6d2efd1df Cover more types for C_API (#1917)
Summary:
Exported some global variables and statistics.
Supported downcast for IndexIDMap and IndexIDMap2 from faiss::Index
Fixes https://github.com/facebookresearch/faiss/issues/1863

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

Reviewed By: beauby

Differential Revision: D28834039

Pulled By: mdouze

fbshipit-source-id: c1f7739dcdc23055780ebc665082609641dff861
2021-06-08 15:34:05 -07:00
Patrick Weizhi Xu 1ea134eb83 Remove redundant c_api headers while installing (#1841)
Summary:
This diff is related to
https://github.com/facebookresearch/faiss/issues/1722

File structure with `-DFAISS_ENABLE_GPU=OFF`
```
/usr/local/include/faiss/c_api
├── AutoTune_c.h
├── clone_index_c.h
├── Clustering_c.h
├── error_c.h
├── error_impl.h
├── faiss_c.h
├── impl
│   └── AuxIndexStructures_c.h
├── Index_c.h
├── index_factory_c.h
├── IndexFlat_c.h
├── index_io_c.h
├── IndexIVF_c.h
├── IndexIVFFlat_c.h
├── IndexLSH_c.h
├── IndexPreTransform_c.h
├── IndexScalarQuantizer_c.h
├── IndexShards_c.h
├── macros_impl.h
├── MetaIndexes_c.h
└── VectorTransform_c.h
```

File structure with `-DFAISS_ENABLE_GPU=ON`
```
/usr/local/include/faiss/c_api
├── AutoTune_c.h
├── clone_index_c.h
├── Clustering_c.h
├── error_c.h
├── error_impl.h
├── faiss_c.h
├── gpu
│   ├── DeviceUtils_c.h
│   ├── GpuAutoTune_c.h
│   ├── GpuClonerOptions_c.h
│   ├── GpuIndex_c.h
│   ├── GpuIndicesOptions_c.h
│   ├── GpuResources_c.h
│   ├── macros_impl.h
│   └── StandardGpuResources_c.h
├── impl
│   └── AuxIndexStructures_c.h
├── Index_c.h
├── index_factory_c.h
├── IndexFlat_c.h
├── index_io_c.h
├── IndexIVF_c.h
├── IndexIVFFlat_c.h
├── IndexLSH_c.h
├── IndexPreTransform_c.h
├── IndexScalarQuantizer_c.h
├── IndexShards_c.h
├── macros_impl.h
├── MetaIndexes_c.h
└── VectorTransform_c.h
```

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

Reviewed By: mdouze

Differential Revision: D27992822

Pulled By: beauby

fbshipit-source-id: 63fa9a39c77502d138453cb4b04c50652e732196
2021-04-26 02:20:23 -07:00
Alexander Andreev d640c6fcda Impl IndexPreTransform for c_api (#1816)
Summary:
This PR extends c_api for IndexPreTransform

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

Reviewed By: beauby

Differential Revision: D27904597

Pulled By: mdouze

fbshipit-source-id: b54dfffcc97879fdf66f9a8a26e9b7840a2e97f2
2021-04-22 05:27:36 -07:00
Alexander Andreev 1ddb517bbd Add IndexScalarQuantizer for c_api (#1802)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1802

Reviewed By: beauby

Differential Revision: D27706399

Pulled By: mdouze

fbshipit-source-id: 61ac99f61e9e44b2fca8e3de45357ee4c0a0b9d7
2021-04-15 23:04:49 -07:00
Prabhat Roy f2f014de50 Added C API(GPU) to CMake and CircleCI (#1700)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1700

Reviewed By: mdouze

Differential Revision: D26814446

Pulled By: beauby

fbshipit-source-id: 654e0297be929afd42bcfbaf790c5d87f04f5193
2021-03-04 05:04:00 -08:00
Prabhat Roy 7a289d5418 Added C API to CMake and CircleCI (#1678)
Summary:
This supersedes https://github.com/facebookresearch/faiss/issues/1390 and https://github.com/facebookresearch/faiss/issues/1141.

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

Reviewed By: mdouze

Differential Revision: D26428986

Pulled By: beauby

fbshipit-source-id: 1e2718f457c1aca18c19edc2436d6baf9b627a60
2021-02-15 12:41:31 -08:00