1202 Commits

Author SHA1 Message Date
Mengdi Lin
3614cc7d47 avx512 compilation option (#3798)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3798

Alexander left a comment on the previous PR: https://github.com/facebookresearch/faiss/pull/3785#issuecomment-2305864630. The contract for the function seems to be that it will only append a single compilation option, not a list of options. Fixing it to comply with the contract.

Reviewed By: asadoughi, ramilbakhshyiev

Differential Revision: D61803839

fbshipit-source-id: 948a3d636f6dd6b5c4f975d236c19923af2bbd18
2024-08-26 13:40:00 -07:00
Mengdi Lin
4ca67340ea add AMD_ROCM as part of get_compile_options (#3790)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3790

Comment from ramilbakhshyiev https://www.internalfb.com/diff/D61674490?dst_version_fbid=359297527230868&transaction_fbid=8025001410919172

Reviewed By: ramilbakhshyiev

Differential Revision: D61680186

fbshipit-source-id: 2b6d5803e620b36878b669e617253c875562c30f
2024-08-23 11:08:39 -07:00
Ramil Bakhshyiev
58a673d938 Enable most of C++ tests on ROCm (#3786)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3786

ROCm build successfully passes all but 2 GPU tests and we want to enable the passing test on CI while skipping the 2 failing tests to make progress. The 2 failing tests are failing specifically on the hardware type that we use for our runners and the AMD team is actively working on root causing it and providing a fix:
`TestGpuIndexIVFPQ.Query_L2_MMCodeDistance`
`TestGpuIndexIVFPQ.Query_IP_MMCodeDistance`

Reviewed By: asadoughi

Differential Revision: D61688657

fbshipit-source-id: 3fedfcf22a0ccf40ac8aff033e8bc09c4eb0cbd5
2024-08-23 10:58:14 -07:00
Mengdi Lin
6053348b2e fix get_compile_options bug (#3785)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3785

Right now when avx512 is turned on, we will only return AVX2 in options. My understanding is turning on avx512 sets both the macros `__AVX2__` and `__AVX512F__`: https://fburl.com/vgh7jg9p

Reviewed By: asadoughi

Differential Revision: D61674490

fbshipit-source-id: 47292025b4eb5ef5907c4fbb0bbf39259129f6ee
2024-08-23 08:52:53 -07:00
Kumar Saurabh Arora
5c87f132de Add sampling fields to dataset descriptor (#3782)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3782

Fields sampling_column and sampling_rate are added to dataset descriptor for supporting sampling in dataset readers.

Reviewed By: satymish

Differential Revision: D61569067

fbshipit-source-id: e5db9957538b033bbef4b7662154411b9044d1f8
2024-08-22 10:44:55 -07:00
George Wang
a43afd6a62 Specify to retry only on failed jobs (#3772)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3772

It looks like there are many failures on the retry build workflow, but these are mainly due to retry attempts with the --failed flag being unable to rerun workflows that don't have any failed jobs.

Reviewed By: kuarora, junjieqi, ramilbakhshyiev

Differential Revision: D61489426

fbshipit-source-id: 6dcef6ba422634bb333e44a5b12c74c5d3b3df8f
2024-08-20 19:27:53 -07:00
Michael Norris
a10b883584 Move static functions to header file (#3757)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3757

In the telemetry wrapper, we need to wrap read_index to return wrapped index structs. D61049751

This read_index wrapper calls several static functions. These are not callable outside a C++ file. Thus this diff changes them to non static and declares them in the header file. Then the wrapper is able to call them.

Reviewed By: asadoughi

Differential Revision: D61282004

fbshipit-source-id: 2c8b2ded169577aa6eecdf1edc7483b0ef5f0665
2024-08-20 13:43:37 -07:00
Pankaj Singh
f3c05bd21b add reconstruct support to additive quantizers (#3752)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3752

add reconstruct support to additive quantizers.

fixes github issue: 2422

Reviewed By: asadoughi

Differential Revision: D61255049

fbshipit-source-id: 09a0edae7fc24295a686d332e2d052e37372d2c0
2024-08-20 13:06:02 -07:00
Mengdi Lin
6e6685b0fe delete circle CI config (#3732)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3732

AVX512 has been running on GhA for some days without issues. Deleting the CircleCI config. Will press the "deprecate CircleCI button" in 1-2 more weeks. I want to wait a little longer just in case anything goes wrong for AVX512 on GhA.

Reviewed By: junjieqi, ramilbakhshyiev

Differential Revision: D60914370

fbshipit-source-id: 5bb09e81c3f5cd1a58525fe633d07373884207d4
2024-08-20 12:40:58 -07:00
Mengdi Lin
c0b32d2821 fix ARM64 SVE CI due to openblas version bump (#3777)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3777

openblas version is bumped from 0.3.27 -> 0.3.28 in the last 3 days. This caused the below test to fail. Confirmed with algoriddle bumping nprobe is okay to do

Reviewed By: algoriddle

Differential Revision: D61536541

fbshipit-source-id: 1e83f75011517ba7b856520f11526e72a00494a5
2024-08-20 06:25:40 -07:00
Ramil Bakhshyiev
924c24db23 Enable Python tests for ROCm (#3763)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3763

This change enables Python version of tests for ROCm builds.

Reviewed By: asadoughi

Differential Revision: D61366282

fbshipit-source-id: c2fd688db42d63946f1c5ca7d50f0a1c4d4a33cd
2024-08-16 12:01:50 -07:00
Ramil Bakhshyiev
772d86062d Reorder imports in torch_test_contrib_gpu (#3761)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3761

This fixes CUDA errors inside faiss in the test environment. If torch is loaded first (this change) then both torch and faiss see all GPUs available on the machine in the ROCm build. Without this change, torch sees the GPUs and faiss does not. AMD team is looking at finding the root cause but we wanted to fix this for now.

Reviewed By: junjieqi, mnorris11

Differential Revision: D61358018

fbshipit-source-id: ac59be99817ef13d37a1676f615585f44eabaf24
2024-08-15 16:13:41 -07:00
Ramil Bakhshyiev
d40adca9cb Add midding hipStream SWIG typedef to fix ROCm memleak in Python (#3760)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3760

This fixes the memleak and the warning received after running Python tests under ROCm since no destructor was declared and objects would remain allocated.

Reviewed By: gtwang01

Differential Revision: D61357579

fbshipit-source-id: cf73bbd7a7002565a4224c1f0af0aa6ea5edebdb
2024-08-15 16:13:41 -07:00
Alexandr Guzhva
afe9c40f36 introduce options for reducing the overhead for a clustering procedure (#3731)
Summary:
Several changes:
1. Introduce `ClusteringParameters::check_input_data_for_NaNs`, which may suppress checks for NaN values in the input data
2. Introduce `ClusteringParameters::use_faster_subsampling`, which uses a newly added SplitMix64-based rng (`SplitMix64RandomGenerator`) and also may pick duplicate points from the original input dataset.  Surprisingly, `rand_perm()` may involve noticeable non-zero costs for certain scenarios.
3. Negative values for `ClusteringParameters::seed` initialize internal clustering rng with high-resolution clock each time, making clustering procedure to pick different subsamples each time. I've decided not to use `std::random_device` in order to avoid possible negative effects.

Useful for future `ProductResidualQuantizer` improvements.

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

Reviewed By: asadoughi

Differential Revision: D61106105

Pulled By: mnorris11

fbshipit-source-id: 072ab2f5ce4f82f9cf49d678122f65d1c08ce596
2024-08-14 17:10:13 -07:00
Pankaj Singh
b10f001185 minor refactor to avoid else block in IVFPQ reconstruct_from_offset. (#3753)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3753

minor refactor to avoid else block in IVFPQ reconstruct_from_offset. No change in logic.

Reviewed By: asadoughi

Differential Revision: D61255339

fbshipit-source-id: e0a8ac10570391eaf7ed3b35796af8b38d40a23c
2024-08-14 13:59:18 -07:00
Emy Sun
2968ab130f Add hnsw search params for bounded queue option (#3748)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3748

So we can dynamically change it

Reviewed By: asadoughi

Differential Revision: D61029191

fbshipit-source-id: 19a6775c1218762dac7a7805e13efab9bb43cfa5
2024-08-13 15:15:16 -07:00
Kumar Saurabh Arora
80a2462483 Fixing initialization of dictionary in dataclass (#3749)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3749

same as title

Reviewed By: satymish

Differential Revision: D61133788

fbshipit-source-id: 5761e6347365f7701ee0600a9d895b8bd1f0a6b8
2024-08-12 17:49:43 -07:00
Ramil Bakhshyiev
a56ee812a7 Containerize ROCm build and move it to AMD GPU runners (#3747)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3747

This change converts the ROCm build to run inside containers and updates it to run on AMD GPU based runners. Still working with the AMD team to resolve test failures before enabled those.

Differential Revision: D61049115

fbshipit-source-id: 28274e0bde795f99b3d78711beaf9b3ed3c5e66c
2024-08-09 17:17:37 -07:00
Kumar Saurabh Arora
290464f23b Adding embedding column to dataset descriptor (#3736)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3736

Nit - adding embedding column in dataset descriptor
Nit - initializing cached_ds as part of class instead of post_init

Reviewed By: satymish

Differential Revision: D60858496

fbshipit-source-id: 3358d866a0668424cd6895bc7a5c620ff97e72fa
2024-08-09 17:07:36 -07:00
Ramil Bakhshyiev
ac18577482 Install gpg for ROCm builds (#3744)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3744

gpg is needed for ROCm builds but does not come with containerized builds. This change add installation of gpg.

Reviewed By: junjieqi

Differential Revision: D61007840

fbshipit-source-id: 6322112803866dff57637bea290dc032e2bf41ad
2024-08-09 02:04:53 -07:00
Ramil Bakhshyiev
9f9b53b3c7 Use $HOME variable to find Conda binaries instead of hard-coded path (#3743)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3743

This fixes containerized builds that will be needed for ROCm.

Reviewed By: junjieqi

Differential Revision: D61007764

fbshipit-source-id: 11fa8dc3641a85d4c220832bedf0f6d62ae49426
2024-08-09 02:04:53 -07:00
Ramil Bakhshyiev
11c15afa1f Append ROCm flag to compile definitions for Python instead of overwriting (#3742)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3742

Before this change, the CMake line was setting (instead of appending to) compile definitions for Python code which replace the GPU wrappers flag and resulting in Python library compiling with no GPU code which failed ROCm tests.

Reviewed By: junjieqi

Differential Revision: D61007640

fbshipit-source-id: 174aeb0a4abe0607629ddf57c882d19ea2d6c6bf
2024-08-09 02:04:53 -07:00
George Wang
13371c7d7e Auto-retry failed CI builds once (#3740)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3740

Reviewed By: ramilbakhshyiev

Differential Revision: D60992604

fbshipit-source-id: 9edb046356bbcae950c131280ac1822f35bbfe7e
2024-08-08 20:58:19 -07:00
Ramil Bakhshyiev
01317afae0 Add human readable names to PR build steps (#3739)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3739

Reviewed By: mengdilin

Differential Revision: D60978686

fbshipit-source-id: 28a886eaea8f1d2e75f5115fc7035e0b6e555ae0
2024-08-08 14:00:16 -07:00
George Wang
c669357283 Introduce retry-build workflow (#3718)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3718

This workflow needs to be pushed first before it can be called from the build workflow.

Reviewed By: ramilbakhshyiev

Differential Revision: D60697701

fbshipit-source-id: 40cb6b7006dae8293e966cc2cbb0ebda5d606045
2024-08-08 13:43:16 -07:00
Ramil Bakhshyiev
acc3a97e3d Add labels to test-results file and include ROCm flag (#3738)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3738

Reviewed By: gtwang01

Differential Revision: D60977946

fbshipit-source-id: f13bfd909b689300ec765fa15d850ef3701bbf37
2024-08-08 13:02:37 -07:00
Ramil Bakhshyiev
9f79bcfada Move nightly builds to 11pm PT (#3737)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3737

This moves nightly builds away from when most of the team is working to avoid exhausting limited resources like custom hardware / specialized hardware.

Reviewed By: bshethmeta

Differential Revision: D60976671

fbshipit-source-id: 1a8521379654a06a793fda0ae3f3bd1bf6fa8bf6
2024-08-08 12:35:23 -07:00
Amir Sadoughi
90b1da480a Update code comment regarding PQ's search metrics (#3733)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3733

Update code comment in response to Alexandr's inquiry

#3714

Reviewed By: mengdilin

Differential Revision: D60907205

fbshipit-source-id: ae0f2c9208b8bafd4343910a3c539fa40985191d
2024-08-08 08:15:10 -07:00
gtwang01
e5f4647f15 Unpin gxx_linux-64 requirement (#3655)
Summary:
The TestPartitioning.TestPartitioningBigRange test case fails on gcc version 13.2. We can avoid this by requiring gcc version 11.2 where the test case works.

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

Test Plan: Check github workflows and test branches

Reviewed By: ramilbakhshyiev

Differential Revision: D59988036

Pulled By: gtwang01

fbshipit-source-id: ae6d7f7888c9d7a2e59f557e05dbd4f318983668
2024-08-07 16:17:33 -07:00
Ramil Bakhshyiev
85df0e0a8d CMake step to symlink system libraries for RAFT and ROCm (#3725)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3725

This step is necessary for both of the builds with newer gxx_linux package version. ROCm is already using this symlinking and this change expands it to RAFT as well.

Reviewed By: mengdilin

Differential Revision: D60830977

fbshipit-source-id: fe95a6580b3866e17b56d542509405e93a3ff453
2024-08-06 10:22:06 -07:00
Mengdi Lin
0b2328f0eb Turn on blocking build for AVX512 and SVE on GHA (#3717)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3717

they have been running in shadow mode for quite some time now.
 I spot-checked the builds for the past 10 jobs and they all look good. Since `continue-on-error` will always mark a job as "green" even if it fails, I need a way to holistically verify these builds actually work reliably. Turning the builds to blocking to accomplish that.

Reviewed By: ramilbakhshyiev

Differential Revision: D60692521

fbshipit-source-id: 172a6362c672b0376c76559f12852110936756df
2024-08-02 15:11:00 -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
Ramil Bakhshyiev
e59d8c35ea ROCm linter and shellcheck warning cleanup (#3715)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3715

Cleaning up linter and shell warnings after importing the PR. This is done as a follow-up as it's easier to address these in a separate PR since the original PR was authored by an external contributor.

Reviewed By: mengdilin

Differential Revision: D60639835

fbshipit-source-id: eba00a557339873742e1caf43c6be45f4d065333
2024-08-02 12:17:43 -07:00
Ramil Bakhshyiev
4e2aead378 Enable ROCm in build-only mode (#3713)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3713

Enable ROCm in CI

Reviewed By: asadoughi

Differential Revision: D60598458

fbshipit-source-id: f95d9a2b0b894c3f7272d4f1963d9230e1069bf8
2024-08-01 14:47:56 -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
vorj
677e73f19c suppress warning (#3708)
Summary:
suppress below warning:

```
In file included from /path/to/faiss/faiss/utils/extra_distances.h:59,
                 from /path/to/faiss/faiss/IndexFlatCodes.cpp:16:
/path/to/faiss/faiss/utils/extra_distances-inl.h: In function ‘typename Consumer::T faiss::dispatch_VectorDistance(size_t, MetricType, float, Consumer&, Types ...) [with Consumer = {anonymous}::Run_get_distance_computer; Types = {const IndexFlatCodes*}]’:
/path/to/faiss/faiss/utils/extra_distances-inl.h:198:1: warning: control reaches end of non-void function [-Wreturn-type]
  198 | }
      | ^
```

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

Reviewed By: ramilbakhshyiev

Differential Revision: D60528995

Pulled By: mengdilin

fbshipit-source-id: 97a6721f3f59ec59ae6d2e69137b1ecc85d7da12
2024-07-31 14:37:50 -07:00
Charles Coulombe
2883129848 Include libfaiss_python_callbacks.so in python installation. (#2062)
Summary:
Include `libfaiss_python_callbacks.so` in `setup.py`.

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

Reviewed By: kuarora

Differential Revision: D60528532

Pulled By: junjieqi

fbshipit-source-id: e624e297b3efc4dd162230fe0b345242ce91bd4d
2024-07-31 11:11:14 -07:00
generatedunixname2443911735787003
8013fbd705 fbcode//faiss/tests (#3707)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3707

Differential Revision: D60503059

fbshipit-source-id: af5405717e08d78ab11ee8ee431f2b8a00c2aa70
2024-07-31 08:08:46 -07:00
Mengdi Lin
96d0781942 turn on SVE opt mode in CI (#3703)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3703

Now that SVE PR has been merged, we can turn on SVE opt mode in CI

Reviewed By: ramilbakhshyiev

Differential Revision: D60457456

fbshipit-source-id: 053b1f8ac805afba9035095c5df811da05675a81
2024-07-30 14:48:12 -07:00
Ramil Bakhshyiev
28f7d3a153 Merge cmake command in the cmake build action (#3702)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3702

Simplify the cmake command in the cmake build action

Reviewed By: mengdilin

Differential Revision: D60427830

fbshipit-source-id: 0e89068649a61e2df3889de69e4d3fa13de0442f
2024-07-30 10:50:13 -07:00
Ramil Bakhshyiev
fecabc268e Gate ARM SVE build behind base Linux build (#3701)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3701

Gating ARM SVE behind the plain vanilla linux x64 build like all the other builds.

Reviewed By: mengdilin

Differential Revision: D60425535

fbshipit-source-id: f2e082fbaa6ea1e314ffe0e2e7260c8634cab989
2024-07-30 10:50:13 -07:00
vorj
4eeaa42b93 Add sve targets (#2886)
Summary:
related: https://github.com/facebookresearch/faiss/issues/2884

This PR contains below changes:

- Add new optlevel `sve`
    - ARM SVE is _extension_ of ARMv8, so it should be treated similar to AVX2 IMO
- Add targets for ARM SVE, `faiss_sve` and `swigfaiss_sve`
    - These targets will be built when you give `-DFAISS_OPT_LEVEL=sve` at build time
    - Design decision: Don't fix SVE register length.
        - The python package of faiss is "fat binary" (for example, the package for avx2 contains `_swigfaiss_avx2.so` and `_swigfaiss.so`)
        - SVE is scalable instruction set (= doesn't fix vector length), but actually we can specify the vector length at compile time.
            - [with `-msve-vector-length=` option](https://developer.arm.com/documentation/101726/4-0/Coding-for-Scalable-Vector-Extension--SVE-/SVE-Vector-Length-Specific--VLS--programming)
            - When this option is specified, the binary can't work correctly on the CPU which has other vector length rather than specified at compile time
        - When we use fixed vector length, SVE-supported faiss python package will contain 7 shared libraries like `_swigfaiss.so` , `_swigfaiss_sve.so` , `_swigfaiss_sve128.so` , `_swigfaiss_sve256.so` , `_swigfaiss_sve512.so` , `_swigfaiss_sve1024.so` , and `_swigfaiss_sve2048.so` . The package size will be exploded.
        - For these reason, I don't specify the vector length at compile time and `faiss_sve` detects the vector length at run time.
- Add a mechanism of detecting ARM SVE on runtime environment and importing `swigfaiss_sve` dynamically
    - Currently it only supports Linux, but there is no SVE environment with non-Linux OS now, as far as I know

NOTE: I plan to make one more PR about add some SVE implementation after this PR merged. This PR only contains adding sve target.

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

Reviewed By: ramilbakhshyiev

Differential Revision: D60386983

Pulled By: mengdilin

fbshipit-source-id: 7e66162ee53ce88fbfb6636e7bf705b44e6c3282
2024-07-29 15:05:17 -07:00
Matthijs Douze
7178bf8a1d Fix radius search with HSNW and IP (#3698)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3698

Addressed issue

https://github.com/facebookresearch/faiss/issues/3684

I forgot to negate the threshold of the radius search.
This diff adds a test and fixes the issue.

Reviewed By: mengdilin

Differential Revision: D60373054

fbshipit-source-id: 70f3daa8292177a4038846a94aff6221f88077e8
2024-07-29 09:52:52 -07:00
mengdilin
34bbe5e540 Add ARM64 build to build_cmake actions for SVE (#3653)
Summary:
Add instructions to download arm64 specific conda dependencies and cmake command and run it on CI. This should prepare us to turn on CI with SVE optimization

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

Reviewed By: ramilbakhshyiev

Differential Revision: D60043435

Pulled By: mengdilin

fbshipit-source-id: d81bb1c1022681c3da8f98bbf080d5e1d65d6b80
2024-07-26 17:27:39 -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
Amir Sadoughi
6e1f23f354 Moved statements to faiss.ai (#3694)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3694

depends on https://github.com/facebookresearch/faiss/pull/3693

Reviewed By: ramilbakhshyiev

Differential Revision: D60255937

fbshipit-source-id: 9d56812a9d94d8d81ed855aa97232cd400fdeac4
2024-07-25 18:12:23 -07:00
Bhavik Sheth
f2361a4124 Back out "Add warning on adding nbits to LSH index factory" (#3690)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3690

Seems like this may not be necessary because it is the the expected behavior.

See: https://github.com/facebookresearch/faiss/pull/3687#issuecomment-2249397476

Reviewed By: asadoughi

Differential Revision: D60241747

fbshipit-source-id: 7b8780fc4922a58c1975ae1b4343dc87e0eda0e1
2024-07-25 11:38:13 -07:00
Bhavik Sheth
0363934529 Add warning on adding nbits to LSH index factory (#3687)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3687

We will write a warning if nbits is not specified while using index factory with LSH. The warning lets users know we will be using default d as nbits.

Reviewed By: ramilbakhshyiev

Differential Revision: D60187935

fbshipit-source-id: 0fa960eeed615d857add77fa131a4cfa1989809d
2024-07-24 21:16:47 -07:00
Bhavik Sheth
aed7b0e678 First attempt at LSH matching with nbits (#3679)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3679

T195237796 Claims we should be able to incldue nbits in the LSH factory string.

Their example is:

```
index = faiss.index_factory(128, 'LSH16rt')
Returns the following error.
faiss/index_factory.cpp:880: could not parse index string LSHrt_16
```

This is my first attempt at modifying the regex to accept an integer for nbits. Can an expert help me understand what the domain of accepted strings should be so I can modify the regex as necessary?

Reviewed By: ramilbakhshyiev

Differential Revision: D60054776

fbshipit-source-id: e47074eb9986b7c1c702832fc0bf758f60f45290
2024-07-24 10:28:51 -07:00
Bhavik Sheth
8b5895ff79 1720 - expose FAISS version field to c_api (#3635)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3635

Add a util function to return the version in the c api.

Reviewed By: ramilbakhshyiev, fxdawnn

Differential Revision: D59817407

fbshipit-source-id: ca805f8e04f554d0294ba9da8ec6dc7c31e91fe3
2024-07-22 16:01:35 -07:00