94 Commits

Author SHA1 Message Date
Michael Norris
20c7ca35bb Upgrade openblas to 0.3.29 for ARM architectures (#4203)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4203

Related to issue: https://github.com/facebookresearch/faiss/issues/4202

Reviewed By: mengdilin

Differential Revision: D69933126

fbshipit-source-id: cafc5f34d0f91450c5067827756b1297684b0ce3
2025-02-21 17:46:25 -08:00
Michael Norris
d72d0cab6b Fix nightly by installing earlier version of lief (#4198)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4198

1. pins lief due to `AttributeError: type object 'CLASS' has no attribute 'CLASS64'` (just set it to last passing nightly version)
2. pins mkl in gpu builds due to it trying to pull in 2024.2.2 which conflicts with 2023 in the libfaiss.

Added nightlies to make sure they pass https://github.com/facebookresearch/faiss/actions/runs/13422430425/job/37498020894. Not all passed: I'm not sure the `build-pull-request / Linux x86_64 GPU w/ cuVS nightlies (CUDA 12.4.0)` nightly is actually broken, but this unblocks the PR builds for now.

Reviewed By: junjieqi

Differential Revision: D69860604

fbshipit-source-id: 2da623c71b03c22d581b78655253a863fbafd3ed
2025-02-19 21:44:03 -08:00
George Wang
f0e3832986 Check for not completed
Summary:
Check for not completed rather than just in_progress, as runs can be queued, waiting, etc.
Fix due to failed nightly not retrying because retry build found it was "queued" instead of "in_progress"

Failed nightly: https://github.com/facebookresearch/faiss/actions/runs/13301645334/attempts/1
Retry that didn't trigger: https://github.com/facebookresearch/faiss/actions/runs/13301647044/job/37144032841

Reviewed By: mengdilin

Differential Revision: D69610422

fbshipit-source-id: a7a9b998bba160e8d1ba13c7ae2426d99125a7e8
2025-02-13 15:49:45 -08:00
Michael Norris
189a9d4461 Fix build-release workflow (#4162)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4162

https://docs.github.com/en/actions/sharing-automations/reusing-workflows#using-inputs-and-secrets-in-a-reusable-workflow

Seems like we need `secrets` in the workflow and in the caller.

Reviewed By: asadoughi

Differential Revision: D68965899

fbshipit-source-id: 25580471c727d5ae86c4e7dd4c6ea72b388b1acf
2025-01-31 13:52:00 -08:00
Michael Norris
1334d169b9 Correct capitalization of FAISS to Faiss
Summary:
For the release, we want to standardize on Faiss instead of FAISS.

Changed everything except the CHANGELOG.md which I assume should not be changed after it lands.

This doesn't aim to fix any existing lints / errors. Those can be handled at another time.

Reviewed By: junjieqi

Differential Revision: D68842649

fbshipit-source-id: c0b60d5baa0e1f710db3638ffcc6f223fb3408ad
2025-01-29 13:05:05 -08:00
Michael Norris
32beb162f2 Migration off defaults to conda-forge channel (#4126)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4126

Good resource on overriding channels to make sure we aren't using `defaults`:https://stackoverflow.com/questions/67695893/how-do-i-completely-purge-and-disable-the-default-channel-in-anaconda-and-switch

Explanation of changes:
-
- changed to miniforge from miniconda: this ensures we only pull in from conda-defaults when creating the environment
- architecture: ARM64 and aarch64 are the same thing. But there is no miniforge package for ARM64, so we need to make it check for aarch64 instead. However, mac breaks this rule, and does have macOS-arm64! So there is a conditional for mac to use arm64. https://github.com/conda-forge/miniforge/releases/
- action.yml mkl 2022.2.1 change: conda-forge and defaults have completely different dependencies. Defaults required intel-openmp, but now on conda-forge, mkl 2023.1 or higher requires llvm-openmp >=14.0.6, but this is incompatible with the pytorch build <2.5 which requires llvm-openmp<14.0. We would need to upgrade Python to 3.12 first, upgrade Pytorch build, then upgrade this mkl. (The meta.yaml changes are the ones that narrow it to 2022.2.1 during `conda build faiss`.) So, this has just been changed to 2022.2.1.
- mkl now requires _openmp_mutex of type "llvm" instead of "gnu": prior non-cuVS builds all used gnu, because intel-openmp from anaconda defaults channel does not require llvm-openmp. Now we need to remove the gnu one which is automatically pulled in during miniconda setup, and only keep the llvm version of _openmp_mutex.
- liblief: The above changes tried to pull in liblief 0.15. This results in an error like `AttributeError: module 'lief._lief.ELF' has no attribute 'ELF_CLASS'`. When I checked passing PR builds on defaults, they use lief 0.12, so I pinned that one for Python 3.9 3.10 3.11. For Python 3.12, we need lief 0.14 or higher.
- gcc_linux-64 =11.2 for faiss-gpu on cudatoolkit-11.2: GPU builds kept trying to reference 11.2 when 14.2 was installed. I couldn't figure out why, or how to point it to the 14.2 installed on the host. Current nightly builds still reference 11.2, so I gave up and pinned 11.2 to keep it the same. Moving to 14.2 will take some more investigation.
- meta.yaml mkl 2023.0 vs 2023.1 with python versions: 3.9, 3.10, and 3.11 pass with 2023.0, but python 3.12 needs mkl 2023.1 or higher. Otherwise we get:
```
INTEL MKL ERROR: $PREFIX/lib/python3.12/site-packages/faiss/../../.././libmkl_def.so.2: undefined symbol: mkl_sparse_optimize_bsr_trsm_i8.
Intel MKL FATAL ERROR: Cannot load libmkl_def.so.2.
```
so the solution was to put a bunch of conditions in in faiss/meta.yaml.
We should be able to use Jinja macros to reduce duplication but it requires some investigation. It was failing: https://github.com/facebookresearch/faiss/actions/runs/12915187334/job/36016477707?pr=4126  (paste of logs here: P1716887936). This can be a future BE task.
Macro example (the `-` signs remove whitespace lines before and after)
```
{% macro inclmkldevel() %}
{%- if PY_VER == '3.9' or PY_VER == '3.10' or PY_VER == '3.11' -%}
        - mkl-devel =2023.0  # [x86_64]
        - liblief =0.12.3  # [not win]
        - python_abi <3.12
{%- elif PY_VER == '3.12' %}
        - mkl-devel >=2023.2.0  # [x86_64]
        - liblief =0.15.1  # [not win]
        - python_abi =3.12
{% endif -%}
{% endmacro %}
```
The python_abi was required to be pinned inside these conditions because otherwise several builds got this error:
```
File "/Users/runner/miniconda3/lib/python3.12/site-packages/conda_build/utils.py", line 1919, in insert_variant_versions
        matches = [regex.match(pkg) for pkg in reqs]
                   ^^^^^^^^^^^^^^^^
    TypeError: expected string or bytes-like object, got 'list'
```

Unit test notes:
-
- test_gpu_basics.py: GPU residual quantizer: Debugged extensively with Matthijs. The problem is in the C++ -> Python conversion. The C++ side prints the right values, but when getting it back to Python, it is filled with junk data. It is only reproducible on CUDA 11.4.4 after switching channels. It is likely a compiler problem. We discussed, and resolved to create a C++ side unit test (so this diff creates TestGpuResidualQuantizer) to verify the functionality and disable the Python unit test, but leave it in the codebase with a comment. Matthijs made extensive notes in https://docs.google.com/document/d/1MjMdOpPgx-MArdrYJZCaQlRqlrhSj5Y1Z9lTyiab8jc/edit?usp=sharing .
- test_contrib.py: this now hangs forever and times out the runner for Windows on Python 3.12. I have it skipping now.
- test_mem_leak.cpp seems flaky. It sometimes fails, then passes with rerun.

Unfixed issues:
-
- I noticed sometimes downloads will fail with the text like below. It passes on re-run.
```
libgomp-14.2.0-h77fa898_1.conda extraction failed
  Warning: error    libmamba Error when extracting package: Could not chdir info/recipe/parent/patches/0005-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch

  error    libmamba Error when extracting package: Could not chdir info/recipe/parent/patches/0005-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch
  Warning: Found incorrect download: libgomp. Aborting

  Found incorrect download: libgomp. Aborting
  Warning:
```

Green build and tests for both build pull request and nightlies: https://github.com/facebookresearch/faiss/actions/runs/12956402963/job/36148818361

Reviewed By: asadoughi

Differential Revision: D68043874

fbshipit-source-id: b105a1e3e6272763ad9daab7fc6f05a79f01c9e2
2025-01-27 14:49:18 -08:00
George Wang
3c0133f47c Reenable auto retry workflow (#4140)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4140

Auto retry build should have been made more reliable in D68032708, so reenable it.

Reviewed By: mengdilin

Differential Revision: D68636531

fbshipit-source-id: 00fe52bbd2a711d3a74b6febaac9763d384af0bf
2025-01-24 12:30:43 -08:00
gtwang01
b9fe1dcdf7 Disable retry build (#4124)
Summary:
```gh run``` seems to time out every now and then, crashing the retry build. I suspect this because whenever the retry build fails, it lacks any logging that would happen if ```gh run``` finishes.

Changing to use ```gh view``` and sleeping for 10 minutes before viewing again may resolve this issue, as it isn't continuously watching.

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

Test Plan:
https://github.com/gtwang01/faiss/actions/runs/12718383559/job/35456710369

{F1974306037}
{F1974306103}

Also, monitor nightlies to ensure it works properly

Reviewed By: mengdilin

Differential Revision: D68032708

Pulled By: gtwang01

fbshipit-source-id: 02f57239e6203a1d0accc09c48aa7071e553878f
2025-01-13 17:20:26 -08:00
Junjie Qi
ab479a1ca7 enable quiet mode for conda install (#4112)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4112

Reviewed By: gtwang01

Differential Revision: D67662530

Pulled By: junjieqi

fbshipit-source-id: 576198d79e947009025641bfa94b3ad9ea2fe1b4
2024-12-26 21:33:45 -08:00
Tarang Jain
ab8cb9cc20 Link cuVS Docs (#4084)
Summary:
Small updates to the ReadMe files. More detailed description in a follow up PR for the wiki.

Remove the cuvs conda CI checks

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

Reviewed By: mengdilin

Differential Revision: D67602013

Pulled By: mnorris11

fbshipit-source-id: f7c40440d278f00195bcad2dbdd2187325f40662
2024-12-23 10:40:54 -08:00
Mulugeta Mammo
3beb07b198 Add a new architecture mode: 'avx512_spr'. (#4025)
Summary:
This PR adds a new architecture mode to support the new extensions to AVX512, namely [AVX512-FP16](https://networkbuilders.intel.com/solutionslibrary/intel-avx-512-fp16-instruction-set-for-intel-xeon-processor-based-products-technology-guide), which have been available since Intel® Sapphire Rapids.

This PR is a prerequisite for [PR#4020](https://github.com/facebookresearch/faiss/pull/4020) that speeds up hamming distance evaluations.

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

Reviewed By: pankajsingh88

Differential Revision: D67524575

Pulled By: mengdilin

fbshipit-source-id: f3a09943b062d720b241f95aef2f390923ffd779
2024-12-23 08:56:26 -08:00
Tarang Jain
5637bb8896 Upgrade CUVS to 24.12 (#4021)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4021

Reviewed By: mnorris11

Differential Revision: D67482128

Pulled By: asadoughi

fbshipit-source-id: 47a2b870d8be85580ddf82a40b625b4eee4b072e
2024-12-19 20:46:21 -08:00
Amir Sadoughi
0a0af00966 Update action.yml (#4100)
Summary:
Debug CI failures

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

Reviewed By: bshethmeta

Differential Revision: D67409777

Pulled By: asadoughi

fbshipit-source-id: 0e60ee10c7eef796aabc061f089d12b64f5a98ea
2024-12-18 14:34:27 -08:00
Tarang Jain
f5cd7d009f Resolve Packaging Issues (#4044)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4044

Reviewed By: junjieqi, ramilbakhshyiev

Differential Revision: D67034775

Pulled By: asadoughi

fbshipit-source-id: 6e1edbecd0526a01d2deb6d4609b469f0ed6e9fd
2024-12-10 14:57:35 -08:00
Junjie Qi
ddb7e0da2f Change github action workflows name (#4083)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4083

Reviewed By: mnorris11

Differential Revision: D67034455

Pulled By: junjieqi

fbshipit-source-id: 399830c352b8d8097cea91bb8b9193d87b9327a4
2024-12-10 11:37:30 -08:00
Junjie Qi
0d568bc400 separare the github build into two conditions (#4066)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4066

Reviewed By: asadoughi

Differential Revision: D66853917

Pulled By: junjieqi

fbshipit-source-id: 800b2f9f797bf19fa262f04f53e32cc2bef27db8
2024-12-05 19:15:14 -08:00
Junjie Qi
eb49d8cb8d pin arm64 dependency (#4060)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4060

Reviewed By: mnorris11

Differential Revision: D66795223

Pulled By: junjieqi

fbshipit-source-id: 160c6c6cf0377cdb9754fdd76b1571d15f8e284e
2024-12-04 23:55:58 -08:00
Junjie Qi
82f8e6414e add cuda-toolkit for GPU (#4057)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4057

Reviewed By: bshethmeta

Differential Revision: D66790793

Pulled By: junjieqi

fbshipit-source-id: d43073d3c209b556afe95c9f45c62e841bcb7f1a
2024-12-04 21:05:37 -08:00
Junjie Qi
cc5ff1ff0d pin the dependecies version for x86_64 (#4046)
Summary:
Pin dependecy version to get stable CI signal

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

Reviewed By: mnorris11

Differential Revision: D66684832

Pulled By: junjieqi

fbshipit-source-id: 9749d328688034514d6f2315d313fbf8045405ee
2024-12-04 00:13:01 -08:00
Tarang Jain
d1ae64e03c Updates to faiss-gpu-cuvs nightly pkg (#4032)
Summary:
Attempt to resolve existing issues in faiss-gpu-cuvs conda package (changes to conda build github actions).

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

Reviewed By: junjieqi

Differential Revision: D66427909

Pulled By: asadoughi

fbshipit-source-id: f2b61219ed62bf8487974a8c9feecc7d1faa6618
2024-11-24 21:31:00 -08:00
sadoughi
f31f06a492 Constrain conda version for Windows build (#4040)
Summary:
Failure in nightly build due to https://github.com/conda/conda-build/issues/5549: https://github.com/facebookresearch/faiss/actions/runs/11967515834/job/33370335745

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

Reviewed By: mnorris11

Differential Revision: D66402850

Pulled By: asadoughi

fbshipit-source-id: 1601647ded3d30b750c921b4c7eafa1c0a7ad54b
2024-11-22 20:59:47 -08:00
Amir Sadoughi
94b640c66f Pin to numpy<2 (#4033)
Summary:
https://github.com/facebookresearch/faiss/issues/3526 is not addressed yet

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

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

`pytest tests/test_contrib.py`

Reviewed By: junjieqi

Differential Revision: D66140293

Pulled By: asadoughi

fbshipit-source-id: b32e31b7c4f17e4ee309a30296cb28927d78ebd4
2024-11-18 19:11:43 -08:00
Tarang Jain
134922061c Migrate from RAFT to CUVS (#3549)
Summary:
Remove the dependency on `raft::compiled` and modify GPU implementations to use cuVS backend in place of RAFT.

A deeper insight into the dependency:
FAISS gets the ANN algorithm implementations such as IVF-Flat and IVF-PQ from cuVS. RAFT is meant to be a lightweight C++ header-only template library that cuVS relies on for the more fundamental / low-level utilities. Some examples of these are RAFT's device mdarray and mdspan objects; the RAFT resource object (`raft::resource`) that takes care of the stream ordering of device functions; linear algebra functions such as mapping, reduction, BLAS routines etc. A lot of the cuVS functions take the RAFT mdspan objects as arguments (for example `raft::device_matrix_view`). Therefore FAISS relies on both cuVS and RAFT. FAISS gets RAFT headers through cuVS and uses them to create the function arguments that can be consumed by cuVS. Note that we are not explicitly linking FAISS against `raft::raft` or `raft::compiled`. Only the required headers are included and compiled rather than compiling the whole RAFT shared library. This is the reason we still see mentions of `raft` in FAISS.

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

Reviewed By: ramilbakhshyiev

Differential Revision: D62041013

Pulled By: asadoughi

fbshipit-source-id: 7230dcc06cf47baf95873adc1dec2adca4a8f82a
2024-11-14 11:30:16 -08:00
Amir Sadoughi
ecb4b802e9 Update autoclose.yml (#4000)
Summary:
Fix removal of autoclose as the bot already removes the stale label when activity occurs

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

Reviewed By: pankajsingh88

Differential Revision: D65090259

Pulled By: asadoughi

fbshipit-source-id: 27e00363afba604f5e2bf8589cef7923b78a9068
2024-10-29 06:52:29 -07:00
Amir Sadoughi
ebe5a692f8 Update RAFT CI with pytorch 2.4.1 (#3980)
Summary:
Related to testing in https://github.com/facebookresearch/faiss/pull/3974

Based on comparing the logs of two runs:
- failing: https://github.com/facebookresearch/faiss/actions/runs/11409771344/job/31751246207
- passing: https://github.com/facebookresearch/faiss/actions/runs/11368781432/job/31625550227

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

Reviewed By: junjieqi

Differential Revision: D64778154

Pulled By: asadoughi

fbshipit-source-id: f4e53fed3850f3e0f391015c0349ee14da68330a
2024-10-22 13:35:02 -07:00
Amir Sadoughi
e7d153dbf5 Adjust nightly build (#3978)
Summary:
Fixes disk space issue: 75 GB -> 150 GB

https://www.internalfb.com/intern/opensource/ci/github-actions/runners/

S460776

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

Reviewed By: junjieqi

Differential Revision: D64722810

Pulled By: asadoughi

fbshipit-source-id: 0ae0f50e86bb0e8c19caa651a9dc496ebf700256
2024-10-21 19:19:39 -07:00
Michael Pittard
f9a01c65c0 Removing Manual Hipify Build Step (#3962)
Summary:
- Called the hipify script at CMAKE configure time removing the need for the user to run it.
- Now removes any .hip files left over when running the hipify script.
- Cleaned up the hipify script to remove redundancy.

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

Reviewed By: asadoughi, ramilbakhshyiev

Differential Revision: D64495550

Pulled By: mnorris11

fbshipit-source-id: 5547712a4e46fc18cf62346adb0395d0e5626399
2024-10-18 15:42:10 -07:00
Amir Sadoughi
d243e62888 Updated conda CI label from staging to main, INSTALL.md (#3929)
Summary:
* Replaced 1.8.0 to 1.9.0.
* Fixed x86-64 architecture reference: https://en.wikipedia.org/wiki/X86-64

Tested with: `conda install -c pytorch/label/staging faiss-cpu`

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

Reviewed By: ramilbakhshyiev

Differential Revision: D64082430

Pulled By: asadoughi

fbshipit-source-id: 8a1427a7c14b8c3de4a341533b138d9d8f8490f2
2024-10-09 08:26:22 -07:00
mengdilin
c5aed7c359 FIX SVE CI latency regression (#3918)
Summary:
Sometimes between Sept 25 to Oct 2, downloading and linking against `openblas=*=*openmp*` package to run tests have caused a 4-7x slow down. Link it with the regular openblas package which is not compiled with `USE_OPENMP=1`. We will set the openblas omp threads via the environment variable `OPENBLAS_NUM_THREADS` according to https://github.com/OpenMathLib/OpenBLAS/wiki/Faq#multi-threaded

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

Test Plan: SVE CI should finish within 40 minutes

Reviewed By: ramilbakhshyiev

Differential Revision: D64059860

Pulled By: mengdilin

fbshipit-source-id: 3ba2bda5fce5122f051421f459692f15ad5360a4
2024-10-08 16:02:11 -07:00
Amir Sadoughi
092e2cdb3a Fix package upload for main releases (#3910)
Summary:
Similar to .github/workflows/nightly.yml

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

Reviewed By: kuarora, pankajsingh88

Differential Revision: D63923478

Pulled By: asadoughi

fbshipit-source-id: df92a86ba48aa0d19aae40d7ca11aeedf4dfac51
2024-10-07 15:38:20 -07:00
Tarang Jain
ab593745cb Update Pinned RAFT version (#3921)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3921

Reviewed By: pankajsingh88

Differential Revision: D64005877

Pulled By: ramilbakhshyiev

fbshipit-source-id: 663c7ab752db04751c7675095d2545adec4be173
2024-10-07 15:23:41 -07:00
mengdilin
149c1f4b3c Add performance regression tests (#3793)
Summary:
Add `CMakeList` compile `faiss/perf_tests` benchmarks. We will run the google benchmarks as part of CI so people can see benchmarking results (there is no diff-to-diff regression detection in open-sourced CI)

==== Test Plan =====

Sees logs in CI that looks like
```
Run on (4 X 3184.9 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x2)
  L1 Instruction 32 KiB (x2)
  L2 Unified 512 KiB (x2)
  L3 Unified 32768 KiB (x1)
Load Average: 2.69, 2.84, 1.56
----------------------------------------------------------------------------------------------
Benchmark                                    Time             CPU   Iterations UserCounters...
----------------------------------------------------------------------------------------------
QT_4bit/iterations:20                 53646755 ns     53643729 ns           20 code_size=1k
QT_4bit_uniform/iterations:20         52248603 ns     52246874 ns           20 code_size=1k
QT_6bit/iterations:20                 63697930 ns     63693459 ns           20 code_size=1.5k
QT_8bit/iterations:20                 43305175 ns     43303946 ns           20 code_size=2k
QT_8bit_direct/iterations:20          30771920 ns     30770261 ns           20 code_size=2k
QT_8bit_direct_signed/iterations:20   30744625 ns     30742891 ns           20 code_size=2k
QT_8bit_uniform/iterations:20         44227773 ns     44224242 ns           20 code_size=2k
QT_bf16/iterations:20                 32758794 ns     32758717 ns           20 code_size=4k
QT_fp16/iterations:20                 41068848 ns     41066492 ns           20 code_size=4k
2024-09-20T23:15:01+00:00
Running ./build/perf_tests/bench_scalar_quantizer_decode
Run on (4 X 3244.56 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x2)
  L1 Instruction 32 KiB (x2)
  L2 Unified 512 KiB (x2)
  L3 Unified 32768 KiB (x1)
Load Average: 2.43, 2.78, 1.56
----------------------------------------------------------------------------------------------
Benchmark                                    Time             CPU   Iterations UserCounters...
----------------------------------------------------------------------------------------------
QT_4bit/iterations:20                   338300 ns       338284 ns           20 code_size=64
QT_4bit_uniform/iterations:20           332928 ns       332914 ns           20 code_size=64
QT_6bit/iterations:20                   4[1568](https://github.com/facebookresearch/faiss/actions/runs/10966335129/job/30454475438?pr=3878#step:3:1585)3 ns       415674 ns           20 code_size=96
QT_8bit/iterations:20                   266034 ns       266026 ns           20 code_size=128
QT_8bit_direct/iterations:20             37552 ns        37553 ns           20 code_size=128
QT_8bit_direct_signed/iterations:20      39701 ns        39696 ns           20 code_size=128
QT_8bit_uniform/iterations:20           261535 ns       261529 ns           20 code_size=128
QT_bf16/iterations:20                    45518 ns        45506 ns           20 code_size=256
QT_fp16/iterations:20                   334602 ns       334584 ns           20 code_size=256
2024-09-20T23:15:02+00:00
Running ./build/perf_tests/bench_no_multithreading_rcq_search
Run on (4 X 3243.03 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x2)
  L1 Instruction 32 KiB (x2)
  L2 Unified 512 KiB (x2)
  L3 Unified 32768 KiB (x1)
Load Average: 2.43, 2.78, 1.56
WARNING clustering 65536 points to 65536 centroids: please provide at least 2555904 training points
WARNING clustering 65536 points to 65536 centroids: please provide at least 2555904 training points
WARNING clustering 65536 points to 65536 centroids: please provide at least 2555904 training points
WARNING clustering 65536 points to 65536 centroids: please provide at least 2555904 training points
WARNING clustering 65536 points to 65536 centroids: please provide at least 2555904 training points
WARNING clustering 65536 points to 65536 centroids: please provide at least 2555904 training points
WARNING clustering 65536 points to 65536 centroids: please provide at least 2555904 training points
WARNING clustering 65536 points to 65536 centroids: please provide at least 2555904 training points
WARNING clustering 65536 points to 65536 centroids: please provide at least 2555904 training points
WARNING clustering 65536 points to 65536 centroids: please provide at least 2555904 training points
---------------------------------------------------------------
Benchmark                     Time             CPU   Iterations
---------------------------------------------------------------
search/iterations:20   12763792 ns     10367188 ns           20
2024-09-20T23:15:51+00:00
Running ./build/perf_tests/bench_scalar_quantizer_accuracy
Run on (4 X 3231.04 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x2)
  L1 Instruction 32 KiB (x2)
  L2 Unified 512 KiB (x2)
  L3 Unified 32768 KiB (x1)
Load Average: 2.85, 2.84, 1.65
----------------------------------------------------------------------------------------------
Benchmark                                    Time             CPU   Iterations UserCounters...
----------------------------------------------------------------------------------------------
QT_4bit/iterations:20                    0.000 ns        0.000 ns            0 code_size=64 code_size_two=128k ndiff_for_idempotence=0 sql2_recons_error=0.047396
QT_4bit_uniform/iterations:20            0.000 ns        0.000 ns            0 code_size=64 code_size_two=128k ndiff_for_idempotence=0 sql2_recons_error=0.0473931
QT_6bit/iterations:20                    0.000 ns        0.000 ns            0 code_size=96 code_size_two=192k ndiff_for_idempotence=0 sql2_recons_error=2.6899m
QT_8bit/iterations:20                    0.000 ns        0.000 ns            0 code_size=128 code_size_two=256k ndiff_for_idempotence=0 sql2_recons_error=164.317u
QT_8bit_direct/iterations:20             0.000 ns        0.000 ns            0 code_size=128 code_size_two=256k ndiff_for_idempotence=0 sql2_recons_error=42.5514
QT_8bit_direct_signed/iterations:20      0.000 ns        0.000 ns            0 code_size=128 code_size_two=256k ndiff_for_idempotence=0 sql2_recons_error=42.5494
QT_8bit_uniform/iterations:20            0.000 ns        0.000 ns            0 code_size=128 code_size_two=256k ndiff_for_idempotence=0 sql2_recons_error=164.152u
QT_bf16/iterations:20                    0.000 ns        0.000 ns            0 code_size=256 code_size_two=512k ndiff_for_idempotence=0 sql2_recons_error=92.8328u
QT_fp16/iterations:20                    0.000 ns        0.000 ns            0 code_size=256 code_size_two=512k ndiff_for_idempotence=0 sql2_recons_error=1.44838u
2024-09-20T23:15:51+00:00
Running ./build/perf_tests/bench_scalar_quantizer_encode
Run on (4 X 3243.72 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x2)
  L1 Instruction 32 KiB (x2)
  L2 Unified 512 KiB (x2)
  L3 Unified 32768 KiB (x1)
Load Average: 2.85, 2.84, 1.65
----------------------------------------------------------------------------------------------
Benchmark                                    Time             CPU   Iterations UserCounters...
----------------------------------------------------------------------------------------------
QT_4bit/iterations:20                   702046 ns       701319 ns           20 code_size=64
QT_4bit_uniform/iterations:20           595889 ns       595880 ns           20 code_size=64
QT_6bit/iterations:20                  1287503 ns      1287542 ns           20 code_size=96
QT_8bit/iterations:20                   511811 ns       511804 ns           20 code_size=128
QT_8bit_direct/iterations:20            152977 ns       152970 ns           20 code_size=128
QT_8bit_direct_signed/iterations:20     185578 ns       185572 ns           20 code_size=128
QT_8bit_uniform/iterations:20           454412 ns       454408 ns           20 code_size=128
QT_bf16/iterations:20                    51331 ns        51324 ns           20 code_size=256
QT_fp16/iterations:20                   390658 ns       390649 ns           20 code_size=256
```

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

Reviewed By: junjieqi

Differential Revision: D63147599

Pulled By: mengdilin

fbshipit-source-id: 03165b5acb3b0647a69f7db144ab76efda2fee11
2024-09-23 15:58:31 -07:00
Ramil Bakhshyiev
753833c529 Upgrade to ROCm 6.2 (#3839)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3839

This is a prerequisite to fixing issue 3787 and an upgrade to a newer stable version.

Reviewed By: mengdilin

Differential Revision: D62284555

fbshipit-source-id: 946f7757eea36bdddc3f8bb7d8c16168e90fd063
2024-09-06 14:09:10 -07:00
Ramil Bakhshyiev
736cd4d984 Do not unnecessarily install CUDA for ROCm
Summary: ROCm does not require CUDA, this change stops installing it.

Reviewed By: mengdilin

Differential Revision: D62283602

fbshipit-source-id: 8fd0d770c5bd407b0c7bca7e92d754e05b5083da
2024-09-06 10:47:22 -07:00
Ramil Bakhshyiev
18bc38a0e4 Quiet down apt-get on ROCm builds (#3836)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3836

This disables verbose output from apt-get and only outputs on errors to make the build output logs more readable.

Reviewed By: junjieqi

Differential Revision: D62278742

fbshipit-source-id: 524490ffd95fc1283f69797c0da57886e68206a6
2024-09-06 10:42:20 -07:00
mengdilin
5e614503dd Build SVE CI with openblas that was compiled with USE_OPENMP=1 (#3776)
Summary:
I noticed by default, conda install openblas installs `libopenblas-pthreads` on our SVE CI. This can be problematic as described in https://github.com/facebookresearch/faiss/wiki/Troubleshooting#surprising-faiss-openmp-and-openblas-interaction

Updating installation of openblas to be more specific and use the version that works well with openmp.

Sees version `0.3.27-openmp_h1b0c31a_0` for openblas instead of `pthread`

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

Reviewed By: ramilbakhshyiev

Differential Revision: D61856775

Pulled By: mengdilin

fbshipit-source-id: 950bd68ba438d221b39d25b2d6e185bc61512243
2024-09-03 13:01:51 -07:00
Mengdi Lin
ca1ab78ea4 always upload pytest results (#3808)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3808

Previously, we only upload the results when the tests passed. It is useful to also upload results of failing tests for debugging

Reviewed By: ramilbakhshyiev

Differential Revision: D61972433

fbshipit-source-id: 1825e6ebea56279e4d8d8c6480841985c1626674
2024-09-03 10:17:17 -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
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
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
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
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
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
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