1135 Commits

Author SHA1 Message Date
Gergely Szilvasy
e65a910eb4 fix Windows build - signed int OMP for MSVC (#3517)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3517

MSVC doesn't support unsigned int for OMP

Reviewed By: kuarora, junjieqi, ramilbakhshyiev

Differential Revision: D58591594

fbshipit-source-id: ac7d6b37a82f9543be3e0fe418f0f6b439751475
2024-06-14 13:00:05 -07:00
Ramil Bakhshyiev
44d21eedb6 Consolidate build environment configuration steps in cmake builds (#3516)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3516

This diff seeks to simplify the steps that install conda packages and environment configuration into a single step at the start of the cmake build action.

Reviewed By: mnorris11

Differential Revision: D58560454

fbshipit-source-id: ee2c6b36865809f31eb335cfb3c2fffdccaa318d
2024-06-13 22:30:28 -07:00
Gergely Szilvasy
34feae48d4 typo in test_io_no_storage (#3515)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3515

Fix typo `test_io_no_storage`

Reviewed By: kuarora, asadoughi

Differential Revision: D58540190

fbshipit-source-id: b8b9cacd7ea6005c0edb94014de74188450318c1
2024-06-13 13:31:34 -07:00
Ramil Bakhshyiev
d45f78b1e1 Add conda bin to path early in the cmake GitHub action (#3512)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3512

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

GitHub hosted runners some with the build-essentials package pre-installed, self-hosted runners on AWS do not have this package. This made it all steps other than the `all targets` one fall back to the system executables which unintentially worked on GitHub hosted runners but not on the self-hosted ones. This diff fixes it by pulling the line that adds conda bin to path early in the cmake build action.

Reviewed By: asadoughi

Differential Revision: D58513853

fbshipit-source-id: 23e95459e0031c96bd142515db07d1b700d713cf
2024-06-13 08:14:38 -07:00
Gergely Szilvasy
3d32330e3d add use_raft to knn_gpu (torch) (#3509)
Summary:
Add support for `use_raft` in the torch version of `knn_gpu`. The numpy version already has this support, see https://github.com/facebookresearch/faiss/blob/main/faiss/python/gpu_wrappers.py#L59

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

Reviewed By: mlomeli1, junjieqi

Differential Revision: D58489851

Pulled By: algoriddle

fbshipit-source-id: cfad722fefd4809b135b765d0d43587cfd782d0e
2024-06-12 19:19:23 -07:00
Matthijs Douze
f71d5b9aa2 fix spurious include to land the cagra diff (#3502)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3502

include probably added by vscode

Reviewed By: mengdilin

Differential Revision: D58411537

fbshipit-source-id: 3035f690d26decc937fb492c54ffa2f974ee2db8
2024-06-11 08:14:48 -07:00
divyegala
df0dea6c6d Interop between CAGRA and HNSW (#3252)
Summary:
Depends on https://github.com/facebookresearch/faiss/pull/3084

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

Reviewed By: junjieqi

Differential Revision: D57971948

Pulled By: mdouze

fbshipit-source-id: 4371f4d136eeceb59568593f98a6ae9163a768ba
2024-06-11 08:14:48 -07:00
Abhiram Vadlapatla
ec67ac1594 Update .gitignore (#3492)
Summary:
Adding build folder to gitignore, so that they don't show up in the commit tree while building from source

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

Reviewed By: junjieqi

Differential Revision: D58171359

Pulled By: asadoughi

fbshipit-source-id: b0efed348769328a3bdbcc13098dcb84cadb6c4f
2024-06-04 21:59:57 -07:00
Xiao Fu
a900cfa9f1 Add cpp tutorial for index factory refine index construction (#3494)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3494

This tasks focus on the refine index construction tutorial with different index refinement on fp16/sq8 quantization. The python version was added a while ago.

Reviewed By: junjieqi

Differential Revision: D58161983

fbshipit-source-id: 1c598fe612b5dee3952c5f7398e6802e117f141d
2024-06-04 19:44:27 -07:00
Matthijs Douze
bf73e38d10 add skip_storage flag to HNSW (#3487)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3487

Sometimes it is not useful to serialize the storage index along with a HNSW index. This diff adds a flag that supports skipping the storage of the index.

Searchign and adding to the index is not possible until a storage index is added back in.

Reviewed By: junjieqi

Differential Revision: D57911060

fbshipit-source-id: 5a4ceee4a8f53f6f746df59af3942b813a99c14f
2024-05-31 14:48:13 -07:00
Kumar Saurabh Arora
22304340d2 Adding buck target for experiment bench_fw_ivf (#3423)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3423

Adding small fixes to run experiments from fbcode.
1. Added buck target
2. Full import path of faiss bench_fw modules
3. new dataset path to run tests locally as we can't use  an existing directory ./data in fbcode.

Reviewed By: algoriddle, junjieqi

Differential Revision: D57235092

fbshipit-source-id: f78a23199e619b640a19ca37f8b52ff0abdd8298
2024-05-31 14:30:39 -07:00
Kumar Saurabh Arora
0beecb4c85 sys.big_endian to sys.byteorder (#3422)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3422

Found vec_io failing when running some benchmarking.
There is no such field named big_endian in sys. So, reverting it to original field byteorder

Reviewed By: algoriddle

Differential Revision: D56718607

fbshipit-source-id: 553f1d2d6bc967581142a92282e534f3f164e8f9
2024-05-30 09:27:55 -07:00
simshi
6e7d9e040f fix algorithm of spreading vectors over shards (#3374)
Summary:
simple math:
| **input n** | **input nshards** |  shard_size | idx | i0 | ni |
| -- |-- |-- |-- |-- |-- |
| 19 | 6 | 4 | 5 | 20 | **-1** |
| 1000 | 37 | 28 | 36 | 1008 | -8 |
| 1000 | 64 | 16 | 63 | 1008 | -8 |

root cause:
integer cause precision loss, `idx * shard_size` overflows, because `(n + nshards - 1) / nshards` is roundup

my solution:
each shard takes at least  `base_shard_size = n / nshards`, then `remain = n % nshards`, we know `0 <= remain < nshards`, next, assign those remain vectors to first `remain` shards, i.e. first `remain` shards take one more vector each.
```c++
auto i0 = idx * base_shard_size;
if (i0 < remain) {
  // if current idx is one of the first `remain` shards
  i0 += idx;
} else {
  i0 += remain;
}
```
simplify above code: `i0 = idx * base_shard_size + std::min(size_t(idx), n % nshards);`

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

Reviewed By: fxdawnn

Differential Revision: D57867910

Pulled By: junjieqi

fbshipit-source-id: 7e72ea5cd197af4f3446fb7a3fd34ad08901dbb2
2024-05-28 11:47:04 -07:00
Jim Borden
db6ff2e095 Workaround for missing intrinsic on gcc < 9 (#3481)
Summary:
Rebased branch for https://github.com/facebookresearch/faiss/issues/3420

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

Reviewed By: mdouze

Differential Revision: D57830230

Pulled By: junjieqi

fbshipit-source-id: a93fb3cc53f11245faec891a9590b5e849dbf3b9
2024-05-27 17:44:09 -07:00
Xiao Fu
6e423cc649 Add python tutorial on different indexs refinement and respect accuracy measurement (#3480)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3480

This tutorial summarize the methods to construct different indexs for PQFastScan refinement. It shows how the choice can impact on accuracy.

Reviewed By: junjieqi

Differential Revision: D57799598

fbshipit-source-id: a75c52c60a5217366f3361676da8f03f0c4a9feb
2024-05-27 11:55:06 -07:00
Tarang Jain
6580156e96 Delete Raft Handle (#3435)
Summary:
Small Raft related modification to StandardGpuResources:
if the stream for a particular device is modified by a user, delete the Raft handle for that device. On any subsequent call to `getRaftHandle(device)`, a new raft handle with the updated stream will be created.
Closes https://github.com/facebookresearch/faiss/issues/3424

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

Reviewed By: ramilbakhshyiev

Differential Revision: D57640976

Pulled By: junjieqi

fbshipit-source-id: 41e2898a39250b7e52e920b71e819fc21ca9fc85
2024-05-23 15:33:23 -07:00
Alexandr Guzhva
eb284811e0 Remove duplicate NegativeDistanceComputer instances (#3450)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3450

Reviewed By: mdouze

Differential Revision: D57708412

Pulled By: junjieqi

fbshipit-source-id: 9540b7e60d8b2b39e0ca92423d2a305fab2a17e6
2024-05-23 09:19:24 -07:00
Richard Barnes
729a66f004 Remove extra semi colon from deprecated/libmccpp/ThreadSafeClientPool.h (#3479)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3479

`-Wextra-semi` or `-Wextra-semi-stmt`

If the code compiles, this is safe to land.

Reviewed By: palmje

Differential Revision: D57632759

fbshipit-source-id: 48bc23e87b3f518182085124c4c8e68ddbb3ca8f
2024-05-23 07:47:33 -07:00
Ramil Bakhshyiev
eec4cba025 Disable CircleCI builds (#3477)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3477

AVX-512 must remain on CircleCI until GitHub provides runners with AVX-512 support (ETA: Q1 2025).

Reviewed By: algoriddle

Differential Revision: D57707621

fbshipit-source-id: e8a0885f8363cf8f20854cccca3ec0adc946362b
2024-05-23 06:42:48 -07:00
Ramil Bakhshyiev
93bc9b6470 Gate all PR builds behind linux-x86_64-cmake in GitHub Actions (#3476)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3476

The long tail will still be the RAFT build but we can save on cost if the build has errors by incurring ~10m penalty added by waiting for the basic cmake build to complete. Both GPU and RAFT builds will start together so this will take less time overall to complete.

Reviewed By: algoriddle

Differential Revision: D57707298

fbshipit-source-id: 3589842e9bda9ebca9b25e089e6177fe96b6a0f5
2024-05-23 06:42:48 -07:00
Ramil Bakhshyiev
ee7ce21acd Add display names to all PR build jobs on GitHub Actions (#3475)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3475

Migration to GitHub

Reviewed By: algoriddle

Differential Revision: D57707064

fbshipit-source-id: 17f0a97028007f3664faa5b6b2c269f50bcdf39e
2024-05-23 06:42:48 -07:00
Alexandr Guzhva
6a94c67a2f QT_bf16 for scalar quantizer for bfloat16 (#3444)
Summary:
mdouze Please let me know if any additional unit tests are needed

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

Reviewed By: algoriddle

Differential Revision: D57665641

Pulled By: mdouze

fbshipit-source-id: 9bec91306a1c31ea4f1f1d726c9d60ac6415fdfc
2024-05-23 02:59:15 -07:00
Xiao Fu
414fd1e3b7 Add tutorial for FastScan with refinement for cpp (#3474)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3474

This commit focus on the cpp version of PQfastscan tutorial with index refinement by defining the k factor.

Reviewed By: junjieqi

Differential Revision: D57680905

fbshipit-source-id: 980c2990172f24ec9a4f870685e706195883408f
2024-05-22 13:01:37 -07:00
Ramil Bakhshyiev
b39dd4dd57 Fix CUDA 11.4.4 nightly in GitHub Actions (#3473)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3473

Previous diff (D57602154) fixed the CircleCI version and the PR build version of GHA but not the nightly one.

Reviewed By: junjieqi

Differential Revision: D57680576

fbshipit-source-id: 39f49c20df824c915f536b1ed3ffc35db2907988
2024-05-22 11:50:25 -07:00
Ramil Bakhshyiev
f352168c64 Fix cron schedule for nightlies via GitHub Actions (#3470)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3470

Hour and minute values are swapped, the goal is to run is at 1:10am UTC.

Reviewed By: algoriddle

Differential Revision: D57654059

fbshipit-source-id: 23bcb42e5c95f731cd4713ad4691d0f475ed8ad2
2024-05-22 10:45:41 -07:00
Xiao Fu
7d7fef0b58 Add FastScan refinement tutorial for python (#3469)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3469

Reviewed By: junjieqi

Differential Revision: D57650807

fbshipit-source-id: 5e642a8140455e4a3f1f21afe2f06771462e61f4
2024-05-22 09:30:18 -07:00
Xiao Fu
f38e52c1e2 Add tutorial on PQFastScan for cpp (#3468)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3468

This commit includes the tutorial for PQFastScan in the cpp environment.

Reviewed By: junjieqi

Differential Revision: D57631441

fbshipit-source-id: f5e17eee2a584ebfc9ff63868d741d0da6b3b413
2024-05-21 16:42:15 -07:00
Saarth Deshpande
59e3ee1e30 Missed printing 'D' (#3433)
Summary:
'I' was printed twice and 'D' (distance vector) was not printed. Fixed.

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

Reviewed By: fxdawnn

Differential Revision: D57451544

Pulled By: junjieqi

fbshipit-source-id: fc17b3b467f8b2c4ad7d80b44866456d9146e530
2024-05-21 13:02:25 -07:00
Xiao Fu
4489773fd4 Add tutorial for FastScan (#3465)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3465

This commit include python version of tutorial for FastScan. It includes all the parameters enabled within PQFastScan.

Reviewed By: junjieqi

Differential Revision: D57594044

fbshipit-source-id: cb12679b6fc241a654b9545c5bc7bd0517aa1813
2024-05-21 09:50:41 -07:00
Ramil Bakhshyiev
c1528b55b7 Enable nightly builds via GitHub Actions (#3467)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3467

1. Cron is scheduled to execute at 1:10am UTC. This is per GitHub's recommendation to avoid hotspots. The docs mention that when GH backend gets overloaded, they can drop scheduled jobs which we want to avoid so we scheduled off hour, off midnight.
2. The plan is to let these nightlies run once and, if successful, then disable them in GitHub UI to perform validation. Also disable if things break and need to be fixed of course.

Reviewed By: algoriddle

Differential Revision: D57602833

fbshipit-source-id: 4f4d9abbaa5ed3d1edb024ea4dd3f87aa78dd9b5
2024-05-21 09:07:47 -07:00
Ramil Bakhshyiev
a60a9e56c6 Fix CUDA 11.4.4 builds under CircleCI (#3466)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3466

Flattening Conda include directories breaks CUDA 11.4.4 build on Ubuntu 20 / v5 kernel. This change updates the logic to only flatten includes on Ubuntu 22 / v6 kernel (aka as running on GitHub Actions runners).

Reviewed By: algoriddle

Differential Revision: D57602154

fbshipit-source-id: 00c14ca7c64644b8b86483ac6b4d40c6d8f12372
2024-05-21 09:07:47 -07:00
Ramil Bakhshyiev
0698ac72ef Properly pass the label for conda upload steps (#3464)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3464

Migration to GitHub

Reviewed By: algoriddle

Differential Revision: D57593494

fbshipit-source-id: 726159b553d5544efcdfa064f5a82fd51ed793e9
2024-05-21 09:07:47 -07:00
Ramil Bakhshyiev
8c95c6943b Fix linter warnings in faiss-gpu Conda build script (#3463)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3463

Satisfying linter warnings from a previous change

Reviewed By: junjieqi

Differential Revision: D57581364

fbshipit-source-id: 9e9b7f963a27d2da54d0e85390cce2f9f773c502
2024-05-20 14:30:36 -07:00
Ramil Bakhshyiev
7fc81841a2 Relax version requirements for action steps (#3461)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3461

Migration to GitHub Actions

Reviewed By: junjieqi

Differential Revision: D57545814

fbshipit-source-id: a3d08f8cf516ce26f8f16892eceef9e36bfe9f05
2024-05-20 12:50:08 -07:00
Ramil Bakhshyiev
86bf74dc0c Enable linux-x86_64-GPU-packages-CUDA-11-4-4 build via GitHub Actions (#3460)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3460

Migration to GitHub Actions

Reviewed By: junjieqi

Differential Revision: D57545637

fbshipit-source-id: 8ee970e5642ae9354455d60d84019d4217884d3a
2024-05-20 12:50:08 -07:00
Ramil Bakhshyiev
0c983f361b Workaround for CUDA 11.4.4 build in Conda on Ubuntu 22 / v6 kernel (#3459)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3459

When building with CUDA 11.4.4, CMake does not properly include files under Conda environment. This workaround flattens the include sub-directories in to the include root. It will unblock us for now while we are looking for a fix through CMakeLists files or figure out if it's a CMake bug and it gets fixed.

Reviewed By: junjieqi

Differential Revision: D57545169

fbshipit-source-id: 9cbdd0866e00e899cc889930a59448da55d873c2
2024-05-20 12:50:08 -07:00
Xiao Fu
5e452ed52a Cleaning up more unnecessary print (#3455)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3455

Code quality control by reducing the number of prints

Reviewed By: junjieqi

Differential Revision: D57502194

fbshipit-source-id: a6cd65ed4cc49590ce73d2978d41b640b5259c17
2024-05-17 16:59:36 -07:00
Ramil Bakhshyiev
e822a8c152 GitHub Actions files cleanup (#3454)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3454

Removing commented out lines and adding proper descriptions and comments where appropriate.

Reviewed By: junjieqi

Differential Revision: D57501602

fbshipit-source-id: 0202ff73b7a83158808affba9b98b96dff569457
2024-05-17 12:02:55 -07:00
Xiao Fu
bf8bd6b689 Delete all remaining print (#3452)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3452

Delete all remaining print within the Tests to improve the readability and effectiveness of the codebase.

Reviewed By: junjieqi

Differential Revision: D57466393

fbshipit-source-id: 6ebd66ae2e769894d810d4ba7a5f69fc865b797d
2024-05-16 19:51:07 -07:00
Xiao Fu
4972abd36c Improve testing code step 1 (#3451)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3451

This is a first step to clean up the faiss codebase following T187322081

Reviewed By: junjieqi

Differential Revision: D57448335

fbshipit-source-id: c9760d01479d3352b786bbcf2015251e7a7168d6
2024-05-16 14:22:08 -07:00
Amir Sadoughi
1876925e84 Implement METRIC.NaNEuclidean (#3414)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3414

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

A couple open questions:
- Given L2 was squared, I figured I would leave this one as squared as well?
- Also, wasn't sure if we wanted to return nan when present == 0 or -1?

Reviewed By: mdouze

Differential Revision: D57017608

fbshipit-source-id: ba14458b92c8b055f3bf2a871565175935c8333a
2024-05-15 17:53:30 -07:00
Ramil Bakhshyiev
72571c767d Enable both RAFT package builds and CUDA 12.1.1 GPU package build (#3441)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3441

Migration to GitHub Actions

Reviewed By: junjieqi

Differential Revision: D57372738

fbshipit-source-id: 745b3c3f43c49045f8f5035e2af302ffa30d7755
2024-05-15 13:42:27 -07:00
Mengdi Lin
745bca88e3 stabilize formatting for bench_cppcontrib_sa_decode.cpp (#3443)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3443

Stabilize this file for clang-formatting versions 18.1.3 (VSCode) and 18.1.5 (our Github CI)

Reviewed By: junjieqi

Differential Revision: D57393650

fbshipit-source-id: 15170436bbd03194dbeaac1ef1130e20adc8c23e
2024-05-15 13:39:18 -07:00
Ramil Bakhshyiev
2050a03090 Add cuda-toolkit package dependency to faiss-gpu and faiss-gpu-raft conda build recipes (#3440)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3440

This change is required to unblock the migration to GitHub Actions. `cuda-toolkit` was only specified in the `libfaiss` package and it was not available in `faiss-gpu` or `faiss-gpu-raft`. This currently works on CircleCI because the runner image has CUDA toolkit of the needed version installed on the system and the build logic falls back to that but breaks on GitHub Actions because their runner images do not come with CUDA toolkit pre-installed.

Reviewed By: junjieqi

Differential Revision: D57371597

fbshipit-source-id: 8bededd53e2528f033fac797b296d74b47f9403e
2024-05-15 13:06:00 -07:00
Richard Barnes
b8e4489b98 Remove unused variables in faiss/IndexIVFFastScan.cpp (#3439)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3439

LLVM-15 has a warning `-Wunused-but-set-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused variables can compromise readability or, worse, performance.

This diff either (a) removes an unused variable and, possibly, it's associated code, or (b) qualifies the variable with `[[maybe_unused]]`, mostly in cases where the variable _is_ used, but, eg, in an `assert` statement that isn't present in production code.

 - If you approve of this diff, please use the "Accept & Ship" button :-)

Reviewed By: palmje, junjieqi

Differential Revision: D57344013

fbshipit-source-id: adf410139d2e6ca69a26ccdbff8511c9b7620489
2024-05-15 11:45:48 -07:00
Mengdi Lin
558a7c3fbc interrupt for NNDescent (#3432)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3432

Addresses the issue in https://github.com/facebookresearch/faiss/issues/3173

for `IndexNNDescent`, I see that there is already interrupt implemented for it's [search](https://fburl.com/code/iwn3tqic) API, so I looked into it's `add` API.

For a given dataset nb = 10 mil, iter = 10, K =  32, d = 32 on a CPU only machine reveals that bulk of the cost comes from [nndescent](https://fburl.com/code/5rdb1p5o). For every iteration of `nndescent` takes around ~12 seconds, ~70-80% of the time is spent on `join` method (~10 seconds per iteration) and ~20-30% spent on `update` (~2 second per iteration). Adding the interrupt on the `join` should suffice on quickly terminating the program when users hit ctrl+C (happy to move the interrupt elsewhere if we think otherwise)

Reviewed By: junjieqi, mdouze

Differential Revision: D57300514

fbshipit-source-id: d343e0a292c35027ffdb8cbd0131e945b9881d63
2024-05-15 09:17:10 -07:00
Matthijs Douze
509f4c1320 fix install instructions (#3442)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3442

fix install instruction for GPU + pytorch

Reviewed By: mlomeli1

Differential Revision: D57376959

fbshipit-source-id: 74caff960be7dbf8102e7593ce1485452a18de6e
2024-05-15 06:24:23 -07:00
Alexandr Guzhva
83df64cd7f Get rid of redundant instructions in ScalarQuantizer (#3430)
Summary:
This PR removes unneeded ARM NEON SIMD instructions for ScalarQuantizer.

The removed instructions are completely redundant, and I believe that it is a funky way of converting two `float32x4_t` variables (which hold 4 float values in a single SIMD register) into a single `float32x4x2_t` variable (two SIMD registers packed together).

Clang compiler is capable of eliminating these instructions. The only GCC that can eliminate these unneeded instructions is GCC 14, which was released very recently (Apr-May 2024).

mdouze

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

Reviewed By: mlomeli1

Differential Revision: D57369849

Pulled By: mdouze

fbshipit-source-id: 09d7cf16e113df3eb9ddbfa54d074b58b452ba7f
2024-05-15 01:48:49 -07:00
Ramil Bakhshyiev
4d06d7069f Add disabled linux-x86_64-AVX512-cmake build on GitHub Actions (#3428)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3428

GitHub Actions currently does not support runners with AVX-512  but committed to add this support in early 2025. We will be running these on CircleCI until then. This placeholder build configuration will allow us to enable it with a 1-liner when the hosts are available.

Reviewed By: algoriddle

Differential Revision: D57261783

fbshipit-source-id: 1fb985a0c3dbb11851af63c95bde6494d25d0ac2
2024-05-13 09:54:41 -07:00
Ramil Bakhshyiev
2e04533fe1 Enable linux-x86_64-GPU-cmake build on GitHub Actions (#3427)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3427

Migration to GitHub Actions

Reviewed By: algoriddle

Differential Revision: D57261696

fbshipit-source-id: d7b8c26259fd3de1cf59fc460f6af20185ceacfe
2024-05-13 09:54:41 -07:00