Skip to content

Commit 8d33b5c

Browse files
MB-65243: Merge 'facebookresearch/faiss@v1.10.0' into 'blevesearch/faiss@bleve'
* Merging faiss's [v1.10.0](https://github.com/facebookresearch/faiss/releases/tag/v1.10.0) release into bleve branch on fork. * AD: fixed type mismatches for std::vector in unit test over hamming distance: true_ids, ids_gen, ids_ham_knn * Brings in: ``` |\ | * 189a9d4 Michael Norris | Fix build-release workflow (facebookresearch#4162) | * 8581b86 mnorris11 | Increment next release, v1.10.0 (facebookresearch#4148) | * 7856053 Michael Norris | Fix cuVS 12.4.0 nightly failure (facebookresearch#4153) | * 1334d16 Michael Norris | Correct capitalization of FAISS to Faiss | * 9e03ef0 Jesper Stemann Andersen | Added support for building without MKL (facebookresearch#4147) | * dd4cec2 Michael Norris | Fix nightly cuVS 11.8.0 failure (facebookresearch#4149) | * cd797c7 Tarang Jain | Benchmarking Scripts for cuVS Index, more docs updates (facebookresearch#4117) | * 32beb16 Michael Norris | Migration off defaults to conda-forge channel (facebookresearch#4126) | * 3c0133f George Wang | Reenable auto retry workflow (facebookresearch#4140) | * dc8d29a Amir Sadoughi | Update code comment to reflect the range of IF from [1, k] (facebookresearch#4139) | * 3f3d18d Junjie Qi | add test to cover GPU (facebookresearch#4130) | * 905963f Di-Is | Add `ngpu` default argument to `knn_ground_truth` (facebookresearch#4123) | * 4c315a9 Binozo | Windows Arm64 support (facebookresearch#4087) | * 89e93e2 Matthijs Douze | more fast-scan reconstruction (facebookresearch#4128) | * 86fa0db Ali Safaya | Fix IndexIVFFastScan reconstruct_from_offset method (facebookresearch#4095) | * b9fe1dc gtwang01 | Disable retry build (facebookresearch#4124) | * 88676b8 chasingegg | Remove unused(and wrong) io macro (facebookresearch#4122) | * 3d0ac32 Michelle Ma | Expose accumulate_to_mem from faiss interface (facebookresearch#4099) | * 162e6ce Alexandr Guzhva | add range_search() to IndexRefine (facebookresearch#4022) | * 9590ad2 Maria Lomeli | PQ with pytorch (facebookresearch#4116) | * 0cbc2a8 Mulugeta Mammo | Use _mm512_popcnt_epi64 to speedup hamming distance evaluation. (facebookresearch#4020) | * ab479a1 Junjie Qi | enable quiet mode for conda install (facebookresearch#4112) | * 3c8dc41 Satyendra Mishra | Set KnnDescriptor.desc_name in the Benchmarking core framework in FAISS like other descriptors (facebookresearch#4109) | * ab8cb9c Tarang Jain | Link cuVS Docs (facebookresearch#4084) | * 3beb07b Mulugeta Mammo | Add a new architecture mode: 'avx512_spr'. (facebookresearch#4025) | * 3a1ad46 Artem Labazov | Conditionally compile extras like benchmarks and demos (facebookresearch#4094) | * 5637bb8 Tarang Jain | Upgrade CUVS to 24.12 (facebookresearch#4021) | * 0a0af00 Amir Sadoughi | Update action.yml (facebookresearch#4100) | * 3ff8a24 Satyendra Mishra | Test sa_decode methd on IndexIVFFlat (facebookresearch#4098) | * db3409a Satyendra Mishra | Update benchmarking library code to work for IdMap index as well (facebookresearch#4093) | * 66c989a Junjie Qi | Pin Nightlies with testing on PR (facebookresearch#4088) | * bfdda6a Tom Jackson | Exhaustive IVF probing in scalar quantizer tests (facebookresearch#4075) | * 87a760e George Wang | Add testing for utils/hamming.cpp (facebookresearch#4079) | * 5f0a99a Amir Sadoughi | Update __init__.py (facebookresearch#4086) | * f5cd7d0 Tarang Jain | Resolve Packaging Issues (facebookresearch#4044) | * ddb7e0d Junjie Qi | Change github action workflows name (facebookresearch#4083) | * d997ea0 Junjie Qi | fix nightily build (facebookresearch#4080) | * 96bc9c7 Michael Norris | Add more unit tests for index_read and index_write (facebookresearch#4068) | * 90e4c4d George Wang | Fix SCD Table test flakiness (facebookresearch#4069) | * 750381d Michael Norris | Add more unit testing for HNSW [4/n] (facebookresearch#4061) | * b5a5846 Michael Norris | Add more unit testing for HNSW [3/n] (facebookresearch#4059) | * 713f379 Mengdi Lin | improve naming due to codemod (facebookresearch#4072) | * 2483fea Mengdi Lin | improve naming due to codemod (facebookresearch#4071) | * 616c503 Mengdi Lin | improve naming due to codemod (facebookresearch#4067) | * 0f86f33 Mengdi Lin | Improve naming due to codemod (facebookresearch#4070) | * 0d568bc Junjie Qi | separare the github build into two conditions (facebookresearch#4066) | * 9bb6948 Mengdi Lin | Improve naming due to codemod (facebookresearch#4065) | * 0868ffc Michael Norris | Add more unit testing for IndexHNSW [2/n] (facebookresearch#4056) | * 8939f48 Mengdi Lin | Improve naming due to codemod (facebookresearch#4064) | * 661557e Michael Norris | Add more unit testing for IndexHNSW [1/n] (facebookresearch#4054) | * 1af8951 Mengdi Lin | Improve naming due to codemod (facebookresearch#4063) | * 1ac6f37 Junjie Qi | Pin conda build (facebookresearch#4062) | * eb49d8c Junjie Qi | pin arm64 dependency (facebookresearch#4060) | * 82f8e64 Junjie Qi | add cuda-toolkit for GPU (facebookresearch#4057) | * 80a8ff5 George Wang | Unit tests for distances_simd.cpp | * eed3860 Michael Norris | stop dealloc of coarse quantizer when it is deleted (facebookresearch#4045) | * f8ae5f4 Pankaj Singh | remove inconsistent oom exception test (facebookresearch#4052) | * cc5ff1f Junjie Qi | pin the dependecies version for x86_64 (facebookresearch#4046) | * 697b6dd Amir Sadoughi | Fix unused variable compilation error (facebookresearch#4041) | * 37f52dc Michael Pittard | ROCm support for bfloat16 (facebookresearch#4039) | * d1ae64e Tarang Jain | Updates to faiss-gpu-cuvs nightly pkg (facebookresearch#4032) | * f31f06a sadoughi | Constrain conda version for Windows build (facebookresearch#4040) | * eaab46c Jeff Johnson | Faiss GPU: bfloat16 brute-force kNN support (facebookresearch#4018) | * 844e3ce Satyendra Mishra | (1/n) - Preload datasets in manifold so that subsequent stages of training, indexing and search can use those instead of each trainer or indexer downloading data. (facebookresearch#4034) | * 98d335b Shengqi Chen | Some chore fixes (facebookresearch#4010) | * 3c25a68 Junjie Qi | fix linter (facebookresearch#4035) | * 94b640c Amir Sadoughi | Pin to numpy<2 (facebookresearch#4033) | * eb5e734 Nicholas Ormrod | facebook-unused-include-check in fbcode/faiss (facebookresearch#4029) | * 1349220 Tarang Jain | Migrate from RAFT to CUVS (facebookresearch#3549) | * 0fb56d9 Richard Barnes | Remove unused-variable in dumbo/backup/dumbo/service/tests/ChainReplicatorTests.cpp +3 (facebookresearch#4024) | * adb1884 Richard Barnes | Fix shadowed variable in faiss/IndexAdditiveQuantizer.cpp (facebookresearch#4011) | * 1f2b7ce Mengdi Lin | introduce data splits in dataset descriptor (facebookresearch#4012) | * cfd4804 Mengdi Lin | write distributed_kmeans centroids and assignments to hive tables (facebookresearch#4017) | * a11c1db Amir Sadoughi | Added IndexLSH to the demo (facebookresearch#4009) | * 2c961cc Michael Kosten | Add VectorTransform read from filename to the C API (facebookresearch#3970) | * 9766d64 Michael Norris | Add index binary to telemetry (facebookresearch#4001) | * ecb4b80 Amir Sadoughi | Update autoclose.yml (facebookresearch#4000) | * c5fbefe Tom Jackson | Fix reverse_index_factory formatting of ScalarQuantizers (facebookresearch#4003) | * acaa01f Amir Sadoughi | Moved add_sa_codes, sa_code_size to Index, IndexBinary base classes (facebookresearch#3989) | * d657dfb Pankaj Singh | fix merge_flat_ondisk stress run failures (facebookresearch#3999) | * 5539039 Pankaj Singh | add validity check AlignedTableTightAlloc clear method (facebookresearch#3997) | * efa18da Michael Norris | add all wrapped indexes to the index_read | * 1e7ef59 Amir Sadoughi | demo: IndexPQ: separate codes from codebook (facebookresearch#3987) | * 9c3cd77 Michael Norris | Re-add example of how to build, link, and test an external SWIG module"" (facebookresearch#3981) | * ebe5a69 Amir Sadoughi | Update RAFT CI with pytorch 2.4.1 (facebookresearch#3980) | * eff0898 Michael Norris | Enable linting: lint config changes plus arc lint command (facebookresearch#3966) | * e7d153d Amir Sadoughi | Adjust nightly build (facebookresearch#3978) | * da20af4 Michael Norris | fix some more nvidia licenses that get erased (facebookresearch#3977) | * 56a383f Michael Norris | Resolve "duplicate-license-header": Find and replace duplicate license headers (facebookresearch#3967) | * adcde10 Matthijs Douze | Allow to replace graph structure for NSG graphs (facebookresearch#3975) | * fd6d784 Michael Norris | Resolve "incorrect-portions-license" errors: add no license lint to top of GPU files with both licenses (facebookresearch#3965) | * f9a01c6 Michael Pittard | Removing Manual Hipify Build Step (facebookresearch#3962) | * 6617b13 Kyle Edwards | Consolidate set_target_properties() calls in faiss/CMakeLists.txt (facebookresearch#3973) | * 1a799d0 Richard Barnes | Fix shadowed variable in faiss/utils/NeuralNet.cpp (facebookresearch#3952) | * d492753 Richard Barnes | Fix shadowed variable in faiss/impl/simd_result_handlers.h (facebookresearch#3960) | * c93d1fd Richard Barnes | Fix shadowed variable in faiss/impl/HNSW.cpp (facebookresearch#3961) | * 68f66bc Richard Barnes | Fix shadowed variable in faiss/IndexIVFAdditiveQuantizer.cpp (facebookresearch#3958) | * b8ae854 Maria Lomeli | Cache device major version value to avoid multiple calls of getCudaDeviceProperties (facebookresearch#3950) | * 7a51922 Richard Barnes | Fix shadowed variable in faiss/IndexPQ.cpp (facebookresearch#3959) | * cb1a512 Michael Norris | Back out "Add example of how to build, link, and test an external SWIG module" (facebookresearch#3954) | * dce7c09 vorj | Add some SVE implementations (facebookresearch#3933) | * 1ab7e5c Michael Norris | add copyright header (facebookresearch#3948) | * e017c35 vorj | Fix INSTALL.md due to failure of conflict resolving (facebookresearch#3915) | * 4d78137 Alexandr Guzhva | Place a useful cmake function 'link_to_faiss_lib' into a separate file (facebookresearch#3939) | * 3daf48c George Wang | Fix total_rows (facebookresearch#3942) | * 6441b56 George Wang | PQFS into Index trainer (facebookresearch#3941) | * 847cde8 Michael Norris | Add example of how to build, link, and test an external SWIG module (facebookresearch#3922) | * a99dbcd Matthijs Douze | implement ST_norm_from_LUT for the ResidualQuantizer (facebookresearch#3917) | * 07a345c Kumar Saurabh Arora | Add desc_name to dataset descriptor (facebookresearch#3935) | * 61eaf19 Kumar Saurabh Arora | Move train, build and search to their respective operators (facebookresearch#3934) | * d243e62 Amir Sadoughi | Updated conda CI label from staging to main, INSTALL.md (facebookresearch#3929) | * af70c5b George Wang | 3893 - Fix index factory order of idmap and refinement (facebookresearch#3928) | * c5aed7c mengdilin | FIX SVE CI latency regression (facebookresearch#3918) | * 2e6551f Matthijs Douze | Support search_preassigned in torch (facebookresearch#3916) | * be4fc8e Mengdi Lin | fix hnsw unit test in opt mode (facebookresearch#3919) | * 092e2cd Amir Sadoughi | Fix package upload for main releases (facebookresearch#3910) | * ab59374 Tarang Jain | Update Pinned RAFT version (facebookresearch#3921) | * d2692b8 Kumar Saurabh Arora | Small nits and formatting (facebookresearch#3907) | * caa3b34 Amir Sadoughi | Increment next release, v1.9.0 (facebookresearch#3887) | * 0df5d24 Mengdi Lin | clean up hnsw benchmark (facebookresearch#3901) | * 09bffd2 lranon1 | Update INSTALL.md to ensure AVX2 and AV512 support for python package (facebookresearch#3892) | * 1ee7561 Jaap Aarts | Disable the NEON optimisations on gcc <= 8 (facebookresearch#3869) | * d8aec60 Kumar Saurabh Arora | Changing dependency for bench_fw to *_cpu instead of *_gpu (facebookresearch#3889) | * c8d1474 Facebook Community Bot | Re-sync with internal repository (facebookresearch#3885) | * 149c1f4 mengdilin | Add performance regression tests (facebookresearch#3793) | * 0660b23 Michael Norris | Add reverse factory string util, add StringIOReader, add centralized JK (facebookresearch#3879) | * 1f42e81 mengdilin | Fix CI 2.0: Compile SQ for avx512 (facebookresearch#3880) | * 03f1d2a Mengdi Lin | fix open source CI (facebookresearch#3878) | * 4eecd91 Mulugeta Mammo | Add AVX-512 implementation for the distance and scalar quantizer functions. (facebookresearch#3853) | * 838612c Matthijs Douze | torch.distributed kmeans (facebookresearch#3876) | * 6baebe2 Matthijs Douze | begin torch_contrib (facebookresearch#3872) | * 0d7817e Matthijs Douze | rewrite python kmeans without scipy (facebookresearch#3873) | * 4e30901 Alexandr Guzhva | Introduce QuantizerTemplateScaling for SQ (facebookresearch#3870) | * 317bd00 Alexandr Guzhva | FIx a bug for a non-simdlib code of ResidualQuantizer (facebookresearch#3868) | * fa60ae6 Michael Norris | more telemetry classes (facebookresearch#3854) | * 73a41f1 Mengdi Lin | simplify and refactor create_servicelab_experiment utility (facebookresearch#3867) | * 83d0599 Mengdi Lin | RCQ search microbenchmark (facebookresearch#3863) | * b6024e9 Michael Pittard | Adding Documentation for ROCm (facebookresearch#3856) | * 6da9952 Jaap Aarts | Add explicit instanciations of `search_dispatch_implem` (facebookresearch#3860) | * f67f518 Mengdi Lin | add benchmarking for hnsw flat based on efSearch (facebookresearch#3858) | * 8a9e600 Shengqi Chen | Fix several typos in code detected by lintian (facebookresearch#3861) | * dc55e11 Mengdi Lin | add hnsw flat benchmark (facebookresearch#3857) | * d104275 Alexandr Guzhva | Add a dockerfile for development (facebookresearch#3851) | * dbdd63b Mengdi Lin | assign_index should default to null (facebookresearch#3855) | * 52ce3f5 Mengdi Lin | add hnsw unit test for PR 3840 (facebookresearch#3849) | * a166e13 Kumar Saurabh Arora | Adding bucket/path (blobstore) in dataset descriptor (facebookresearch#3848) | * d85fda7 Matthijs Douze | Allow k and M suffixes in IVF indexes (facebookresearch#3812) | * 6fe4640 Kumar Saurabh Arora | Fixing headers as per OSS requirement (facebookresearch#3847) | * 21dfdba Alexandr Guzhva | Fix an incorrectly counted the number of computed distances for HNSW (facebookresearch#3840) | * 3f41161 Ramil Bakhshyiev | Re-enable Query_L2_MMCodeDistance and Query_IP_MMCodeDistance tests for ROCm (facebookresearch#3838) | * 753833c Ramil Bakhshyiev | Upgrade to ROCm 6.2 (facebookresearch#3839) | * 736cd4d Ramil Bakhshyiev | Do not unnecessarily install CUDA for ROCm | * 18bc38a Ramil Bakhshyiev | Quiet down apt-get on ROCm builds (facebookresearch#3836) | * e261725 Alexandr Guzhva | faster hnsw CPU index training (facebookresearch#3822) | * 52cf9af Matthijs Douze | group SWIG tests into one file (facebookresearch#3807) | * 202a204 Kumar Saurabh Arora | Allow search Index without Gt (facebookresearch#3827) | * a4ebcb1 Michael Norris | Add error for overflowing nbits during PQ construction (facebookresearch#3833) | * 1cafc71 Mengdi Lin | remove compile options label from gbench (facebookresearch#3834) | * d296b2c Bhavik Sheth | Prevent reordering of imports by auto formatter to avoid crashes (facebookresearch#3826) | * 501a8be Mengdi Lin | more refactor and add encode/decode steps to benchmark (facebookresearch#3825) | * 4683cc1 Mengdi Lin | create perf_tests directory and onboard all scalar quantizer types to benchmark (facebookresearch#3824) | * 5e61450 mengdilin | Build SVE CI with openblas that was compiled with USE_OPENMP=1 (facebookresearch#3776) | * ca1ab78 Mengdi Lin | always upload pytest results (facebookresearch#3808) | * c418b30 David Tolnay | Fix deprecated use of 0/NULL (facebookresearch#3817) | * 383b5d9 Sergii Dymchenko | Use weights_only for load (facebookresearch#3796) | * 95e0a66 Pankaj Singh | Nightly failure fix - ignore searched vectors with identical distances (facebookresearch#3809) | * 97e6f48 Alexandr Guzhva | Some small improvements. (facebookresearch#3692) | * a5ad714 Ramil Bakhshyiev | Re-order imports in Python tests to avoid crashing (facebookresearch#3806) | * 145e93d Kumar Saurabh Arora | Fix bench_fw_codec | * 4283e5b Alexandr Guzhva | Add standalone Link-Time Optimization option to CMake (facebookresearch#2943) | * 37f6b76 Kumar Saurabh Arora | Adding support for index builder (facebookresearch#3800) | * 084496a Sergii Dymchenko | Fix parameter names in docstrings (facebookresearch#3795) | * 3614cc7 Mengdi Lin | avx512 compilation option (facebookresearch#3798) | * 4ca6734 Mengdi Lin | add AMD_ROCM as part of get_compile_options (facebookresearch#3790) | * 58a673d Ramil Bakhshyiev | Enable most of C++ tests on ROCm (facebookresearch#3786) | * 6053348 Mengdi Lin | fix get_compile_options bug (facebookresearch#3785) | * 5c87f13 Kumar Saurabh Arora | Add sampling fields to dataset descriptor (facebookresearch#3782) | * a43afd6 George Wang | Specify to retry only on failed jobs (facebookresearch#3772) | * a10b883 Michael Norris | Move static functions to header file (facebookresearch#3757) | * f3c05bd Pankaj Singh | add reconstruct support to additive quantizers (facebookresearch#3752) | * 6e6685b Mengdi Lin | delete circle CI config (facebookresearch#3732) | * c0b32d2 Mengdi Lin | fix ARM64 SVE CI due to openblas version bump (facebookresearch#3777) | * 924c24d Ramil Bakhshyiev | Enable Python tests for ROCm (facebookresearch#3763) | * 772d860 Ramil Bakhshyiev | Reorder imports in torch_test_contrib_gpu (facebookresearch#3761) | * d40adca Ramil Bakhshyiev | Add midding hipStream SWIG typedef to fix ROCm memleak in Python (facebookresearch#3760) | * afe9c40 Alexandr Guzhva | introduce options for reducing the overhead for a clustering procedure (facebookresearch#3731) | * b10f001 Pankaj Singh | minor refactor to avoid else block in IVFPQ reconstruct_from_offset. (facebookresearch#3753) | * 2968ab1 Emy Sun | Add hnsw search params for bounded queue option (facebookresearch#3748) | * 80a2462 Kumar Saurabh Arora | Fixing initialization of dictionary in dataclass (facebookresearch#3749) | * a56ee81 Ramil Bakhshyiev | Containerize ROCm build and move it to AMD GPU runners (facebookresearch#3747) | * 290464f Kumar Saurabh Arora | Adding embedding column to dataset descriptor (facebookresearch#3736) | * ac18577 Ramil Bakhshyiev | Install gpg for ROCm builds (facebookresearch#3744) | * 9f9b53b Ramil Bakhshyiev | Use $HOME variable to find Conda binaries instead of hard-coded path (facebookresearch#3743) | * 11c15af Ramil Bakhshyiev | Append ROCm flag to compile definitions for Python instead of overwriting (facebookresearch#3742) | * 13371c7 George Wang | Auto-retry failed CI builds once (facebookresearch#3740) | * 01317af Ramil Bakhshyiev | Add human readable names to PR build steps (facebookresearch#3739) | * c669357 George Wang | Introduce retry-build workflow (facebookresearch#3718) | * acc3a97 Ramil Bakhshyiev | Add labels to test-results file and include ROCm flag (facebookresearch#3738) | * 9f79bcf Ramil Bakhshyiev | Move nightly builds to 11pm PT (facebookresearch#3737) | * 90b1da4 Amir Sadoughi | Update code comment regarding PQ's search metrics (facebookresearch#3733) | * e5f4647 gtwang01 | Unpin gxx_linux-64 requirement (facebookresearch#3655) | * 85df0e0 Ramil Bakhshyiev | CMake step to symlink system libraries for RAFT and ROCm (facebookresearch#3725) | * 0b2328f Mengdi Lin | Turn on blocking build for AVX512 and SVE on GHA (facebookresearch#3717) | * a757309 Ramil Bakhshyiev | ROCm CMake configuration cleanup (facebookresearch#3716) | * e59d8c3 Ramil Bakhshyiev | ROCm linter and shellcheck warning cleanup (facebookresearch#3715) | * 4e2aead Ramil Bakhshyiev | Enable ROCm in build-only mode (facebookresearch#3713) | * b670cb1 iotamudelta | ROCm support (facebookresearch#3462) | * 677e73f vorj | suppress warning (facebookresearch#3708) | * 2883129 Charles Coulombe | Include libfaiss_python_callbacks.so in python installation. (facebookresearch#2062) | * 8013fbd generatedunixname2443911735787003 | fbcode//faiss/tests (facebookresearch#3707) | * 96d0781 Mengdi Lin | turn on SVE opt mode in CI (facebookresearch#3703) | * 28f7d3a Ramil Bakhshyiev | Merge cmake command in the cmake build action (facebookresearch#3702) | * fecabc2 Ramil Bakhshyiev | Gate ARM SVE build behind base Linux build (facebookresearch#3701) | * 4eeaa42 vorj | Add sve targets (facebookresearch#2886) | * 7178bf8 Matthijs Douze | Fix radius search with HSNW and IP (facebookresearch#3698) | * 34bbe5e mengdilin | Add ARM64 build to build_cmake actions for SVE (facebookresearch#3653) | * 4cfa638 Bhavik Sheth | add get_version() for c_api. (facebookresearch#3688) | * 6e1f23f Amir Sadoughi | Moved statements to faiss.ai (facebookresearch#3694) | * f2361a4 Bhavik Sheth | Back out "Add warning on adding nbits to LSH index factory" (facebookresearch#3690) | * 0363934 Bhavik Sheth | Add warning on adding nbits to LSH index factory (facebookresearch#3687) | * aed7b0e Bhavik Sheth | First attempt at LSH matching with nbits (facebookresearch#3679) | * 8b5895f Bhavik Sheth | 1720 - expose FAISS version field to c_api (facebookresearch#3635) | * 749163e mengdilin | Fix CI for AVX512 (facebookresearch#3649) | * dd72e41 Matthijs Douze | QINCo implementation in CPU Faiss (facebookresearch#3608) | * ab109c2 Matthijs Douze | Add search functionality to FlatCodes (facebookresearch#3611) | * 261edde Matthijs Douze | add dispatcher for VectorDistance and ResultHandlers | * 444614b Michael Norris | Set verbosoe before train (facebookresearch#3619) | * 036a7e3 Amir Sadoughi | Rename autoclose to autoclose.yml (facebookresearch#3618) | * e5ab701 Amir Sadoughi | Create autoclose GHA workflow (facebookresearch#3614) | * 3fe0b93 Michael Norris | Fix typo in matrix mult (facebookresearch#3607) | * db251e2 Junjie Qi | Adding missing includes which are necessary for building (facebookresearch#3609) | * f821704 mengdilin | Non-Blocking AVX512 Build on self-hosted github runner (facebookresearch#3602) | * 079fd55 divyegala | Fix seg faults in CAGRA C++ unit tests (facebookresearch#3552) | * 33c0ba5 Naveen Tatikonda | Add SQ8bit signed quantization (facebookresearch#3501) | * da75d03 Kumar Saurabh Arora | Refactor bench_fw to support train, build & search in parallel (facebookresearch#3527) | * 3a7c718 Kumar Saurabh Arora | Adding faiss bench_fw to bento faiss kernel (facebookresearch#3531) | * e758973 Matthijs Douze | Add ABS_INNER_PRODUCT metric (facebookresearch#3524) | * e188eb3 Ramil Bakhshyiev | Bump libraft to 24.06 to unblock nightly RAFT builds (facebookresearch#3522) | * 849557a Ramil Bakhshyiev | Unbreak RAFT conda builds (facebookresearch#3519) | * e65a910 Gergely Szilvasy | fix Windows build - signed int OMP for MSVC (facebookresearch#3517) | * 44d21ee Ramil Bakhshyiev | Consolidate build environment configuration steps in cmake builds (facebookresearch#3516) | * 34feae4 Gergely Szilvasy | typo in test_io_no_storage (facebookresearch#3515) | * d45f78b Ramil Bakhshyiev | Add conda bin to path early in the cmake GitHub action (facebookresearch#3512) | * 3d32330 Gergely Szilvasy | add use_raft to knn_gpu (torch) (facebookresearch#3509) | * f71d5b9 Matthijs Douze | fix spurious include to land the cagra diff (facebookresearch#3502) | * df0dea6 divyegala | Interop between CAGRA and HNSW (facebookresearch#3252) | * ec67ac1 Abhiram Vadlapatla | Update .gitignore (facebookresearch#3492) | * a900cfa Xiao Fu | Add cpp tutorial for index factory refine index construction (facebookresearch#3494) | * bf73e38 Matthijs Douze | add skip_storage flag to HNSW (facebookresearch#3487) | * 2230434 Kumar Saurabh Arora | Adding buck target for experiment bench_fw_ivf (facebookresearch#3423) | * 0beecb4 Kumar Saurabh Arora | sys.big_endian to sys.byteorder (facebookresearch#3422) | * 6e7d9e0 simshi | fix algorithm of spreading vectors over shards (facebookresearch#3374) | * db6ff2e Jim Borden | Workaround for missing intrinsic on gcc < 9 (facebookresearch#3481) | * 6e423cc Xiao Fu | Add python tutorial on different indexs refinement and respect accuracy measurement (facebookresearch#3480) | * 6580156 Tarang Jain | Delete Raft Handle (facebookresearch#3435) | * eb28481 Alexandr Guzhva | Remove duplicate NegativeDistanceComputer instances (facebookresearch#3450) | * 729a66f Richard Barnes | Remove extra semi colon from deprecated/libmccpp/ThreadSafeClientPool.h (facebookresearch#3479) | * eec4cba Ramil Bakhshyiev | Disable CircleCI builds (facebookresearch#3477) | * 93bc9b6 Ramil Bakhshyiev | Gate all PR builds behind linux-x86_64-cmake in GitHub Actions (facebookresearch#3476) | * ee7ce21 Ramil Bakhshyiev | Add display names to all PR build jobs on GitHub Actions (facebookresearch#3475) | * 6a94c67 Alexandr Guzhva | QT_bf16 for scalar quantizer for bfloat16 (facebookresearch#3444) | * 414fd1e Xiao Fu | Add tutorial for FastScan with refinement for cpp (facebookresearch#3474) | * b39dd4d Ramil Bakhshyiev | Fix CUDA 11.4.4 nightly in GitHub Actions (facebookresearch#3473) | * f352168 Ramil Bakhshyiev | Fix cron schedule for nightlies via GitHub Actions (facebookresearch#3470) | * 7d7fef0 Xiao Fu | Add FastScan refinement tutorial for python (facebookresearch#3469) | * f38e52c Xiao Fu | Add tutorial on PQFastScan for cpp (facebookresearch#3468) | * 59e3ee1 Saarth Deshpande | Missed printing 'D' (facebookresearch#3433) | * 4489773 Xiao Fu | Add tutorial for FastScan (facebookresearch#3465) | * c1528b5 Ramil Bakhshyiev | Enable nightly builds via GitHub Actions (facebookresearch#3467) | * a60a9e5 Ramil Bakhshyiev | Fix CUDA 11.4.4 builds under CircleCI (facebookresearch#3466) | * 0698ac7 Ramil Bakhshyiev | Properly pass the label for conda upload steps (facebookresearch#3464) | * 8c95c69 Ramil Bakhshyiev | Fix linter warnings in faiss-gpu Conda build script (facebookresearch#3463) | * 7fc8184 Ramil Bakhshyiev | Relax version requirements for action steps (facebookresearch#3461) | * 86bf74d Ramil Bakhshyiev | Enable linux-x86_64-GPU-packages-CUDA-11-4-4 build via GitHub Actions (facebookresearch#3460) | * 0c983f3 Ramil Bakhshyiev | Workaround for CUDA 11.4.4 build in Conda on Ubuntu 22 / v6 kernel (facebookresearch#3459) | * 5e452ed Xiao Fu | Cleaning up more unnecessary print (facebookresearch#3455) | * e822a8c Ramil Bakhshyiev | GitHub Actions files cleanup (facebookresearch#3454) | * bf8bd6b Xiao Fu | Delete all remaining print (facebookresearch#3452) | * 4972abd Xiao Fu | Improve testing code step 1 (facebookresearch#3451) | * 1876925 Amir Sadoughi | Implement METRIC.NaNEuclidean (facebookresearch#3414) | * 72571c7 Ramil Bakhshyiev | Enable both RAFT package builds and CUDA 12.1.1 GPU package build (facebookresearch#3441) | * 745bca8 Mengdi Lin | stabilize formatting for bench_cppcontrib_sa_decode.cpp (facebookresearch#3443) | * 2050a03 Ramil Bakhshyiev | Add cuda-toolkit package dependency to faiss-gpu and faiss-gpu-raft conda build recipes (facebookresearch#3440) | * b8e4489 Richard Barnes | Remove unused variables in faiss/IndexIVFFastScan.cpp (facebookresearch#3439) | * 558a7c3 Mengdi Lin | interrupt for NNDescent (facebookresearch#3432) | * 509f4c1 Matthijs Douze | fix install instructions (facebookresearch#3442) | * 83df64c Alexandr Guzhva | Get rid of redundant instructions in ScalarQuantizer (facebookresearch#3430) | * 4d06d70 Ramil Bakhshyiev | Add disabled linux-x86_64-AVX512-cmake build on GitHub Actions (facebookresearch#3428) | * 2e04533 Ramil Bakhshyiev | Enable linux-x86_64-GPU-cmake build on GitHub Actions (facebookresearch#3427) | * b487c62 Ramil Bakhshyiev | Update system dependencies to enable CUDA builds on v6 kernel and newer libc (facebookresearch#3426) | * e1e4ad0 Carl Love | PowerPC, improve code generation for function fvec_L2sqr (facebookresearch#3416) | * 34fa2ae Ramil Bakhshyiev | Enable linux-x86_64-GPU-w-RAFT-cmake build via GitHub Actions (facebookresearch#3418) | * b3e3c2d Amir Sadoughi | TimeoutCallback C++ and Python (facebookresearch#3417) | * 0cc0e19 Ramil Bakhshyiev | Enable osx-arm64-packages build via GitHub Actions (facebookresearch#3411) | * 1b1a403 Ramil Bakhshyiev | Change linux-arm64-packages build to use 2-core-ubuntu-arm for better availability (facebookresearch#3410) | * 7b8b981 Ramil Bakhshyiev | Enable packages builds on main for windows, linux-arm64, linux-x86_64 via GitHub Actions (facebookresearch#3409) | * 96b88ac Ramil Bakhshyiev | Enable linux-arm64-conda check via GitHub Actions (facebookresearch#3407) | * 74562b2 Ramil Bakhshyiev | Enable windows-x86_64-conda build via GitHub Actions (facebookresearch#3406) | * 5fd8b81 Ramil Bakhshyiev | Enable linux-x86_64-conda build via GitHub Actions (facebookresearch#3405) | * c92b480 Ramil Bakhshyiev | Add format check | * 3121fc6 Jayjeet Chakraborty | Fix facebookresearch#3379: Add tutorial for HNSW index (facebookresearch#3381) | * 825cbac Ramil Bakhshyiev | Add linux-x86_64-AVX2-cmake build | * 7e1d2b1 Ramil Bakhshyiev | Initial config and linux-x86_64-cmake build job only | * c5599a0 Richard Barnes | Fix deprecated use of 0/NULL in faiss/python/python_callbacks.cpp + 1 | * a233bc9 Matthijs Douze | Demo on how to address mulitple index contents | * 5cbff67 Gergely Szilvasy | fix raft log spew | * bd22c93 Junjie Qi | Fix swig osx (facebookresearch#3357) | * 03750f5 Amir Sadoughi | Fix IndexBinary.assign Python method | * 2379b45 Kumar Saurabh Arora | Few fixes in bench_fw to enable IndexFromCodec (facebookresearch#3383) | * 783e044 Matthijs Douze | support big-endian machines (facebookresearch#3361) | * 67574aa Aditya Vidyadhar Kamath | Fix the endianness issue in AIX while running the benchmark. (facebookresearch#3345) | * b2e91f6 Carl Love | Unroll loop in lookup_2_lanes (facebookresearch#3364) | * 5893ab7 Junjie Qi | remove unused code (facebookresearch#3371) | * 3677ab5 Junjie Qi | Switch clang-format-11 to clang-format-18 (facebookresearch#3372) | * 0169f29 iotamudelta | Update required cmake version to 3.24. (facebookresearch#3305) | * ab2b7f5 Andres Suarez | Apply clang-format 18 | * a35eb0a Richard Barnes | Remove unused variables in faiss/IndexIVF.cpp | * acd06d6 Junjie Qi | Switch sprintf to snprintf (facebookresearch#3363) | * 40e8643 Matthijs Douze | selector parameter for FastScan (facebookresearch#3362) | * 17fbeb8 Alexandr Guzhva | Improve filtering & search parameters propagation (facebookresearch#3304) | * 252ae16 Kumar Saurabh Arora | Support for Remove ids from IVFPQFastScan index (facebookresearch#3354) | * 366a814 Gufan Yin | Revert D55723390: Support for Remove ids from IVFPQFastScan index | * 7657e81 Ramil Bakhshyiev | Change index_cpu_to_gpu to throw for indices not implemented on GPU (facebookresearch#3336) | * f34588a Kumar Saurabh Arora | Support for Remove ids from IVFPQFastScan index (facebookresearch#3349) | * cfc7fe5 Junjie Qi | Implement reconstruct_n for GPU IVFFlat indexes (facebookresearch#3338) | * da9f292 Kumar Saurabh Arora | Support of skip_ids in merge_from_multiple function of OnDiskInvertedLists (facebookresearch#3327) | * c9c86f0 Warmchay | Fix missing overload variable in Rocksdb ivf demo (facebookresearch#3326) | * 77e2e79 Ramil Bakhshyiev | Throw when attempting to move IndexPQ to GPU (facebookresearch#3328) | * 4e6b6f8 Aalekh Patel | Add the ability to clone and read binary indexes to the C API. (facebookresearch#3318) | * d99f07e Alexandr Guzhva | AVX512 for PQFastScan (facebookresearch#3276) | * d685413 Junjie Qi | Fix faiss swig build with version > 4.2.x (facebookresearch#3315) | * 03db694 Chip-Kerchner | Fix problems when using 64-bit integers. (facebookresearch#3322) | * 55dc880 Junjie Qi | Change cmake to build googletest from source (facebookresearch#3319) | * 14b8af6 Junjie Qi | Fix IVFPQFastScan decode function (facebookresearch#3312) | * 0c96b0d Gergely Szilvasy | enable rapidsai-nightly channel for libraft (facebookresearch#3317) | * af5793c Kumar Saurabh Arora | Adding test for IndexBinaryFlat.reconstruct_n() (facebookresearch#3310) | * 798427c Kumar Saurabh Arora | Handling FaissException in few destructors of ResultHandler.h (facebookresearch#3311) | * fa1f39e Matthijs Douze | Fix HNSW stats (facebookresearch#3309) | * b77061f Gergely Szilvasy | move to raft 24.04 (facebookresearch#3302) | * 8274c38 Ramil Bakhshyiev | Remove TypedStorage usage when working with torch_utils (facebookresearch#3301) | * 9c79e3d divyegala | RAFT 24.04 API changes (facebookresearch#3282) | * 5483f21 Yuri Victorovich | Use cmake's find_package to link to GTest (facebookresearch#3278) | * 6f3843e Junjie Qi | Back out "Remove swig version and always rely on the latest version" (facebookresearch#3297) | * 0e06a28 Jason Sylka | Revert D54973709: Remove unused fallthrough | * cf364ec Junjie Qi | Remove unused fallthrough (facebookresearch#3296) | * f7fe62e Junjie Qi | Remove swig version and always rely on the latest version (facebookresearch#3295) | * 7d21c92 Maria | Dim reduction support in OIVFBBS (facebookresearch#3290) | * d5e4c79 Maria | Removed index_shard_and_quantize OIVFBBS (facebookresearch#3291) | * e99ad12 ranjitsastra | AIX compilation fix for io classes (facebookresearch#3275) | * dafdff1 Junjie Qi | Change intall.md to reflect faiss 1.8.0 | * 12b92e9 John Mazanec | Skip HNSWPQ sdc init with new io flag (facebookresearch#3250) ```
2 parents 8eecdb6 + 189a9d4 commit 8d33b5c

File tree

761 files changed

+25783
-8046
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

761 files changed

+25783
-8046
lines changed

.circleci/config.yml

-490
This file was deleted.
+189
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
name: Build cmake
2+
inputs:
3+
opt_level:
4+
description: 'Compile options / optimization level.'
5+
required: false
6+
default: generic
7+
gpu:
8+
description: 'Enable GPU support.'
9+
required: false
10+
default: OFF
11+
cuvs:
12+
description: 'Enable cuVS support.'
13+
required: false
14+
default: OFF
15+
rocm:
16+
description: 'Enable ROCm support.'
17+
required: false
18+
default: OFF
19+
runs:
20+
using: composite
21+
steps:
22+
- name: Setup miniconda
23+
uses: conda-incubator/setup-miniconda@v3
24+
with:
25+
python-version: '3.11'
26+
miniforge-version: latest # ensures conda-forge channel is used.
27+
channels: conda-forge
28+
conda-remove-defaults: 'true'
29+
# Set to aarch64 if we're on arm64 because there's no miniforge ARM64 package, just aarch64.
30+
# They are the same thing, just named differently.
31+
architecture: ${{ runner.arch == 'ARM64' && 'aarch64' || runner.arch }}
32+
- name: Configure build environment
33+
shell: bash
34+
run: |
35+
# initialize Conda
36+
conda config --set solver libmamba
37+
# Ensure starting packages are from conda-forge.
38+
conda list --show-channel-urls
39+
conda update -y -q conda
40+
echo "$CONDA/bin" >> $GITHUB_PATH
41+
42+
conda install -y -q python=3.11 cmake=3.26 make=4.2 swig=4.0 "numpy<2" scipy=1.14 pytest=7.4 gflags=2.2
43+
44+
# install base packages for ARM64
45+
if [ "${{ runner.arch }}" = "ARM64" ]; then
46+
conda install -y -q -c conda-forge openblas=0.3 gxx_linux-aarch64=14.2 sysroot_linux-aarch64=2.17
47+
fi
48+
49+
# install base packages for X86_64
50+
if [ "${{ runner.arch }}" = "X64" ]; then
51+
# TODO: merge this with ARM64
52+
conda install -y -q -c conda-forge gxx_linux-64=14.2 sysroot_linux-64=2.17
53+
conda install -y -q mkl=2022.2.1 mkl-devel=2022.2.1
54+
fi
55+
56+
# no CUDA needed for ROCm so skip this
57+
if [ "${{ inputs.rocm }}" = "ON" ]; then
58+
:
59+
# regular CUDA for GPU builds
60+
elif [ "${{ inputs.gpu }}" = "ON" ] && [ "${{ inputs.cuvs }}" = "OFF" ]; then
61+
conda install -y -q cuda-toolkit=12.4 -c "nvidia/label/cuda-12.4.0"
62+
# and CUDA from cuVS channel for cuVS builds
63+
elif [ "${{ inputs.cuvs }}" = "ON" ]; then
64+
conda install -y -q libcuvs=24.12 'cuda-version>=12.0,<=12.5' cuda-toolkit=12.4.1 gxx_linux-64=12.4 -c rapidsai -c conda-forge
65+
fi
66+
67+
# install test packages
68+
if [ "${{ inputs.rocm }}" = "ON" ]; then
69+
: # skip torch install via conda, we need to install via pip to get
70+
# ROCm-enabled version until it's supported in conda by PyTorch
71+
elif [ "${{ inputs.gpu }}" = "ON" ]; then
72+
conda install -y -q "pytorch<2.5" pytorch-cuda=12.4 -c pytorch -c "nvidia/label/cuda-12.4.0"
73+
else
74+
conda install -y -q "pytorch<2.5" -c pytorch
75+
fi
76+
- name: ROCm - Install dependencies
77+
if: inputs.rocm == 'ON'
78+
shell: bash
79+
run: |
80+
# Update repos and install kmod, wget, gpg
81+
sudo apt-get -qq update >/dev/null
82+
sudo apt-get -qq install -y kmod wget gpg >/dev/null
83+
84+
# Get UBUNTU version name
85+
UBUNTU_VERSION_NAME=`cat /etc/os-release | grep UBUNTU_CODENAME | awk -F= '{print $2}'`
86+
87+
# Set ROCm version
88+
ROCM_VERSION="6.2"
89+
90+
# Download, prepare, and install the package signing key
91+
mkdir --parents --mode=0755 /etc/apt/keyrings
92+
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
93+
94+
# Add rocm repository
95+
wget -qO - http://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
96+
rocm_baseurl="http://repo.radeon.com/rocm/apt/${ROCM_VERSION}"
97+
echo "deb [arch=amd64] ${rocm_baseurl} ${UBUNTU_VERSION_NAME} main" | sudo tee /etc/apt/sources.list.d/rocm.list
98+
sudo apt-get -qq update --allow-insecure-repositories >/dev/null
99+
sudo apt-get -qq install -y --allow-unauthenticated \
100+
"rocm-dev${ROCM_VERSION}" "rocm-utils${ROCM_VERSION}" \
101+
"rocm-libs${ROCM_VERSION}" >/dev/null
102+
103+
# Fake presence of MI200-class accelerators
104+
echo "gfx90a" | sudo tee /opt/rocm/bin/target.lst
105+
106+
# Cleanup
107+
sudo apt-get -qq autoclean >/dev/null
108+
sudo apt-get -qq clean >/dev/null
109+
sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
110+
- name: Symblink system dependencies
111+
if: inputs.rocm == 'ON'
112+
shell: bash
113+
run: |
114+
# symblink system libraries for HIP compiler
115+
sudo ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6
116+
sudo ln -s /lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/libc_nonshared.a
117+
sudo ln -s /usr/lib/x86_64-linux-gnu/libpthread.so.0 /lib64/libpthread.so.0
118+
sudo ln -s $HOME/miniconda3/x86_64-conda-linux-gnu/sysroot/usr/lib64/libpthread_nonshared.a /usr/lib64/libpthread_nonshared.a
119+
- name: Build all targets
120+
shell: bash
121+
run: |
122+
eval "$(conda shell.bash hook)"
123+
conda activate
124+
cmake -B build \
125+
-DBUILD_TESTING=ON \
126+
-DBUILD_SHARED_LIBS=ON \
127+
-DFAISS_ENABLE_GPU=${{ inputs.gpu }} \
128+
-DFAISS_ENABLE_CUVS=${{ inputs.cuvs }} \
129+
-DFAISS_ENABLE_ROCM=${{ inputs.rocm }} \
130+
-DFAISS_OPT_LEVEL=${{ inputs.opt_level }} \
131+
-DFAISS_ENABLE_C_API=ON \
132+
-DPYTHON_EXECUTABLE=$CONDA/bin/python \
133+
-DCMAKE_BUILD_TYPE=Release \
134+
-DBLA_VENDOR=${{ runner.arch == 'X64' && 'Intel10_64_dyn' || '' }} \
135+
-DCMAKE_CUDA_FLAGS=${{ runner.arch == 'X64' && '"-gencode arch=compute_75,code=sm_75"' || '' }} \
136+
.
137+
make -k -C build -j$(nproc)
138+
- name: C++ tests
139+
shell: bash
140+
run: |
141+
export GTEST_OUTPUT="xml:$(realpath .)/test-results/googletest/"
142+
make -C build test
143+
- name: C++ perf benchmarks
144+
shell: bash
145+
if: inputs.rocm == 'OFF'
146+
run: |
147+
find ./build/perf_tests/ -executable -type f -name "bench*" -exec '{}' -v \;
148+
- name: Install Python extension
149+
shell: bash
150+
working-directory: build/faiss/python
151+
run: |
152+
$CONDA/bin/python setup.py install
153+
- name: ROCm - install ROCm-enabled torch via pip
154+
if: inputs.rocm == 'ON'
155+
shell: bash
156+
run: |
157+
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.1
158+
- name: Python tests (CPU only)
159+
if: inputs.gpu == 'OFF'
160+
shell: bash
161+
run: |
162+
pytest --junitxml=test-results/pytest/results.xml tests/test_*.py
163+
pytest --junitxml=test-results/pytest/results-torch.xml tests/torch_*.py
164+
- name: Python tests (CPU + GPU)
165+
if: inputs.gpu == 'ON'
166+
shell: bash
167+
run: |
168+
pytest --junitxml=test-results/pytest/results.xml tests/test_*.py
169+
pytest --junitxml=test-results/pytest/results-torch.xml tests/torch_*.py
170+
cp tests/common_faiss_tests.py faiss/gpu/test
171+
pytest --junitxml=test-results/pytest/results-gpu.xml faiss/gpu/test/test_*.py
172+
pytest --junitxml=test-results/pytest/results-gpu-torch.xml faiss/gpu/test/torch_*.py
173+
- name: Test avx2 loading
174+
if: inputs.opt_level == 'avx2'
175+
shell: bash
176+
run: |
177+
FAISS_DISABLE_CPU_FEATURES=AVX2 LD_DEBUG=libs $CONDA/bin/python -c "import faiss" 2>&1 | grep faiss.so
178+
LD_DEBUG=libs $CONDA/bin/python -c "import faiss" 2>&1 | grep faiss_avx2.so
179+
- name: Upload test results
180+
if: always()
181+
uses: actions/upload-artifact@v4
182+
with:
183+
name: test-results-arch=${{ runner.arch }}-opt=${{ inputs.opt_level }}-gpu=${{ inputs.gpu }}-cuvs=${{ inputs.cuvs }}-rocm=${{ inputs.rocm }}
184+
path: test-results
185+
- name: Check installed packages channel
186+
shell: bash
187+
run: |
188+
# Shows that all installed packages are from conda-forge.
189+
conda list --show-channel-urls
+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Conda build
2+
description: Builds Faiss inside a Conda environment and uploads to repository when label is provided.
3+
inputs:
4+
label:
5+
description: "The label to be used for uploads to Conda."
6+
default: ""
7+
required: false
8+
cuda:
9+
description: "CUDA toolkit version to use."
10+
default: ""
11+
required: false
12+
cuvs:
13+
description: "Enable cuVS support."
14+
default: ""
15+
required: false
16+
runs:
17+
using: composite
18+
steps:
19+
- name: Choose shell
20+
shell: bash
21+
id: choose_shell
22+
run: |
23+
# Use pwsh on Windows; bash everywhere else
24+
if [ "${{ runner.os }}" != "Windows" ]; then
25+
echo "shell=bash" >> "$GITHUB_OUTPUT"
26+
else
27+
echo "shell=pwsh" >> "$GITHUB_OUTPUT"
28+
fi
29+
- name: Setup miniconda
30+
uses: conda-incubator/setup-miniconda@v3
31+
with:
32+
python-version: '3.11'
33+
miniforge-version: latest # ensures conda-forge channel is used.
34+
channels: conda-forge
35+
conda-remove-defaults: 'true'
36+
# Set to runner.arch=aarch64 if we're on arm64 because
37+
# there's no miniforge ARM64 package, just aarch64.
38+
# They are the same thing, just named differently.
39+
# However there is an ARM64 for macOS, so exclude that.
40+
architecture: ${{ (runner.arch == 'ARM64' && runner.os != 'macOS') && 'aarch64' || runner.arch }}
41+
- name: Install conda build tools
42+
shell: ${{ steps.choose_shell.outputs.shell }}
43+
run: |
44+
# Ensure starting packages are from conda-forge.
45+
conda list --show-channel-urls
46+
conda install -y -q "conda!=24.11.0"
47+
conda install -y -q "conda-build!=24.11.0"
48+
conda list --show-channel-urls
49+
- name: Enable anaconda uploads
50+
if: inputs.label != ''
51+
shell: ${{ steps.choose_shell.outputs.shell }}
52+
env:
53+
PACKAGE_TYPE: ${{ inputs.label }}
54+
run: |
55+
conda install -y -q anaconda-client
56+
conda config --set anaconda_upload yes
57+
- name: Conda build (CPU)
58+
if: inputs.label == '' && inputs.cuda == ''
59+
shell: ${{ steps.choose_shell.outputs.shell }}
60+
working-directory: conda
61+
run: |
62+
conda build faiss --python 3.11 -c pytorch
63+
- name: Conda build (CPU) w/ anaconda upload
64+
if: inputs.label != '' && inputs.cuda == ''
65+
shell: ${{ steps.choose_shell.outputs.shell }}
66+
working-directory: conda
67+
env:
68+
PACKAGE_TYPE: ${{ inputs.label }}
69+
run: |
70+
conda build faiss --user pytorch --label ${{ inputs.label }} -c pytorch
71+
- name: Conda build (GPU)
72+
if: inputs.label == '' && inputs.cuda != '' && inputs.cuvs == ''
73+
shell: ${{ steps.choose_shell.outputs.shell }}
74+
working-directory: conda
75+
run: |
76+
conda build faiss-gpu --variants '{ "cudatoolkit": "${{ inputs.cuda }}" }' \
77+
-c pytorch -c nvidia/label/cuda-${{ inputs.cuda }} -c nvidia
78+
- name: Conda build (GPU) w/ anaconda upload
79+
if: inputs.label != '' && inputs.cuda != '' && inputs.cuvs == ''
80+
shell: ${{ steps.choose_shell.outputs.shell }}
81+
working-directory: conda
82+
env:
83+
PACKAGE_TYPE: ${{ inputs.label }}
84+
run: |
85+
conda build faiss-gpu --variants '{ "cudatoolkit": "${{ inputs.cuda }}" }' \
86+
--user pytorch --label ${{ inputs.label }} -c pytorch -c nvidia/label/cuda-${{ inputs.cuda }} -c nvidia
87+
- name: Conda build (GPU w/ cuVS)
88+
if: inputs.label == '' && inputs.cuda != '' && inputs.cuvs != ''
89+
shell: ${{ steps.choose_shell.outputs.shell }}
90+
working-directory: conda
91+
run: |
92+
conda build faiss-gpu-cuvs --variants '{ "cudatoolkit": "${{ inputs.cuda }}" }' \
93+
-c pytorch -c rapidsai -c rapidsai-nightly -c conda-forge -c nvidia
94+
- name: Conda build (GPU w/ cuVS) w/ anaconda upload
95+
if: inputs.label != '' && inputs.cuda != '' && inputs.cuvs != ''
96+
shell: ${{ steps.choose_shell.outputs.shell }}
97+
working-directory: conda
98+
env:
99+
PACKAGE_TYPE: ${{ inputs.label }}
100+
run: |
101+
conda build faiss-gpu-cuvs --variants '{ "cudatoolkit": "${{ inputs.cuda }}" }' \
102+
--user pytorch --label ${{ inputs.label }} -c pytorch -c rapidsai -c rapidsai-nightly -c conda-forge -c nvidia
103+
- name: Check installed packages channel
104+
shell: ${{ steps.choose_shell.outputs.shell }}
105+
run: |
106+
# Shows that all installed packages are from conda-forge.
107+
conda list --show-channel-urls

.github/workflows/autoclose.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Close Inactive Issues
2+
on:
3+
schedule:
4+
- cron: "30 1 * * *"
5+
6+
jobs:
7+
close-issues:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
steps:
13+
- uses: actions/stale@v5
14+
with:
15+
only-labels: autoclose
16+
days-before-issue-stale: 7
17+
days-before-issue-close: 7
18+
stale-issue-label: "stale"
19+
stale-issue-message: "This issue is stale because it has been open for 7 days with no activity."
20+
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale."
21+
days-before-pr-stale: -1
22+
days-before-pr-close: -1
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)