Commit Graph

15 Commits (e153cac41908abea6715b5ee72b9cd7629ad67a1)

Author SHA1 Message Date
Gergely Szilvasy 6951466b43 raft enabled cmake build (#2898)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2898

Reviewed By: mdouze

Differential Revision: D46561295

Pulled By: algoriddle

fbshipit-source-id: b9806c0c52acf82124c3b2e0095b1c1979318dcd
2023-06-13 08:43:18 -07:00
Rico 1eb4f42639 fix c_api link error: undefined reference (#2660)
Summary:
detail error: undefined reference to `faiss_index_cpu_to_gpu_multiple_with_options'

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

Reviewed By: algoriddle

Differential Revision: D42471891

Pulled By: mdouze

fbshipit-source-id: 3316311ee7a3d856a764f1590372393bf51f11c6
2023-01-12 00:19:18 -08:00
Ji Bin 9c7ad74814 Adaptation for compile c_api with CUDA 12 (#2656)
Summary:
Closes https://github.com/facebookresearch/faiss/issues/2655

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

Reviewed By: algoriddle

Differential Revision: D42471852

Pulled By: mdouze

fbshipit-source-id: 72162acc1590e565cdfcbd78510ae757c396e970
2023-01-12 00:15:36 -08: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
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
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
Eduardo Pinho 9503cf0d6a Add GPU device utility functions (#1613)
Summary:
This adds some more functions to the C API, under a new DeviceUtils_c.h module. Resolves https://github.com/facebookresearch/faiss/issues/1414.

- `faiss_get_num_gpus`
- `faiss_gpu_profiler_start`
- `faiss_gpu_profiler_stop`
- `faiss_gpu_sync_all_devices`

The only minor issue right now is that building this requires basing it against an older version of Faiss until the building system is updated to use CMake (https://github.com/facebookresearch/faiss/issues/1390). I have provided a separate branch with the same contribution which is based against a version that works and builds OK: [`imp/c_api/add_gpu_device_utils`](https://github.com/Enet4/faiss/tree/imp/c_api/add_gpu_device_utils)

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

Reviewed By: wickedfoo

Differential Revision: D25942933

Pulled By: mdouze

fbshipit-source-id: 5b73a86b0c1702dfb7b9e56bd741f72495aac2fd
2021-01-19 17:23:12 -08:00
Eduardo Pinho bf593c0fae
[c_api] Fix GPU library build (#1296)
- depend on libfaiss.so instead of libgpufaiss.so
- update include directives in gpu C wrapper impl
- fix implicit call warning in C examples
2020-07-27 17:26:17 +02:00
Eduardo Pinho 828dcea400 [C API] June 2019 update (#869)
* [c_api] use all relevant flags in compilation

* [c_api] Remove redundant IndexIVFFlat declarations

- From IndexIVF_c.h, already declared in IndexIVFFlat_c.h

* [c_api] type changes

- replace `long` with a more suitable type
- provide definitions for `faiss_component_t` and `faiss_distance_t`

* [c_api] Define CFLAGS and CUDACFLAGS
2019-06-24 13:29:38 +02:00
Eduardo Pinho 2bfbead8f1 [C API] Update for compatibility with v1.5 (#858)
* [c_api] Update impl and interface for v1.5

- move IndexShards to dedicated module IndexShards_c.{h|cpp}
- remove getter/setters to unreachable fields
- reimplement faiss_IndexIVF_imbalance_factor (to use invlists)
- minor IndexIVF documentation tweaks
- Remove QueryResult, provide RangeQueryResult

* [c_api] Document FaissErrorCode

* [c_api] Update GPU impl and interface for v1.5

- Remove unavailable method setTempMemoryFraction

* [c_api] Relicense to MIT

In accordance to the rest of the project
2019-06-12 15:46:08 +02:00
Eduardo Pinho 27a4ba0d93 [C API] Multi-GPU functions (#628)
* [c_api] minor tweak on Index_c header imports

* [c_api] Multi GPU constructs

- Add constructor & destructor for `FaissGpuMultipleClonerOptions`
- Add function `faiss_index_cpu_to_gpu_multiple`
- Add function `faiss_index_cpu_to_gpu_multiple_with_options`

* [c_api] fix doc comments in GpuClonerOptions

* [c_api] Improve cpu_to_gpu_multiple prototype

* [c_api] Improve cpu_to_gpu_multiple prototype

* [c_api] Add dtor definition for GpuMultipleClonerOptions
2018-12-23 18:46:07 +01:00
Eduardo Pinho dd6c9ebf2d [c_api] Rearrange lib linking in Makefiles (#490) 2018-06-13 13:40:04 +02:00
Eduardo Pinho fd63f06e97 Make c_api compatible with configure'd makefile (#477) 2018-06-04 11:58:23 +02:00
Eduardo Pinho 433f5c0fa5 [C API] Fix libgpufaiss_c with extended API (#448)
- change libfaiss_c.a libgpufaiss_c.a targets to only include wrapper
impl
- include libfaiss_c.a on c_api `make all`
- build libgpufaiss_c.so with libfaiss_c.a instead of faiss_c .o file list
2018-05-15 10:26:40 +02:00
Eduardo Pinho de0541c365 Add C API (#317)
* Add C API

* Add installation instructions for the C API
2018-02-26 11:23:17 +01:00