From 4d78137565b18a03b3ee7b6cb1691b029b65966a Mon Sep 17 00:00:00 2001 From: Alexandr Guzhva Date: Mon, 14 Oct 2024 14:00:13 -0700 Subject: [PATCH 01/21] Place a useful cmake function 'link_to_faiss_lib' into a separate file (#3939) Summary: Add `cmake/link_to_faiss_lib.cmake`, which exposes a useful and reusable CMake `link_to_faiss_lib()` function Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3939 Reviewed By: mnorris11 Differential Revision: D64250261 Pulled By: mengdilin fbshipit-source-id: bab5b7fab8effb33cb73024eb7eefd2319998e5b --- cmake/link_to_faiss_lib.cmake | 55 +++++++++++++++++++++++++++++++++++ perf_tests/CMakeLists.txt | 50 +------------------------------ tests/CMakeLists.txt | 48 ++---------------------------- 3 files changed, 58 insertions(+), 95 deletions(-) create mode 100644 cmake/link_to_faiss_lib.cmake diff --git a/cmake/link_to_faiss_lib.cmake b/cmake/link_to_faiss_lib.cmake new file mode 100644 index 0000000000..83bdaefaaf --- /dev/null +++ b/cmake/link_to_faiss_lib.cmake @@ -0,0 +1,55 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +function(link_to_faiss_lib target) + if(NOT FAISS_OPT_LEVEL STREQUAL "avx2" AND NOT FAISS_OPT_LEVEL STREQUAL "avx512" AND NOT FAISS_OPT_LEVEL STREQUAL "sve") + target_link_libraries(${target} PRIVATE faiss) + endif() + + if(FAISS_OPT_LEVEL STREQUAL "avx2") + if(NOT WIN32) + target_compile_options(${target} PRIVATE $<$:-mavx2 -mfma>) + else() + target_compile_options(${target} PRIVATE $<$:/arch:AVX2>) + endif() + target_link_libraries(${target} PRIVATE faiss_avx2) + endif() + + if(FAISS_OPT_LEVEL STREQUAL "avx512") + if(NOT WIN32) + target_compile_options(${target} PRIVATE $<$:-mavx2 -mfma -mavx512f -mavx512f -mavx512cd -mavx512vl -mavx512dq -mavx512bw>) + else() + target_compile_options(${target} PRIVATE $<$:/arch:AVX512>) + endif() + target_link_libraries(${target} PRIVATE faiss_avx512) + endif() + + if(FAISS_OPT_LEVEL STREQUAL "sve") + if(NOT WIN32) + if("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "(^| )-march=native") + # Do nothing, expect SVE to be enabled by -march=native + elseif("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "(^| )(-march=armv[0-9]+(\\.[1-9]+)?-[^+ ](\\+[^+$ ]+)*)") + # Add +sve + target_compile_options(${target} PRIVATE $<$,$>:${CMAKE_MATCH_2}+sve>) + elseif(NOT "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "(^| )-march=armv") + # No valid -march, so specify -march=armv8-a+sve as the default + target_compile_options(${target} PRIVATE $<$,$>:-march=armv8-a+sve>) + endif() + if("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} " MATCHES "(^| )-march=native") + # Do nothing, expect SVE to be enabled by -march=native + elseif("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} " MATCHES "(^| )(-march=armv[0-9]+(\\.[1-9]+)?-[^+ ](\\+[^+$ ]+)*)") + # Add +sve + target_compile_options(${target} PRIVATE $<$,$>:${CMAKE_MATCH_2}+sve>) + elseif(NOT "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} " MATCHES "(^| )-march=armv") + # No valid -march, so specify -march=armv8-a+sve as the default + target_compile_options(${target} PRIVATE $<$,$>:-march=armv8-a+sve>) + endif() + else() + # TODO: support Windows + endif() + target_link_libraries(${target} PRIVATE faiss_sve) + endif() +endfunction() diff --git a/perf_tests/CMakeLists.txt b/perf_tests/CMakeLists.txt index b7c325dcb4..200430f04c 100644 --- a/perf_tests/CMakeLists.txt +++ b/perf_tests/CMakeLists.txt @@ -27,55 +27,7 @@ add_library(faiss_perf_tests_utils target_include_directories(faiss_perf_tests_utils PRIVATE ${PROJECT_SOURCE_DIR}/../..) -function(link_to_faiss_lib target) - if(NOT FAISS_OPT_LEVEL STREQUAL "avx2" AND NOT FAISS_OPT_LEVEL STREQUAL "avx512" AND NOT FAISS_OPT_LEVEL STREQUAL "sve") - target_link_libraries(${target} PRIVATE faiss) - endif() - - if(FAISS_OPT_LEVEL STREQUAL "avx2") - if(NOT WIN32) - target_compile_options(${target} PRIVATE $<$:-mavx2 -mfma>) - else() - target_compile_options(${target} PRIVATE $<$:/arch:AVX2>) - endif() - target_link_libraries(${target} PRIVATE faiss_avx2) - endif() - - if(FAISS_OPT_LEVEL STREQUAL "avx512") - if(NOT WIN32) - target_compile_options(${target} PRIVATE $<$:-mavx2 -mfma -mavx512f -mavx512f -mavx512cd -mavx512vl -mavx512dq -mavx512bw>) - else() - target_compile_options(${target} PRIVATE $<$:/arch:AVX512>) - endif() - target_link_libraries(${target} PRIVATE faiss_avx512) - endif() - - if(FAISS_OPT_LEVEL STREQUAL "sve") - if(NOT WIN32) - if("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "(^| )-march=native") - # Do nothing, expect SVE to be enabled by -march=native - elseif("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "(^| )(-march=armv[0-9]+(\\.[1-9]+)?-[^+ ](\\+[^+$ ]+)*)") - # Add +sve - target_compile_options(${target} PRIVATE $<$,$>:${CMAKE_MATCH_2}+sve>) - elseif(NOT "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "(^| )-march=armv") - # No valid -march, so specify -march=armv8-a+sve as the default - target_compile_options(${target} PRIVATE $<$,$>:-march=armv8-a+sve>) - endif() - if("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} " MATCHES "(^| )-march=native") - # Do nothing, expect SVE to be enabled by -march=native - elseif("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} " MATCHES "(^| )(-march=armv[0-9]+(\\.[1-9]+)?-[^+ ](\\+[^+$ ]+)*)") - # Add +sve - target_compile_options(${target} PRIVATE $<$,$>:${CMAKE_MATCH_2}+sve>) - elseif(NOT "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} " MATCHES "(^| )-march=armv") - # No valid -march, so specify -march=armv8-a+sve as the default - target_compile_options(${target} PRIVATE $<$,$>:-march=armv8-a+sve>) - endif() - else() - # TODO: support Windows - endif() - target_link_libraries(${target} PRIVATE faiss_sve) - endif() -endfunction() +include(../cmake/link_to_faiss_lib.cmake) link_to_faiss_lib(faiss_perf_tests_utils) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index faa1493c22..602a90b1a2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -40,53 +40,9 @@ set(FAISS_TEST_SRC add_executable(faiss_test ${FAISS_TEST_SRC}) -if(NOT FAISS_OPT_LEVEL STREQUAL "avx2" AND NOT FAISS_OPT_LEVEL STREQUAL "avx512" AND NOT FAISS_OPT_LEVEL STREQUAL "sve") - target_link_libraries(faiss_test PRIVATE faiss) -endif() - -if(FAISS_OPT_LEVEL STREQUAL "avx2") - if(NOT WIN32) - target_compile_options(faiss_test PRIVATE $<$:-mavx2 -mfma>) - else() - target_compile_options(faiss_test PRIVATE $<$:/arch:AVX2>) - endif() - target_link_libraries(faiss_test PRIVATE faiss_avx2) -endif() +include(../cmake/link_to_faiss_lib.cmake) -if(FAISS_OPT_LEVEL STREQUAL "avx512") - if(NOT WIN32) - target_compile_options(faiss_test PRIVATE $<$:-mavx2 -mfma -mavx512f -mavx512f -mavx512cd -mavx512vl -mavx512dq -mavx512bw>) - else() - target_compile_options(faiss_test PRIVATE $<$:/arch:AVX512>) - endif() - target_link_libraries(faiss_test PRIVATE faiss_avx512) -endif() - -if(FAISS_OPT_LEVEL STREQUAL "sve") - if(NOT WIN32) - if("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "(^| )-march=native") - # Do nothing, expect SVE to be enabled by -march=native - elseif("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "(^| )(-march=armv[0-9]+(\\.[1-9]+)?-[^+ ](\\+[^+$ ]+)*)") - # Add +sve - target_compile_options(faiss_test PRIVATE $<$,$>:${CMAKE_MATCH_2}+sve>) - elseif(NOT "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "(^| )-march=armv") - # No valid -march, so specify -march=armv8-a+sve as the default - target_compile_options(faiss_test PRIVATE $<$,$>:-march=armv8-a+sve>) - endif() - if("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} " MATCHES "(^| )-march=native") - # Do nothing, expect SVE to be enabled by -march=native - elseif("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} " MATCHES "(^| )(-march=armv[0-9]+(\\.[1-9]+)?-[^+ ](\\+[^+$ ]+)*)") - # Add +sve - target_compile_options(faiss_test PRIVATE $<$,$>:${CMAKE_MATCH_2}+sve>) - elseif(NOT "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} " MATCHES "(^| )-march=armv") - # No valid -march, so specify -march=armv8-a+sve as the default - target_compile_options(faiss_test PRIVATE $<$,$>:-march=armv8-a+sve>) - endif() - else() - # TODO: support Windows - endif() - target_link_libraries(faiss_test PRIVATE faiss_sve) -endif() +link_to_faiss_lib(faiss_test) target_link_libraries(faiss_test PUBLIC faiss_example_external_module) From e017c353d288470ffebdffd70e3fdfdebb338ce8 Mon Sep 17 00:00:00 2001 From: vorj <40021161+vorj@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:21:28 -0700 Subject: [PATCH 02/21] Fix INSTALL.md due to failure of conflict resolving (#3915) Summary: https://github.com/facebookresearch/faiss/issues/2943 had removed about SVE information (added on https://github.com/facebookresearch/faiss/issues/2886 ) on the installation document. This PR fixes it. This PR changes only the document, so it doesn't affect software behavior. Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3915 Reviewed By: asadoughi Differential Revision: D63967842 Pulled By: ramilbakhshyiev fbshipit-source-id: ce0a0bfe591cb75b504cdf6362b5e8ed156928d5 --- INSTALL.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 11945c26db..d4e2326ffb 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -130,8 +130,9 @@ Several options can be passed to CMake, among which: - `-DCMAKE_BUILD_TYPE=Release` in order to enable generic compiler optimization options (enables `-O3` on gcc for instance), - `-DFAISS_OPT_LEVEL=avx2` in order to enable the required compiler flags to - generate code using optimized SIMD instructions (possible values are `generic`, - `avx2` and `avx512`, by increasing order of optimization), + generate code using optimized SIMD/Vector instructions. Possible values are below: + - On x86-64, `generic`, `avx2` and `avx512`, by increasing order of optimization, + - On aarch64, `generic` and `sve`, by increasing order of optimization, - `-DFAISS_USE_LTO=ON` in order to enable [Link-Time Optimization](https://en.wikipedia.org/wiki/Link-time_optimization) (default is `OFF`, possible values are `ON` and `OFF`). - BLAS-related options: - `-DBLA_VENDOR=Intel10_64_dyn -DMKL_LIBRARIES=/path/to/mkl/libs` to use the From 1ab7e5cbd5df61c778664e6bea2b41e81d1438f7 Mon Sep 17 00:00:00 2001 From: Michael Norris Date: Tue, 15 Oct 2024 09:29:59 -0700 Subject: [PATCH 03/21] add copyright header (#3948) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3948 I noticed this file I added was violating the header check. https://www.internalfb.com/intern/opensource/github/repo/1812028399049977/checkup/ Reviewed By: asadoughi Differential Revision: D64341054 fbshipit-source-id: 4564191661acbff193c8ffe970582cef8fb3a490 --- faiss/python/faiss_example_external_module.swig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/faiss/python/faiss_example_external_module.swig b/faiss/python/faiss_example_external_module.swig index b26b9b2fff..e14ba03a72 100644 --- a/faiss/python/faiss_example_external_module.swig +++ b/faiss/python/faiss_example_external_module.swig @@ -1,3 +1,11 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// This is an example of how an external module can be added via SWIG. %module faiss_example_external_module; From dce7c09413d2f467007197411264b7ac70b1dfbe Mon Sep 17 00:00:00 2001 From: vorj <40021161+vorj@users.noreply.github.com> Date: Tue, 15 Oct 2024 13:59:41 -0700 Subject: [PATCH 04/21] Add some SVE implementations (#3933) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: related: https://github.com/facebookresearch/faiss/issues/2884 I added some SVE implementations of: - `code_distance` - `distance_single_code` - `distance_four_codes` - `exhaustive_L2sqr_blas_cmax_sve` - `fvec_inner_products_ny` - `fvec_madd` ## Evaluation result I evaluated the search for SIFT1M dataset on AWS EC2 c7g.large and r8g.large instances. `main` is the current (2e6551ffa3f6fbdb1ba814c2c531fb399b00d4e3) implementation. ### c7g.large (Graviton 3) ![g3_sift1m](https://github.com/user-attachments/assets/9c03cffa-72d1-4c77-9ae8-0ec0a5f5a6a5) ![g3_ivfpq](https://github.com/user-attachments/assets/4a8dfcc8-823c-4c31-ae79-3f4af9be28c8) On Graviton 3, `IndexIVFPQ` has been improved particularly. In the best case (IndexIVFPQ + IndexFlatL2, M: 32), this PR is approx. 2.38-~~2.50~~**2.44**x faster than `main` . - nprobe: 1, 0.069ms/query → 0.029ms/query - nprobe: 4, 0.181ms/query → ~~0.074~~**0.075**ms/query - nprobe: 16, 0.613ms/query → ~~0.245~~**0.251**ms/query ### r8g.large (Graviton 4) ![g4_sift1m](https://github.com/user-attachments/assets/e8510163-49d2-4143-babe-d406e2e40398) ![g4_ivfpq](https://github.com/user-attachments/assets/dc9a3ae0-a6b5-4a07-9898-c6aff372025c) On Graviton 4, especially `IndexIVFPQ` for tiny `nprobe` has been improved. In the best case (IndexIVFPQ + IndexFlatL2, M: 8, nprobe: 1), this PR is approx. 1.33x faster than `main` (0.016ms/query → 0.012ms/query). Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3933 Reviewed By: mengdilin Differential Revision: D64249808 Pulled By: asadoughi fbshipit-source-id: 8a625f0ab37732d330192599c851f864350885c4 --- faiss/impl/code_distance/code_distance-sve.h | 440 +++++++++++++++++ faiss/impl/code_distance/code_distance.h | 53 ++ faiss/utils/distances.cpp | 189 +++++++ faiss/utils/distances_simd.cpp | 493 +++++++++++++++++++ 4 files changed, 1175 insertions(+) create mode 100644 faiss/impl/code_distance/code_distance-sve.h diff --git a/faiss/impl/code_distance/code_distance-sve.h b/faiss/impl/code_distance/code_distance-sve.h new file mode 100644 index 0000000000..c15a755d1c --- /dev/null +++ b/faiss/impl/code_distance/code_distance-sve.h @@ -0,0 +1,440 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#ifdef __ARM_FEATURE_SVE + +#include + +#include +#include + +#include + +namespace faiss { + +template +std::enable_if_t, float> inline distance_single_code_sve( + // the product quantizer + const size_t M, + // number of bits per quantization index + const size_t nbits, + // precomputed distances, layout (M, ksub) + const float* sim_table, + const uint8_t* code) { + // default implementation + return distance_single_code_generic(M, nbits, sim_table, code); +} + +static inline void distance_codes_kernel( + svbool_t pg, + svuint32_t idx1, + svuint32_t offsets_0, + const float* tab, + svfloat32_t& partialSum) { + // add offset + const auto indices_to_read_from = svadd_u32_x(pg, idx1, offsets_0); + + // gather values, similar to some operations of tab[index] + const auto collected = + svld1_gather_u32index_f32(pg, tab, indices_to_read_from); + + // collect partial sum + partialSum = svadd_f32_m(pg, partialSum, collected); +} + +static float distance_single_code_sve_for_small_m( + // the product quantizer + const size_t M, + // precomputed distances, layout (M, ksub) + const float* sim_table, + // codes + const uint8_t* __restrict code) { + constexpr size_t nbits = 8u; + + const size_t ksub = 1 << nbits; + + const auto offsets_0 = svindex_u32(0, static_cast(ksub)); + + // loop + const auto pg = svwhilelt_b32_u64(0, M); + + auto mm1 = svld1ub_u32(pg, code); + mm1 = svadd_u32_x(pg, mm1, offsets_0); + const auto collected0 = svld1_gather_u32index_f32(pg, sim_table, mm1); + return svaddv_f32(pg, collected0); +} + +template +std::enable_if_t, float> inline distance_single_code_sve( + // the product quantizer + const size_t M, + // number of bits per quantization index + const size_t nbits, + // precomputed distances, layout (M, ksub) + const float* sim_table, + const uint8_t* code) { + if (M <= svcntw()) + return distance_single_code_sve_for_small_m(M, sim_table, code); + + const float* tab = sim_table; + + const size_t ksub = 1 << nbits; + + const auto offsets_0 = svindex_u32(0, static_cast(ksub)); + + // accumulators of partial sums + auto partialSum = svdup_n_f32(0.f); + + const auto lanes = svcntb(); + const auto quad_lanes = lanes / 4; + + // loop + for (std::size_t m = 0; m < M;) { + const auto pg = svwhilelt_b8_u64(m, M); + + const auto mm1 = svld1_u8(pg, code + m); + { + const auto mm1lo = svunpklo_u16(mm1); + const auto pglo = svunpklo_b(pg); + + { + // convert uint8 values to uint32 values + const auto idx1 = svunpklo_u32(mm1lo); + const auto pglolo = svunpklo_b(pglo); + + distance_codes_kernel(pglolo, idx1, offsets_0, tab, partialSum); + tab += ksub * quad_lanes; + } + + m += quad_lanes; + if (m >= M) + break; + + { + // convert uint8 values to uint32 values + const auto idx1 = svunpkhi_u32(mm1lo); + const auto pglohi = svunpkhi_b(pglo); + + distance_codes_kernel(pglohi, idx1, offsets_0, tab, partialSum); + tab += ksub * quad_lanes; + } + + m += quad_lanes; + if (m >= M) + break; + } + + { + const auto mm1hi = svunpkhi_u16(mm1); + const auto pghi = svunpkhi_b(pg); + + { + // convert uint8 values to uint32 values + const auto idx1 = svunpklo_u32(mm1hi); + const auto pghilo = svunpklo_b(pghi); + + distance_codes_kernel(pghilo, idx1, offsets_0, tab, partialSum); + tab += ksub * quad_lanes; + } + + m += quad_lanes; + if (m >= M) + break; + + { + // convert uint8 values to uint32 values + const auto idx1 = svunpkhi_u32(mm1hi); + const auto pghihi = svunpkhi_b(pghi); + + distance_codes_kernel(pghihi, idx1, offsets_0, tab, partialSum); + tab += ksub * quad_lanes; + } + + m += quad_lanes; + } + } + + return svaddv_f32(svptrue_b32(), partialSum); +} + +template +std::enable_if_t, void> +distance_four_codes_sve( + // the product quantizer + const size_t M, + // number of bits per quantization index + const size_t nbits, + // precomputed distances, layout (M, ksub) + const float* sim_table, + // codes + const uint8_t* __restrict code0, + const uint8_t* __restrict code1, + const uint8_t* __restrict code2, + const uint8_t* __restrict code3, + // computed distances + float& result0, + float& result1, + float& result2, + float& result3) { + distance_four_codes_generic( + M, + nbits, + sim_table, + code0, + code1, + code2, + code3, + result0, + result1, + result2, + result3); +} + +static void distance_four_codes_sve_for_small_m( + // the product quantizer + const size_t M, + // precomputed distances, layout (M, ksub) + const float* sim_table, + // codes + const uint8_t* __restrict code0, + const uint8_t* __restrict code1, + const uint8_t* __restrict code2, + const uint8_t* __restrict code3, + // computed distances + float& result0, + float& result1, + float& result2, + float& result3) { + constexpr size_t nbits = 8u; + + const size_t ksub = 1 << nbits; + + const auto offsets_0 = svindex_u32(0, static_cast(ksub)); + + const auto quad_lanes = svcntw(); + + // loop + const auto pg = svwhilelt_b32_u64(0, M); + + auto mm10 = svld1ub_u32(pg, code0); + auto mm11 = svld1ub_u32(pg, code1); + auto mm12 = svld1ub_u32(pg, code2); + auto mm13 = svld1ub_u32(pg, code3); + mm10 = svadd_u32_x(pg, mm10, offsets_0); + mm11 = svadd_u32_x(pg, mm11, offsets_0); + mm12 = svadd_u32_x(pg, mm12, offsets_0); + mm13 = svadd_u32_x(pg, mm13, offsets_0); + const auto collected0 = svld1_gather_u32index_f32(pg, sim_table, mm10); + const auto collected1 = svld1_gather_u32index_f32(pg, sim_table, mm11); + const auto collected2 = svld1_gather_u32index_f32(pg, sim_table, mm12); + const auto collected3 = svld1_gather_u32index_f32(pg, sim_table, mm13); + result0 = svaddv_f32(pg, collected0); + result1 = svaddv_f32(pg, collected1); + result2 = svaddv_f32(pg, collected2); + result3 = svaddv_f32(pg, collected3); +} + +// Combines 4 operations of distance_single_code() +template +std::enable_if_t, void> +distance_four_codes_sve( + // the product quantizer + const size_t M, + // number of bits per quantization index + const size_t nbits, + // precomputed distances, layout (M, ksub) + const float* sim_table, + // codes + const uint8_t* __restrict code0, + const uint8_t* __restrict code1, + const uint8_t* __restrict code2, + const uint8_t* __restrict code3, + // computed distances + float& result0, + float& result1, + float& result2, + float& result3) { + if (M <= svcntw()) { + distance_four_codes_sve_for_small_m( + M, + sim_table, + code0, + code1, + code2, + code3, + result0, + result1, + result2, + result3); + return; + } + + const float* tab = sim_table; + + const size_t ksub = 1 << nbits; + + const auto offsets_0 = svindex_u32(0, static_cast(ksub)); + + // accumulators of partial sums + auto partialSum0 = svdup_n_f32(0.f); + auto partialSum1 = svdup_n_f32(0.f); + auto partialSum2 = svdup_n_f32(0.f); + auto partialSum3 = svdup_n_f32(0.f); + + const auto lanes = svcntb(); + const auto quad_lanes = lanes / 4; + + // loop + for (std::size_t m = 0; m < M;) { + const auto pg = svwhilelt_b8_u64(m, M); + + const auto mm10 = svld1_u8(pg, code0 + m); + const auto mm11 = svld1_u8(pg, code1 + m); + const auto mm12 = svld1_u8(pg, code2 + m); + const auto mm13 = svld1_u8(pg, code3 + m); + { + const auto mm10lo = svunpklo_u16(mm10); + const auto mm11lo = svunpklo_u16(mm11); + const auto mm12lo = svunpklo_u16(mm12); + const auto mm13lo = svunpklo_u16(mm13); + const auto pglo = svunpklo_b(pg); + + { + const auto pglolo = svunpklo_b(pglo); + { + const auto idx1 = svunpklo_u32(mm10lo); + distance_codes_kernel( + pglolo, idx1, offsets_0, tab, partialSum0); + } + { + const auto idx1 = svunpklo_u32(mm11lo); + distance_codes_kernel( + pglolo, idx1, offsets_0, tab, partialSum1); + } + { + const auto idx1 = svunpklo_u32(mm12lo); + distance_codes_kernel( + pglolo, idx1, offsets_0, tab, partialSum2); + } + { + const auto idx1 = svunpklo_u32(mm13lo); + distance_codes_kernel( + pglolo, idx1, offsets_0, tab, partialSum3); + } + tab += ksub * quad_lanes; + } + + m += quad_lanes; + if (m >= M) + break; + + { + const auto pglohi = svunpkhi_b(pglo); + { + const auto idx1 = svunpkhi_u32(mm10lo); + distance_codes_kernel( + pglohi, idx1, offsets_0, tab, partialSum0); + } + { + const auto idx1 = svunpkhi_u32(mm11lo); + distance_codes_kernel( + pglohi, idx1, offsets_0, tab, partialSum1); + } + { + const auto idx1 = svunpkhi_u32(mm12lo); + distance_codes_kernel( + pglohi, idx1, offsets_0, tab, partialSum2); + } + { + const auto idx1 = svunpkhi_u32(mm13lo); + distance_codes_kernel( + pglohi, idx1, offsets_0, tab, partialSum3); + } + tab += ksub * quad_lanes; + } + + m += quad_lanes; + if (m >= M) + break; + } + + { + const auto mm10hi = svunpkhi_u16(mm10); + const auto mm11hi = svunpkhi_u16(mm11); + const auto mm12hi = svunpkhi_u16(mm12); + const auto mm13hi = svunpkhi_u16(mm13); + const auto pghi = svunpkhi_b(pg); + + { + const auto pghilo = svunpklo_b(pghi); + { + const auto idx1 = svunpklo_u32(mm10hi); + distance_codes_kernel( + pghilo, idx1, offsets_0, tab, partialSum0); + } + { + const auto idx1 = svunpklo_u32(mm11hi); + distance_codes_kernel( + pghilo, idx1, offsets_0, tab, partialSum1); + } + { + const auto idx1 = svunpklo_u32(mm12hi); + distance_codes_kernel( + pghilo, idx1, offsets_0, tab, partialSum2); + } + { + const auto idx1 = svunpklo_u32(mm13hi); + distance_codes_kernel( + pghilo, idx1, offsets_0, tab, partialSum3); + } + tab += ksub * quad_lanes; + } + + m += quad_lanes; + if (m >= M) + break; + + { + const auto pghihi = svunpkhi_b(pghi); + { + const auto idx1 = svunpkhi_u32(mm10hi); + distance_codes_kernel( + pghihi, idx1, offsets_0, tab, partialSum0); + } + { + const auto idx1 = svunpkhi_u32(mm11hi); + distance_codes_kernel( + pghihi, idx1, offsets_0, tab, partialSum1); + } + { + const auto idx1 = svunpkhi_u32(mm12hi); + distance_codes_kernel( + pghihi, idx1, offsets_0, tab, partialSum2); + } + { + const auto idx1 = svunpkhi_u32(mm13hi); + distance_codes_kernel( + pghihi, idx1, offsets_0, tab, partialSum3); + } + tab += ksub * quad_lanes; + } + + m += quad_lanes; + } + } + + result0 = svaddv_f32(svptrue_b32(), partialSum0); + result1 = svaddv_f32(svptrue_b32(), partialSum1); + result2 = svaddv_f32(svptrue_b32(), partialSum2); + result3 = svaddv_f32(svptrue_b32(), partialSum3); +} + +} // namespace faiss + +#endif diff --git a/faiss/impl/code_distance/code_distance.h b/faiss/impl/code_distance/code_distance.h index 7cdf932f50..155e19a6d8 100644 --- a/faiss/impl/code_distance/code_distance.h +++ b/faiss/impl/code_distance/code_distance.h @@ -77,6 +77,59 @@ inline void distance_four_codes( } // namespace faiss +#elif defined(__ARM_FEATURE_SVE) + +#include + +namespace faiss { + +template +inline float distance_single_code( + // the product quantizer + const size_t M, + // number of bits per quantization index + const size_t nbits, + // precomputed distances, layout (M, ksub) + const float* sim_table, + // the code + const uint8_t* code) { + return distance_single_code_sve(M, nbits, sim_table, code); +} + +template +inline void distance_four_codes( + // the product quantizer + const size_t M, + // number of bits per quantization index + const size_t nbits, + // precomputed distances, layout (M, ksub) + const float* sim_table, + // codes + const uint8_t* __restrict code0, + const uint8_t* __restrict code1, + const uint8_t* __restrict code2, + const uint8_t* __restrict code3, + // computed distances + float& result0, + float& result1, + float& result2, + float& result3) { + distance_four_codes_sve( + M, + nbits, + sim_table, + code0, + code1, + code2, + code3, + result0, + result1, + result2, + result3); +} + +} // namespace faiss + #else #include diff --git a/faiss/utils/distances.cpp b/faiss/utils/distances.cpp index 1506bee5cf..e698037aa1 100644 --- a/faiss/utils/distances.cpp +++ b/faiss/utils/distances.cpp @@ -18,6 +18,8 @@ #ifdef __AVX2__ #include +#elif defined(__ARM_FEATURE_SVE) +#include #endif #include @@ -557,6 +559,183 @@ void exhaustive_L2sqr_blas_cmax_avx2( InterruptCallback::check(); } } +#elif defined(__ARM_FEATURE_SVE) +void exhaustive_L2sqr_blas_cmax_sve( + const float* x, + const float* y, + size_t d, + size_t nx, + size_t ny, + Top1BlockResultHandler>& res, + const float* y_norms) { + // BLAS does not like empty matrices + if (nx == 0 || ny == 0) + return; + + /* block sizes */ + const size_t bs_x = distance_compute_blas_query_bs; + const size_t bs_y = distance_compute_blas_database_bs; + // const size_t bs_x = 16, bs_y = 16; + std::unique_ptr ip_block(new float[bs_x * bs_y]); + std::unique_ptr x_norms(new float[nx]); + std::unique_ptr del2; + + fvec_norms_L2sqr(x_norms.get(), x, d, nx); + + const size_t lanes = svcntw(); + + if (!y_norms) { + float* y_norms2 = new float[ny]; + del2.reset(y_norms2); + fvec_norms_L2sqr(y_norms2, y, d, ny); + y_norms = y_norms2; + } + + for (size_t i0 = 0; i0 < nx; i0 += bs_x) { + size_t i1 = i0 + bs_x; + if (i1 > nx) + i1 = nx; + + res.begin_multiple(i0, i1); + + for (size_t j0 = 0; j0 < ny; j0 += bs_y) { + size_t j1 = j0 + bs_y; + if (j1 > ny) + j1 = ny; + /* compute the actual dot products */ + { + float one = 1, zero = 0; + FINTEGER nyi = j1 - j0, nxi = i1 - i0, di = d; + sgemm_("Transpose", + "Not transpose", + &nyi, + &nxi, + &di, + &one, + y + j0 * d, + &di, + x + i0 * d, + &di, + &zero, + ip_block.get(), + &nyi); + } +#pragma omp parallel for + for (int64_t i = i0; i < i1; i++) { + const size_t count = j1 - j0; + float* ip_line = ip_block.get() + (i - i0) * count; + + svprfw(svwhilelt_b32_u64(0, count), ip_line, SV_PLDL1KEEP); + svprfw(svwhilelt_b32_u64(lanes, count), + ip_line + lanes, + SV_PLDL1KEEP); + + // Track lanes min distances + lanes min indices. + // All the distances tracked do not take x_norms[i] + // into account in order to get rid of extra + // vaddq_f32(x_norms[i], ...) instructions + // is distance computations. + auto min_distances = svdup_n_f32(res.dis_tab[i] - x_norms[i]); + + // these indices are local and are relative to j0. + // so, value 0 means j0. + auto min_indices = svdup_n_u32(0u); + + auto current_indices = svindex_u32(0u, 1u); + + // process lanes * 2 elements per loop + for (size_t idx_j = 0; idx_j < count; + idx_j += lanes * 2, ip_line += lanes * 2) { + svprfw(svwhilelt_b32_u64(idx_j + lanes * 2, count), + ip_line + lanes * 2, + SV_PLDL1KEEP); + svprfw(svwhilelt_b32_u64(idx_j + lanes * 3, count), + ip_line + lanes * 3, + SV_PLDL1KEEP); + + // mask + const auto mask_0 = svwhilelt_b32_u64(idx_j, count); + const auto mask_1 = svwhilelt_b32_u64(idx_j + lanes, count); + + // load values for norms + const auto y_norm_0 = + svld1_f32(mask_0, y_norms + idx_j + j0 + 0); + const auto y_norm_1 = + svld1_f32(mask_1, y_norms + idx_j + j0 + lanes); + + // load values for dot products + const auto ip_0 = svld1_f32(mask_0, ip_line + 0); + const auto ip_1 = svld1_f32(mask_1, ip_line + lanes); + + // compute dis = y_norm[j] - 2 * dot(x_norm[i], y_norm[j]). + // x_norm[i] was dropped off because it is a constant for a + // given i. We'll deal with it later. + const auto distances_0 = + svmla_n_f32_z(mask_0, y_norm_0, ip_0, -2.f); + const auto distances_1 = + svmla_n_f32_z(mask_1, y_norm_1, ip_1, -2.f); + + // compare the new distances to the min distances + // for each of the first group of 4 ARM SIMD components. + auto comparison = + svcmpgt_f32(mask_0, min_distances, distances_0); + + // update min distances and indices with closest vectors if + // needed. + min_distances = + svsel_f32(comparison, distances_0, min_distances); + min_indices = + svsel_u32(comparison, current_indices, min_indices); + current_indices = svadd_n_u32_x( + mask_0, + current_indices, + static_cast(lanes)); + + // compare the new distances to the min distances + // for each of the second group of 4 ARM SIMD components. + comparison = + svcmpgt_f32(mask_1, min_distances, distances_1); + + // update min distances and indices with closest vectors if + // needed. + min_distances = + svsel_f32(comparison, distances_1, min_distances); + min_indices = + svsel_u32(comparison, current_indices, min_indices); + current_indices = svadd_n_u32_x( + mask_1, + current_indices, + static_cast(lanes)); + } + + // add missing x_norms[i] + // negative values can occur for identical vectors + // due to roundoff errors. + auto mask = svwhilelt_b32_u64(0, count); + min_distances = svadd_n_f32_z( + svcmpge_n_f32(mask, min_distances, -x_norms[i]), + min_distances, + x_norms[i]); + min_indices = svadd_n_u32_x( + mask, min_indices, static_cast(j0)); + mask = svcmple_n_f32(mask, min_distances, res.dis_tab[i]); + if (svcntp_b32(svptrue_b32(), mask) == 0) + res.add_result(i, res.dis_tab[i], res.ids_tab[i]); + else { + const auto min_distance = svminv_f32(mask, min_distances); + const auto min_index = svminv_u32( + svcmpeq_n_f32(mask, min_distances, min_distance), + min_indices); + res.add_result(i, min_distance, min_index); + } + } + } + // Does nothing for SingleBestResultHandler, but + // keeping the call for the consistency. + res.end_multiple(); + InterruptCallback::check(); + } +} #endif // an override if only a single closest point is needed @@ -579,6 +758,16 @@ void exhaustive_L2sqr_blas>>( // run the specialized AVX2 implementation exhaustive_L2sqr_blas_cmax_avx2(x, y, d, nx, ny, res, y_norms); +#elif defined(__ARM_FEATURE_SVE) + // use a faster fused kernel if available + if (exhaustive_L2sqr_fused_cmax(x, y, d, nx, ny, res, y_norms)) { + // the kernel is available and it is complete, we're done. + return; + } + + // run the specialized SVE implementation + exhaustive_L2sqr_blas_cmax_sve(x, y, d, nx, ny, res, y_norms); + #elif defined(__aarch64__) // use a faster fused kernel if available if (exhaustive_L2sqr_fused_cmax(x, y, d, nx, ny, res, y_norms)) { diff --git a/faiss/utils/distances_simd.cpp b/faiss/utils/distances_simd.cpp index 7cebd2ae33..7cabfc0a25 100644 --- a/faiss/utils/distances_simd.cpp +++ b/faiss/utils/distances_simd.cpp @@ -29,6 +29,10 @@ #include #endif +#ifdef __ARM_FEATURE_SVE +#include +#endif + #ifdef __aarch64__ #include #endif @@ -2673,6 +2677,441 @@ float fvec_Linf(const float* x, const float* y, size_t d) { return fvec_Linf_ref(x, y, d); } +#elif defined(__ARM_FEATURE_SVE) + +struct ElementOpIP { + static svfloat32_t op(svbool_t pg, svfloat32_t x, svfloat32_t y) { + return svmul_f32_x(pg, x, y); + } + static svfloat32_t merge( + svbool_t pg, + svfloat32_t z, + svfloat32_t x, + svfloat32_t y) { + return svmla_f32_x(pg, z, x, y); + } +}; + +template +void fvec_op_ny_sve_d1(float* dis, const float* x, const float* y, size_t ny) { + const size_t lanes = svcntw(); + const size_t lanes2 = lanes * 2; + const size_t lanes3 = lanes * 3; + const size_t lanes4 = lanes * 4; + const svbool_t pg = svptrue_b32(); + const svfloat32_t x0 = svdup_n_f32(x[0]); + size_t i = 0; + for (; i + lanes4 < ny; i += lanes4) { + svfloat32_t y0 = svld1_f32(pg, y); + svfloat32_t y1 = svld1_f32(pg, y + lanes); + svfloat32_t y2 = svld1_f32(pg, y + lanes2); + svfloat32_t y3 = svld1_f32(pg, y + lanes3); + y0 = ElementOp::op(pg, x0, y0); + y1 = ElementOp::op(pg, x0, y1); + y2 = ElementOp::op(pg, x0, y2); + y3 = ElementOp::op(pg, x0, y3); + svst1_f32(pg, dis, y0); + svst1_f32(pg, dis + lanes, y1); + svst1_f32(pg, dis + lanes2, y2); + svst1_f32(pg, dis + lanes3, y3); + y += lanes4; + dis += lanes4; + } + const svbool_t pg0 = svwhilelt_b32_u64(i, ny); + const svbool_t pg1 = svwhilelt_b32_u64(i + lanes, ny); + const svbool_t pg2 = svwhilelt_b32_u64(i + lanes2, ny); + const svbool_t pg3 = svwhilelt_b32_u64(i + lanes3, ny); + svfloat32_t y0 = svld1_f32(pg0, y); + svfloat32_t y1 = svld1_f32(pg1, y + lanes); + svfloat32_t y2 = svld1_f32(pg2, y + lanes2); + svfloat32_t y3 = svld1_f32(pg3, y + lanes3); + y0 = ElementOp::op(pg0, x0, y0); + y1 = ElementOp::op(pg1, x0, y1); + y2 = ElementOp::op(pg2, x0, y2); + y3 = ElementOp::op(pg3, x0, y3); + svst1_f32(pg0, dis, y0); + svst1_f32(pg1, dis + lanes, y1); + svst1_f32(pg2, dis + lanes2, y2); + svst1_f32(pg3, dis + lanes3, y3); +} + +template +void fvec_op_ny_sve_d2(float* dis, const float* x, const float* y, size_t ny) { + const size_t lanes = svcntw(); + const size_t lanes2 = lanes * 2; + const size_t lanes4 = lanes * 4; + const svbool_t pg = svptrue_b32(); + const svfloat32_t x0 = svdup_n_f32(x[0]); + const svfloat32_t x1 = svdup_n_f32(x[1]); + size_t i = 0; + for (; i + lanes2 < ny; i += lanes2) { + const svfloat32x2_t y0 = svld2_f32(pg, y); + const svfloat32x2_t y1 = svld2_f32(pg, y + lanes2); + svfloat32_t y00 = svget2_f32(y0, 0); + const svfloat32_t y01 = svget2_f32(y0, 1); + svfloat32_t y10 = svget2_f32(y1, 0); + const svfloat32_t y11 = svget2_f32(y1, 1); + y00 = ElementOp::op(pg, x0, y00); + y10 = ElementOp::op(pg, x0, y10); + y00 = ElementOp::merge(pg, y00, x1, y01); + y10 = ElementOp::merge(pg, y10, x1, y11); + svst1_f32(pg, dis, y00); + svst1_f32(pg, dis + lanes, y10); + y += lanes4; + dis += lanes2; + } + const svbool_t pg0 = svwhilelt_b32_u64(i, ny); + const svbool_t pg1 = svwhilelt_b32_u64(i + lanes, ny); + const svfloat32x2_t y0 = svld2_f32(pg0, y); + const svfloat32x2_t y1 = svld2_f32(pg1, y + lanes2); + svfloat32_t y00 = svget2_f32(y0, 0); + const svfloat32_t y01 = svget2_f32(y0, 1); + svfloat32_t y10 = svget2_f32(y1, 0); + const svfloat32_t y11 = svget2_f32(y1, 1); + y00 = ElementOp::op(pg0, x0, y00); + y10 = ElementOp::op(pg1, x0, y10); + y00 = ElementOp::merge(pg0, y00, x1, y01); + y10 = ElementOp::merge(pg1, y10, x1, y11); + svst1_f32(pg0, dis, y00); + svst1_f32(pg1, dis + lanes, y10); +} + +template +void fvec_op_ny_sve_d4(float* dis, const float* x, const float* y, size_t ny) { + const size_t lanes = svcntw(); + const size_t lanes4 = lanes * 4; + const svbool_t pg = svptrue_b32(); + const svfloat32_t x0 = svdup_n_f32(x[0]); + const svfloat32_t x1 = svdup_n_f32(x[1]); + const svfloat32_t x2 = svdup_n_f32(x[2]); + const svfloat32_t x3 = svdup_n_f32(x[3]); + size_t i = 0; + for (; i + lanes < ny; i += lanes) { + const svfloat32x4_t y0 = svld4_f32(pg, y); + svfloat32_t y00 = svget4_f32(y0, 0); + const svfloat32_t y01 = svget4_f32(y0, 1); + svfloat32_t y02 = svget4_f32(y0, 2); + const svfloat32_t y03 = svget4_f32(y0, 3); + y00 = ElementOp::op(pg, x0, y00); + y02 = ElementOp::op(pg, x2, y02); + y00 = ElementOp::merge(pg, y00, x1, y01); + y02 = ElementOp::merge(pg, y02, x3, y03); + y00 = svadd_f32_x(pg, y00, y02); + svst1_f32(pg, dis, y00); + y += lanes4; + dis += lanes; + } + const svbool_t pg0 = svwhilelt_b32_u64(i, ny); + const svfloat32x4_t y0 = svld4_f32(pg0, y); + svfloat32_t y00 = svget4_f32(y0, 0); + const svfloat32_t y01 = svget4_f32(y0, 1); + svfloat32_t y02 = svget4_f32(y0, 2); + const svfloat32_t y03 = svget4_f32(y0, 3); + y00 = ElementOp::op(pg0, x0, y00); + y02 = ElementOp::op(pg0, x2, y02); + y00 = ElementOp::merge(pg0, y00, x1, y01); + y02 = ElementOp::merge(pg0, y02, x3, y03); + y00 = svadd_f32_x(pg0, y00, y02); + svst1_f32(pg0, dis, y00); +} + +template +void fvec_op_ny_sve_d8(float* dis, const float* x, const float* y, size_t ny) { + const size_t lanes = svcntw(); + const size_t lanes4 = lanes * 4; + const size_t lanes8 = lanes * 8; + const svbool_t pg = svptrue_b32(); + const svfloat32_t x0 = svdup_n_f32(x[0]); + const svfloat32_t x1 = svdup_n_f32(x[1]); + const svfloat32_t x2 = svdup_n_f32(x[2]); + const svfloat32_t x3 = svdup_n_f32(x[3]); + const svfloat32_t x4 = svdup_n_f32(x[4]); + const svfloat32_t x5 = svdup_n_f32(x[5]); + const svfloat32_t x6 = svdup_n_f32(x[6]); + const svfloat32_t x7 = svdup_n_f32(x[7]); + size_t i = 0; + for (; i + lanes < ny; i += lanes) { + const svfloat32x4_t ya = svld4_f32(pg, y); + const svfloat32x4_t yb = svld4_f32(pg, y + lanes4); + const svfloat32_t ya0 = svget4_f32(ya, 0); + const svfloat32_t ya1 = svget4_f32(ya, 1); + const svfloat32_t ya2 = svget4_f32(ya, 2); + const svfloat32_t ya3 = svget4_f32(ya, 3); + const svfloat32_t yb0 = svget4_f32(yb, 0); + const svfloat32_t yb1 = svget4_f32(yb, 1); + const svfloat32_t yb2 = svget4_f32(yb, 2); + const svfloat32_t yb3 = svget4_f32(yb, 3); + svfloat32_t y0 = svuzp1(ya0, yb0); + const svfloat32_t y1 = svuzp1(ya1, yb1); + svfloat32_t y2 = svuzp1(ya2, yb2); + const svfloat32_t y3 = svuzp1(ya3, yb3); + svfloat32_t y4 = svuzp2(ya0, yb0); + const svfloat32_t y5 = svuzp2(ya1, yb1); + svfloat32_t y6 = svuzp2(ya2, yb2); + const svfloat32_t y7 = svuzp2(ya3, yb3); + y0 = ElementOp::op(pg, x0, y0); + y2 = ElementOp::op(pg, x2, y2); + y4 = ElementOp::op(pg, x4, y4); + y6 = ElementOp::op(pg, x6, y6); + y0 = ElementOp::merge(pg, y0, x1, y1); + y2 = ElementOp::merge(pg, y2, x3, y3); + y4 = ElementOp::merge(pg, y4, x5, y5); + y6 = ElementOp::merge(pg, y6, x7, y7); + y0 = svadd_f32_x(pg, y0, y2); + y4 = svadd_f32_x(pg, y4, y6); + y0 = svadd_f32_x(pg, y0, y4); + svst1_f32(pg, dis, y0); + y += lanes8; + dis += lanes; + } + const svbool_t pg0 = svwhilelt_b32_u64(i, ny); + const svbool_t pga = svwhilelt_b32_u64(i * 2, ny * 2); + const svbool_t pgb = svwhilelt_b32_u64(i * 2 + lanes, ny * 2); + const svfloat32x4_t ya = svld4_f32(pga, y); + const svfloat32x4_t yb = svld4_f32(pgb, y + lanes4); + const svfloat32_t ya0 = svget4_f32(ya, 0); + const svfloat32_t ya1 = svget4_f32(ya, 1); + const svfloat32_t ya2 = svget4_f32(ya, 2); + const svfloat32_t ya3 = svget4_f32(ya, 3); + const svfloat32_t yb0 = svget4_f32(yb, 0); + const svfloat32_t yb1 = svget4_f32(yb, 1); + const svfloat32_t yb2 = svget4_f32(yb, 2); + const svfloat32_t yb3 = svget4_f32(yb, 3); + svfloat32_t y0 = svuzp1(ya0, yb0); + const svfloat32_t y1 = svuzp1(ya1, yb1); + svfloat32_t y2 = svuzp1(ya2, yb2); + const svfloat32_t y3 = svuzp1(ya3, yb3); + svfloat32_t y4 = svuzp2(ya0, yb0); + const svfloat32_t y5 = svuzp2(ya1, yb1); + svfloat32_t y6 = svuzp2(ya2, yb2); + const svfloat32_t y7 = svuzp2(ya3, yb3); + y0 = ElementOp::op(pg0, x0, y0); + y2 = ElementOp::op(pg0, x2, y2); + y4 = ElementOp::op(pg0, x4, y4); + y6 = ElementOp::op(pg0, x6, y6); + y0 = ElementOp::merge(pg0, y0, x1, y1); + y2 = ElementOp::merge(pg0, y2, x3, y3); + y4 = ElementOp::merge(pg0, y4, x5, y5); + y6 = ElementOp::merge(pg0, y6, x7, y7); + y0 = svadd_f32_x(pg0, y0, y2); + y4 = svadd_f32_x(pg0, y4, y6); + y0 = svadd_f32_x(pg0, y0, y4); + svst1_f32(pg0, dis, y0); + y += lanes8; + dis += lanes; +} + +template +void fvec_op_ny_sve_lanes1( + float* dis, + const float* x, + const float* y, + size_t ny) { + const size_t lanes = svcntw(); + const size_t lanes2 = lanes * 2; + const size_t lanes3 = lanes * 3; + const size_t lanes4 = lanes * 4; + const svbool_t pg = svptrue_b32(); + const svfloat32_t x0 = svld1_f32(pg, x); + size_t i = 0; + for (; i + 3 < ny; i += 4) { + svfloat32_t y0 = svld1_f32(pg, y); + svfloat32_t y1 = svld1_f32(pg, y + lanes); + svfloat32_t y2 = svld1_f32(pg, y + lanes2); + svfloat32_t y3 = svld1_f32(pg, y + lanes3); + y += lanes4; + y0 = ElementOp::op(pg, x0, y0); + y1 = ElementOp::op(pg, x0, y1); + y2 = ElementOp::op(pg, x0, y2); + y3 = ElementOp::op(pg, x0, y3); + dis[i] = svaddv_f32(pg, y0); + dis[i + 1] = svaddv_f32(pg, y1); + dis[i + 2] = svaddv_f32(pg, y2); + dis[i + 3] = svaddv_f32(pg, y3); + } + for (; i < ny; ++i) { + svfloat32_t y0 = svld1_f32(pg, y); + y += lanes; + y0 = ElementOp::op(pg, x0, y0); + dis[i] = svaddv_f32(pg, y0); + } +} + +template +void fvec_op_ny_sve_lanes2( + float* dis, + const float* x, + const float* y, + size_t ny) { + const size_t lanes = svcntw(); + const size_t lanes2 = lanes * 2; + const size_t lanes3 = lanes * 3; + const size_t lanes4 = lanes * 4; + const svbool_t pg = svptrue_b32(); + const svfloat32_t x0 = svld1_f32(pg, x); + const svfloat32_t x1 = svld1_f32(pg, x + lanes); + size_t i = 0; + for (; i + 1 < ny; i += 2) { + svfloat32_t y00 = svld1_f32(pg, y); + const svfloat32_t y01 = svld1_f32(pg, y + lanes); + svfloat32_t y10 = svld1_f32(pg, y + lanes2); + const svfloat32_t y11 = svld1_f32(pg, y + lanes3); + y += lanes4; + y00 = ElementOp::op(pg, x0, y00); + y10 = ElementOp::op(pg, x0, y10); + y00 = ElementOp::merge(pg, y00, x1, y01); + y10 = ElementOp::merge(pg, y10, x1, y11); + dis[i] = svaddv_f32(pg, y00); + dis[i + 1] = svaddv_f32(pg, y10); + } + if (i < ny) { + svfloat32_t y0 = svld1_f32(pg, y); + const svfloat32_t y1 = svld1_f32(pg, y + lanes); + y0 = ElementOp::op(pg, x0, y0); + y0 = ElementOp::merge(pg, y0, x1, y1); + dis[i] = svaddv_f32(pg, y0); + } +} + +template +void fvec_op_ny_sve_lanes3( + float* dis, + const float* x, + const float* y, + size_t ny) { + const size_t lanes = svcntw(); + const size_t lanes2 = lanes * 2; + const size_t lanes3 = lanes * 3; + const svbool_t pg = svptrue_b32(); + const svfloat32_t x0 = svld1_f32(pg, x); + const svfloat32_t x1 = svld1_f32(pg, x + lanes); + const svfloat32_t x2 = svld1_f32(pg, x + lanes2); + for (size_t i = 0; i < ny; ++i) { + svfloat32_t y0 = svld1_f32(pg, y); + const svfloat32_t y1 = svld1_f32(pg, y + lanes); + svfloat32_t y2 = svld1_f32(pg, y + lanes2); + y += lanes3; + y0 = ElementOp::op(pg, x0, y0); + y0 = ElementOp::merge(pg, y0, x1, y1); + y0 = ElementOp::merge(pg, y0, x2, y2); + dis[i] = svaddv_f32(pg, y0); + } +} + +template +void fvec_op_ny_sve_lanes4( + float* dis, + const float* x, + const float* y, + size_t ny) { + const size_t lanes = svcntw(); + const size_t lanes2 = lanes * 2; + const size_t lanes3 = lanes * 3; + const size_t lanes4 = lanes * 4; + const svbool_t pg = svptrue_b32(); + const svfloat32_t x0 = svld1_f32(pg, x); + const svfloat32_t x1 = svld1_f32(pg, x + lanes); + const svfloat32_t x2 = svld1_f32(pg, x + lanes2); + const svfloat32_t x3 = svld1_f32(pg, x + lanes3); + for (size_t i = 0; i < ny; ++i) { + svfloat32_t y0 = svld1_f32(pg, y); + const svfloat32_t y1 = svld1_f32(pg, y + lanes); + svfloat32_t y2 = svld1_f32(pg, y + lanes2); + const svfloat32_t y3 = svld1_f32(pg, y + lanes3); + y += lanes4; + y0 = ElementOp::op(pg, x0, y0); + y2 = ElementOp::op(pg, x2, y2); + y0 = ElementOp::merge(pg, y0, x1, y1); + y2 = ElementOp::merge(pg, y2, x3, y3); + y0 = svadd_f32_x(pg, y0, y2); + dis[i] = svaddv_f32(pg, y0); + } +} + +void fvec_L2sqr_ny( + float* dis, + const float* x, + const float* y, + size_t d, + size_t ny) { + fvec_L2sqr_ny_ref(dis, x, y, d, ny); +} + +void fvec_L2sqr_ny_transposed( + float* dis, + const float* x, + const float* y, + const float* y_sqlen, + size_t d, + size_t d_offset, + size_t ny) { + return fvec_L2sqr_ny_y_transposed_ref(dis, x, y, y_sqlen, d, d_offset, ny); +} + +size_t fvec_L2sqr_ny_nearest( + float* distances_tmp_buffer, + const float* x, + const float* y, + size_t d, + size_t ny) { + return fvec_L2sqr_ny_nearest_ref(distances_tmp_buffer, x, y, d, ny); +} + +size_t fvec_L2sqr_ny_nearest_y_transposed( + float* distances_tmp_buffer, + const float* x, + const float* y, + const float* y_sqlen, + size_t d, + size_t d_offset, + size_t ny) { + return fvec_L2sqr_ny_nearest_y_transposed_ref( + distances_tmp_buffer, x, y, y_sqlen, d, d_offset, ny); +} + +float fvec_L1(const float* x, const float* y, size_t d) { + return fvec_L1_ref(x, y, d); +} + +float fvec_Linf(const float* x, const float* y, size_t d) { + return fvec_Linf_ref(x, y, d); +} + +void fvec_inner_products_ny( + float* dis, + const float* x, + const float* y, + size_t d, + size_t ny) { + const size_t lanes = svcntw(); + switch (d) { + case 1: + fvec_op_ny_sve_d1(dis, x, y, ny); + break; + case 2: + fvec_op_ny_sve_d2(dis, x, y, ny); + break; + case 4: + fvec_op_ny_sve_d4(dis, x, y, ny); + break; + case 8: + fvec_op_ny_sve_d8(dis, x, y, ny); + break; + default: + if (d == lanes) + fvec_op_ny_sve_lanes1(dis, x, y, ny); + else if (d == lanes * 2) + fvec_op_ny_sve_lanes2(dis, x, y, ny); + else if (d == lanes * 3) + fvec_op_ny_sve_lanes3(dis, x, y, ny); + else if (d == lanes * 4) + fvec_op_ny_sve_lanes4(dis, x, y, ny); + else + fvec_inner_products_ny_ref(dis, x, y, d, ny); + break; + } +} + #elif defined(__aarch64__) // not optimized for ARM @@ -2934,6 +3373,60 @@ void fvec_madd(size_t n, const float* a, float bf, const float* b, float* c) { #endif } +#elif defined(__ARM_FEATURE_SVE) + +void fvec_madd( + const size_t n, + const float* __restrict a, + const float bf, + const float* __restrict b, + float* __restrict c) { + const size_t lanes = static_cast(svcntw()); + const size_t lanes2 = lanes * 2; + const size_t lanes3 = lanes * 3; + const size_t lanes4 = lanes * 4; + size_t i = 0; + for (; i + lanes4 < n; i += lanes4) { + const auto mask = svptrue_b32(); + const auto ai0 = svld1_f32(mask, a + i); + const auto ai1 = svld1_f32(mask, a + i + lanes); + const auto ai2 = svld1_f32(mask, a + i + lanes2); + const auto ai3 = svld1_f32(mask, a + i + lanes3); + const auto bi0 = svld1_f32(mask, b + i); + const auto bi1 = svld1_f32(mask, b + i + lanes); + const auto bi2 = svld1_f32(mask, b + i + lanes2); + const auto bi3 = svld1_f32(mask, b + i + lanes3); + const auto ci0 = svmla_n_f32_x(mask, ai0, bi0, bf); + const auto ci1 = svmla_n_f32_x(mask, ai1, bi1, bf); + const auto ci2 = svmla_n_f32_x(mask, ai2, bi2, bf); + const auto ci3 = svmla_n_f32_x(mask, ai3, bi3, bf); + svst1_f32(mask, c + i, ci0); + svst1_f32(mask, c + i + lanes, ci1); + svst1_f32(mask, c + i + lanes2, ci2); + svst1_f32(mask, c + i + lanes3, ci3); + } + const auto mask0 = svwhilelt_b32_u64(i, n); + const auto mask1 = svwhilelt_b32_u64(i + lanes, n); + const auto mask2 = svwhilelt_b32_u64(i + lanes2, n); + const auto mask3 = svwhilelt_b32_u64(i + lanes3, n); + const auto ai0 = svld1_f32(mask0, a + i); + const auto ai1 = svld1_f32(mask1, a + i + lanes); + const auto ai2 = svld1_f32(mask2, a + i + lanes2); + const auto ai3 = svld1_f32(mask3, a + i + lanes3); + const auto bi0 = svld1_f32(mask0, b + i); + const auto bi1 = svld1_f32(mask1, b + i + lanes); + const auto bi2 = svld1_f32(mask2, b + i + lanes2); + const auto bi3 = svld1_f32(mask3, b + i + lanes3); + const auto ci0 = svmla_n_f32_x(mask0, ai0, bi0, bf); + const auto ci1 = svmla_n_f32_x(mask1, ai1, bi1, bf); + const auto ci2 = svmla_n_f32_x(mask2, ai2, bi2, bf); + const auto ci3 = svmla_n_f32_x(mask3, ai3, bi3, bf); + svst1_f32(mask0, c + i, ci0); + svst1_f32(mask1, c + i + lanes, ci1); + svst1_f32(mask2, c + i + lanes2, ci2); + svst1_f32(mask3, c + i + lanes3, ci3); +} + #elif defined(__aarch64__) void fvec_madd(size_t n, const float* a, float bf, const float* b, float* c) { From cb1a512fb303f79ff8c7e473d10fd5dd44c8fce9 Mon Sep 17 00:00:00 2001 From: Michael Norris Date: Tue, 15 Oct 2024 19:01:46 -0700 Subject: [PATCH 05/21] Back out "Add example of how to build, link, and test an external SWIG module" (#3954) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3954 Original commit changeset: 0c1cd25eabbf Original Phabricator Diff: D63991471 Reviewed By: mengdilin, asadoughi Differential Revision: D64439886 fbshipit-source-id: cc90958f6d90a429a4eece8e1cd1322b20d9aceb --- conda/faiss-gpu-raft/meta.yaml | 2 +- conda/faiss-gpu/meta.yaml | 2 +- conda/faiss/meta.yaml | 2 +- faiss/python/CMakeLists.txt | 29 ---- .../python/faiss_example_external_module.swig | 141 ------------------ faiss/python/setup.py | 58 +++---- faiss/python/swigfaiss.swig | 41 +---- tests/CMakeLists.txt | 2 - tests/test_external_module.py | 61 -------- 9 files changed, 29 insertions(+), 309 deletions(-) delete mode 100644 faiss/python/faiss_example_external_module.swig delete mode 100644 tests/test_external_module.py diff --git a/conda/faiss-gpu-raft/meta.yaml b/conda/faiss-gpu-raft/meta.yaml index 8b6d974e19..1dde8e9868 100644 --- a/conda/faiss-gpu-raft/meta.yaml +++ b/conda/faiss-gpu-raft/meta.yaml @@ -112,7 +112,7 @@ outputs: - pytorch - pytorch-cuda {{ cuda_constraints }} commands: - - python -X faulthandler -m unittest discover -v -s tests/ -p "(?!.*test_external_module\.py)test_.*py" + - python -X faulthandler -m unittest discover -v -s tests/ -p "test_*" - python -X faulthandler -m unittest discover -v -s tests/ -p "torch_*" - cp tests/common_faiss_tests.py faiss/gpu/test - python -X faulthandler -m unittest discover -v -s faiss/gpu/test/ -p "test_*" diff --git a/conda/faiss-gpu/meta.yaml b/conda/faiss-gpu/meta.yaml index 86937d318c..05f7b59008 100644 --- a/conda/faiss-gpu/meta.yaml +++ b/conda/faiss-gpu/meta.yaml @@ -101,7 +101,7 @@ outputs: - pytorch - pytorch-cuda {{ cuda_constraints }} commands: - - python -X faulthandler -m unittest discover -v -s tests/ -p "(?!.*test_external_module\.py)test_.*py" + - python -X faulthandler -m unittest discover -v -s tests/ -p "test_*" - python -X faulthandler -m unittest discover -v -s tests/ -p "torch_*" - cp tests/common_faiss_tests.py faiss/gpu/test - python -X faulthandler -m unittest discover -v -s faiss/gpu/test/ -p "test_*" diff --git a/conda/faiss/meta.yaml b/conda/faiss/meta.yaml index e937a6557c..79e7be953e 100644 --- a/conda/faiss/meta.yaml +++ b/conda/faiss/meta.yaml @@ -86,7 +86,7 @@ outputs: - scipy - pytorch commands: - - python -X faulthandler -m unittest discover -v -s tests/ -p "(?!.*test_external_module\.py)test_.*py" + - python -X faulthandler -m unittest discover -v -s tests/ -p "test_*" - python -X faulthandler -m unittest discover -v -s tests/ -p "torch_*" - sh test_cpu_dispatch.sh # [linux64] files: diff --git a/faiss/python/CMakeLists.txt b/faiss/python/CMakeLists.txt index 38e79f768c..aea99af795 100644 --- a/faiss/python/CMakeLists.txt +++ b/faiss/python/CMakeLists.txt @@ -61,7 +61,6 @@ configure_swigfaiss(swigfaiss.swig) configure_swigfaiss(swigfaiss_avx2.swig) configure_swigfaiss(swigfaiss_avx512.swig) configure_swigfaiss(swigfaiss_sve.swig) -configure_swigfaiss(faiss_example_external_module.swig) if(TARGET faiss) # Manually add headers as extra dependencies of swigfaiss. @@ -75,8 +74,6 @@ if(TARGET faiss) "${faiss_SOURCE_DIR}/faiss/${h}") list(APPEND SWIG_MODULE_swigfaiss_sve_EXTRA_DEPS "${faiss_SOURCE_DIR}/faiss/${h}") - list(APPEND SWIG_MODULE_faiss_example_external_module_EXTRA_DEPS - "${faiss_SOURCE_DIR}/faiss/${h}") endforeach() if(FAISS_ENABLE_ROCM) foreach(h ${FAISS_GPU_HEADERS}) @@ -86,8 +83,6 @@ if(TARGET faiss) "${faiss_SOURCE_DIR}/faiss/gpu-rocm/${h}") list(APPEND SWIG_MODULE_swigfaiss_avx512_EXTRA_DEPS "${faiss_SOURCE_DIR}/faiss/gpu-rocm/${h}") - list(APPEND SWIG_MODULE_faiss_example_external_module_EXTRA_DEPS - "${faiss_SOURCE_DIR}/faiss/gpu-rocm/${h}") endforeach() else() foreach(h ${FAISS_GPU_HEADERS}) @@ -99,8 +94,6 @@ if(TARGET faiss) "${faiss_SOURCE_DIR}/faiss/gpu/${h}") list(APPEND SWIG_MODULE_swigfaiss_sve_EXTRA_DEPS "${faiss_SOURCE_DIR}/faiss/gpu/${h}") - list(APPEND SWIG_MODULE_faiss_example_external_module_EXTRA_DEPS - "${faiss_SOURCE_DIR}/faiss/gpu/${h}") endforeach() endif() else() @@ -159,29 +152,18 @@ if(NOT FAISS_OPT_LEVEL STREQUAL "sve") set_target_properties(swigfaiss_sve PROPERTIES EXCLUDE_FROM_ALL TRUE) endif() -set_property(SOURCE faiss_example_external_module.swig - PROPERTY SWIG_MODULE_NAME faiss_example_external_module) -swig_add_library(faiss_example_external_module - TYPE SHARED - LANGUAGE python - SOURCES faiss_example_external_module.swig -) -set_property(TARGET faiss_example_external_module PROPERTY SWIG_COMPILE_OPTIONS -doxygen) - if(NOT WIN32) # NOTE: Python does not recognize the dylib extension. set_target_properties(swigfaiss PROPERTIES SUFFIX .so) set_target_properties(swigfaiss_avx2 PROPERTIES SUFFIX .so) set_target_properties(swigfaiss_avx512 PROPERTIES SUFFIX .so) set_target_properties(swigfaiss_sve PROPERTIES SUFFIX .so) - set_target_properties(faiss_example_external_module PROPERTIES SUFFIX .so) else() # we need bigobj for the swig wrapper target_compile_options(swigfaiss PRIVATE /bigobj) target_compile_options(swigfaiss_avx2 PRIVATE /bigobj) target_compile_options(swigfaiss_avx512 PRIVATE /bigobj) target_compile_options(swigfaiss_sve PRIVATE /bigobj) - target_compile_options(faiss_example_external_module PRIVATE /bigobj) endif() if(FAISS_ENABLE_GPU) @@ -189,7 +171,6 @@ if(FAISS_ENABLE_GPU) target_link_libraries(swigfaiss PRIVATE hip::host) target_link_libraries(swigfaiss_avx2 PRIVATE hip::host) target_link_libraries(swigfaiss_avx512 PRIVATE hip::host) - target_link_libraries(faiss_example_external_module PRIVATE hip::host) else() find_package(CUDAToolkit REQUIRED) if(FAISS_ENABLE_RAFT) @@ -240,21 +221,12 @@ target_link_libraries(swigfaiss_sve PRIVATE OpenMP::OpenMP_CXX ) -target_link_libraries(faiss_example_external_module PRIVATE - Python::Module - Python::NumPy - OpenMP::OpenMP_CXX - swigfaiss - faiss -) - # Hack so that python_callbacks.h can be included as # `#include `. target_include_directories(swigfaiss PRIVATE ${PROJECT_SOURCE_DIR}/../..) target_include_directories(swigfaiss_avx2 PRIVATE ${PROJECT_SOURCE_DIR}/../..) target_include_directories(swigfaiss_avx512 PRIVATE ${PROJECT_SOURCE_DIR}/../..) target_include_directories(swigfaiss_sve PRIVATE ${PROJECT_SOURCE_DIR}/../..) -target_include_directories(faiss_example_external_module PRIVATE ${PROJECT_SOURCE_DIR}/../..) find_package(Python REQUIRED COMPONENTS Development NumPy @@ -280,7 +252,6 @@ target_link_libraries(swigfaiss PRIVATE faiss_python_callbacks) target_link_libraries(swigfaiss_avx2 PRIVATE faiss_python_callbacks) target_link_libraries(swigfaiss_avx512 PRIVATE faiss_python_callbacks) target_link_libraries(swigfaiss_sve PRIVATE faiss_python_callbacks) -target_link_libraries(faiss_example_external_module PRIVATE faiss_python_callbacks) configure_file(setup.py setup.py COPYONLY) configure_file(__init__.py __init__.py COPYONLY) diff --git a/faiss/python/faiss_example_external_module.swig b/faiss/python/faiss_example_external_module.swig deleted file mode 100644 index e14ba03a72..0000000000 --- a/faiss/python/faiss_example_external_module.swig +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// This is an example of how an external module can be added via SWIG. - -%module faiss_example_external_module; - - -// Put C++ includes here -%{ - -#include -#include - -%} - -#pragma SWIG nowarn=322 - -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; - -typedef signed char int8_t; -typedef short int16_t; -typedef int int32_t; - -#ifdef SWIGWORDSIZE64 -typedef unsigned long uint64_t; -typedef long int64_t; -#else -typedef unsigned long long uint64_t; -typedef long long int64_t; -#endif - -typedef uint64_t size_t; - -// This means: assume what's declared in these .h files is provided -// by the Faiss module. -%import(module="faiss") "faiss/MetricType.h" -%import(module="faiss") "faiss/impl/IDSelector.h" - -// functions to be parsed here - -// This is important to release GIL and do Faiss exception handing -%exception { - Py_BEGIN_ALLOW_THREADS - try { - $action - } catch(faiss::FaissException & e) { - PyEval_RestoreThread(_save); - - if (PyErr_Occurred()) { - // some previous code already set the error type. - } else { - PyErr_SetString(PyExc_RuntimeError, e.what()); - } - SWIG_fail; - } catch(std::bad_alloc & ba) { - PyEval_RestoreThread(_save); - PyErr_SetString(PyExc_MemoryError, "std::bad_alloc"); - SWIG_fail; - } - Py_END_ALLOW_THREADS -} - - -// any class or function declared below will be made available -// in the module. -%inline %{ - -struct IDSelectorModulo : faiss::IDSelector { - int mod; - - IDSelectorModulo(int mod): mod(mod) {} - - bool is_member(faiss::idx_t id) const { - return id % mod == 0; - } - - ~IDSelectorModulo() override {} -}; - -faiss::idx_t sum_of_idx(size_t n, const faiss::idx_t *tab) { - faiss::idx_t sum = 0; - for(size_t i = 0; i < n; i++) { - sum += tab[i]; - } - return sum; -} - -float sum_of_float32(size_t n, const float *tab) { - float sum = 0; - for(size_t i = 0; i < n; i++) { - sum += tab[i]; - } - return sum; -} - -double sum_of_float64(size_t n, const double *tab) { - double sum = 0; - for(size_t i = 0; i < n; i++) { - sum += tab[i]; - } - return sum; -} - -%} - -/********************************************** - * To test if passing a swig_ptr on all array types works - **********************************************/ - -%define SUM_OF_TYPE(ty) - -%inline %{ - -ty##_t sum_of_##ty (size_t n, const ty##_t * tab) { - ty##_t sum = 0; - for(size_t i = 0; i < n; i++) { - sum += tab[i]; - } - return sum; -} - -%} - -%enddef - -SUM_OF_TYPE(uint8); -SUM_OF_TYPE(uint16); -SUM_OF_TYPE(uint32); -SUM_OF_TYPE(uint64); - -SUM_OF_TYPE(int8); -SUM_OF_TYPE(int16); -SUM_OF_TYPE(int32); -SUM_OF_TYPE(int64); diff --git a/faiss/python/setup.py b/faiss/python/setup.py index b009a4474d..46cacc0514 100644 --- a/faiss/python/setup.py +++ b/faiss/python/setup.py @@ -4,12 +4,10 @@ # LICENSE file in the root directory of this source tree. from __future__ import print_function - +from setuptools import setup, find_packages import os -import platform import shutil - -from setuptools import find_packages, setup +import platform # make the faiss python package dir shutil.rmtree("faiss", ignore_errors=True) @@ -22,32 +20,25 @@ shutil.copyfile("extra_wrappers.py", "faiss/extra_wrappers.py") shutil.copyfile("array_conversions.py", "faiss/array_conversions.py") -ext = ".pyd" if platform.system() == "Windows" else ".so" -prefix = "Release/" * (platform.system() == "Windows") +ext = ".pyd" if platform.system() == 'Windows' else ".so" +prefix = "Release/" * (platform.system() == 'Windows') swigfaiss_generic_lib = f"{prefix}_swigfaiss{ext}" swigfaiss_avx2_lib = f"{prefix}_swigfaiss_avx2{ext}" swigfaiss_avx512_lib = f"{prefix}_swigfaiss_avx512{ext}" callbacks_lib = f"{prefix}libfaiss_python_callbacks{ext}" swigfaiss_sve_lib = f"{prefix}_swigfaiss_sve{ext}" -faiss_example_external_module_lib = f"_faiss_example_external_module{ext}" found_swigfaiss_generic = os.path.exists(swigfaiss_generic_lib) found_swigfaiss_avx2 = os.path.exists(swigfaiss_avx2_lib) found_swigfaiss_avx512 = os.path.exists(swigfaiss_avx512_lib) found_callbacks = os.path.exists(callbacks_lib) found_swigfaiss_sve = os.path.exists(swigfaiss_sve_lib) -found_faiss_example_external_module_lib = os.path.exists( - faiss_example_external_module_lib -) -assert ( - found_swigfaiss_generic or found_swigfaiss_avx2 or found_swigfaiss_avx512 or found_swigfaiss_sve or found_faiss_example_external_module_lib -), ( - f"Could not find {swigfaiss_generic_lib} or " - f"{swigfaiss_avx2_lib} or {swigfaiss_avx512_lib} or {swigfaiss_sve_lib} or {faiss_example_external_module_lib}. " +assert (found_swigfaiss_generic or found_swigfaiss_avx2 or found_swigfaiss_avx512 or found_swigfaiss_sve), \ + f"Could not find {swigfaiss_generic_lib} or " \ + f"{swigfaiss_avx2_lib} or {swigfaiss_avx512_lib} or {swigfaiss_sve_lib}. " \ f"Faiss may not be compiled yet." -) if found_swigfaiss_generic: print(f"Copying {swigfaiss_generic_lib}") @@ -73,17 +64,7 @@ shutil.copyfile("swigfaiss_sve.py", "faiss/swigfaiss_sve.py") shutil.copyfile(swigfaiss_sve_lib, f"faiss/_swigfaiss_sve{ext}") -if found_faiss_example_external_module_lib: - print(f"Copying {faiss_example_external_module_lib}") - shutil.copyfile( - "faiss_example_external_module.py", "faiss/faiss_example_external_module.py" - ) - shutil.copyfile( - faiss_example_external_module_lib, - f"faiss/_faiss_example_external_module{ext}", - ) - -long_description = """ +long_description=""" Faiss is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also contains supporting @@ -92,19 +73,20 @@ are implemented on the GPU. It is developed by Facebook AI Research. """ setup( - name="faiss", - version="1.9.0", - description="A library for efficient similarity search and clustering of dense vectors", + name='faiss', + version='1.9.0', + description='A library for efficient similarity search and clustering of dense vectors', long_description=long_description, - url="https://github.com/facebookresearch/faiss", - author="Matthijs Douze, Jeff Johnson, Herve Jegou, Lucas Hosseini", - author_email="matthijs@meta.com", - license="MIT", - keywords="search nearest neighbors", - install_requires=["numpy", "packaging"], - packages=["faiss", "faiss.contrib", "faiss.contrib.torch"], + url='https://github.com/facebookresearch/faiss', + author='Matthijs Douze, Jeff Johnson, Herve Jegou, Lucas Hosseini', + author_email='matthijs@meta.com', + license='MIT', + keywords='search nearest neighbors', + + install_requires=['numpy', 'packaging'], + packages=['faiss', 'faiss.contrib', 'faiss.contrib.torch'], package_data={ - "faiss": ["*.so", "*.pyd"], + 'faiss': ['*.so', '*.pyd'], }, zip_safe=False, ) diff --git a/faiss/python/swigfaiss.swig b/faiss/python/swigfaiss.swig index d20966bac3..4d44fb650b 100644 --- a/faiss/python/swigfaiss.swig +++ b/faiss/python/swigfaiss.swig @@ -33,24 +33,7 @@ #pragma SWIG nowarn=512 #pragma SWIG nowarn=362 -// we need explict control of these typedefs... -// %include -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; - -// char != unsigned char AND char != signed char so be explicit -typedef signed char int8_t; -typedef short int16_t; -typedef int int32_t; - -#ifdef SWIGWORDSIZE64 -typedef unsigned long uint64_t; -typedef long int64_t; -#else -typedef unsigned long long uint64_t; -typedef long long int64_t; -#endif +%include typedef uint64_t size_t; @@ -256,15 +239,10 @@ namespace std { // primitive array types %template(Float32Vector) std::vector; %template(Float64Vector) std::vector; - -// weird interaction within C++ between char and signed char -%ignore Int8Vector::swap; - %template(Int8Vector) std::vector; %template(Int16Vector) std::vector; %template(Int32Vector) std::vector; %template(Int64Vector) std::vector; - %template(UInt8Vector) std::vector; %template(UInt16Vector) std::vector; %template(UInt32Vector) std::vector; @@ -1108,13 +1086,6 @@ void *memcpy(void *dest, const void *src, size_t n); #ifdef SWIGPYTHON -// transfer SWIG flag to C++ -#ifdef SWIGWORDSIZE64 -%{ -#define SWIGWORDSIZE64_CPP -%} -#endif - %{ PyObject *swig_ptr (PyObject *a) { @@ -1149,7 +1120,7 @@ PyObject *swig_ptr (PyObject *a) return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_char, 0); } if(PyArray_TYPE(ao) == NPY_INT8) { - return SWIG_NewPointerObj(data, SWIGTYPE_p_signed_char, 0); + return SWIG_NewPointerObj(data, SWIGTYPE_p_char, 0); } if(PyArray_TYPE(ao) == NPY_UINT16) { return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_short, 0); @@ -1170,14 +1141,14 @@ PyObject *swig_ptr (PyObject *a) // Convert npy64 either long or long long and it depends on how compiler define int64_t. // In the 64bit machine, typically the int64_t should be long but it is not hold for Apple osx. // In this case, we want to convert npy64 to long_Long in osx -#ifdef SWIGWORDSIZE64_CPP +#if __SIZEOF_LONG__ == 8 && !defined(__APPLE__) return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long, 0); #else return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long_long, 0); #endif } if(PyArray_TYPE(ao) == NPY_INT64) { -#ifdef SWIGWORDSIZE64_CPP +#if __SIZEOF_LONG__ == 8 && !defined(__APPLE__) return SWIG_NewPointerObj(data, SWIGTYPE_p_long, 0); #else return SWIG_NewPointerObj(data, SWIGTYPE_p_long_long, 0); @@ -1234,8 +1205,8 @@ PyObject * rev_swig_ptr(ctype *src, size_t size); REV_SWIG_PTR(float, NPY_FLOAT32); REV_SWIG_PTR(double, NPY_FLOAT64); -REV_SWIG_PTR(uint8_t, NPY_UINT8); -REV_SWIG_PTR(int8_t, NPY_INT8); +REV_SWIG_PTR(unsigned char, NPY_UINT8); +REV_SWIG_PTR(char, NPY_INT8); REV_SWIG_PTR(unsigned short, NPY_UINT16); REV_SWIG_PTR(short, NPY_INT16); REV_SWIG_PTR(int, NPY_INT32); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 602a90b1a2..1e875cf41d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -44,8 +44,6 @@ include(../cmake/link_to_faiss_lib.cmake) link_to_faiss_lib(faiss_test) -target_link_libraries(faiss_test PUBLIC faiss_example_external_module) - include(FetchContent) FetchContent_Declare( googletest diff --git a/tests/test_external_module.py b/tests/test_external_module.py deleted file mode 100644 index 5ea6d328ff..0000000000 --- a/tests/test_external_module.py +++ /dev/null @@ -1,61 +0,0 @@ -import unittest - -import faiss - -import faiss.faiss_example_external_module as external_module - -import numpy as np - - -class TestCustomIDSelector(unittest.TestCase): - """test if we can construct a custom IDSelector""" - - def test_IDSelector(self): - ids = external_module.IDSelectorModulo(3) - self.assertFalse(ids.is_member(1)) - self.assertTrue(ids.is_member(3)) - - -class TestArrayConversions(unittest.TestCase): - - def test_idx_array(self): - tab = np.arange(10).astype("int64") - new_sum = external_module.sum_of_idx(len(tab), faiss.swig_ptr(tab)) - self.assertEqual(new_sum, tab.sum()) - - def do_array_test(self, ty): - tab = np.arange(10).astype(ty) - func = getattr(external_module, "sum_of_" + ty) - print("perceived type", faiss.swig_ptr(tab)) - new_sum = func(len(tab), faiss.swig_ptr(tab)) - self.assertEqual(new_sum, tab.sum()) - - def test_sum_uint8(self): - self.do_array_test("uint8") - - def test_sum_uint16(self): - self.do_array_test("uint16") - - def test_sum_uint32(self): - self.do_array_test("uint32") - - def test_sum_uint64(self): - self.do_array_test("uint64") - - def test_sum_int8(self): - self.do_array_test("int8") - - def test_sum_int16(self): - self.do_array_test("int16") - - def test_sum_int32(self): - self.do_array_test("int32") - - def test_sum_int64(self): - self.do_array_test("int64") - - def test_sum_float32(self): - self.do_array_test("float32") - - def test_sum_float64(self): - self.do_array_test("float64") From 7a5192210d87959af94eb09d766f5ac8a31d578e Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Wed, 16 Oct 2024 08:58:50 -0700 Subject: [PATCH 06/21] Fix shadowed variable in faiss/IndexPQ.cpp (#3959) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3959 Our upcoming compiler upgrade will require us not to have shadowed variables. Such variables have a _high_ bug rate and reduce readability, so we would like to avoid them even if the compiler was not forcing us to do so. This codemod attempts to fix an instance of a shadowed variable. Please review with care: if it's failed the result will be a silent bug. **What's a shadowed variable?** Shadowed variables are variables in an inner scope with the same name as another variable in an outer scope. Having the same name for both variables might be semantically correct, but it can make the code confusing to read! It can also hide subtle bugs. This diff fixes such an issue by renaming the variable. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: meyering Differential Revision: D64398686 fbshipit-source-id: 44c60ea6e99d9542acf5af15adba6cdccda95577 --- faiss/IndexPQ.cpp | 48 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/faiss/IndexPQ.cpp b/faiss/IndexPQ.cpp index 71cb855ef5..b1ac990af1 100644 --- a/faiss/IndexPQ.cpp +++ b/faiss/IndexPQ.cpp @@ -159,16 +159,16 @@ void IndexPQ::search( FAISS_THROW_IF_NOT(is_trained); const SearchParametersPQ* params = nullptr; - Search_type_t search_type = this->search_type; + Search_type_t search_type_2 = this->search_type; if (iparams) { params = dynamic_cast(iparams); FAISS_THROW_IF_NOT_MSG(params, "invalid search params"); FAISS_THROW_IF_NOT_MSG(!params->sel, "selector not supported"); - search_type = params->search_type; + search_type_2 = params->search_type; } - if (search_type == ST_PQ) { // Simple PQ search + if (search_type_2 == ST_PQ) { // Simple PQ search if (metric_type == METRIC_L2) { float_maxheap_array_t res = { @@ -183,10 +183,10 @@ void IndexPQ::search( indexPQ_stats.ncode += n * ntotal; } else if ( - search_type == ST_polysemous || - search_type == ST_polysemous_generalize) { + search_type_2 == ST_polysemous || + search_type_2 == ST_polysemous_generalize) { FAISS_THROW_IF_NOT(metric_type == METRIC_L2); - int polysemous_ht = + int polysemous_ht_2 = params ? params->polysemous_ht : this->polysemous_ht; search_core_polysemous( n, @@ -194,8 +194,8 @@ void IndexPQ::search( k, distances, labels, - polysemous_ht, - search_type == ST_polysemous_generalize); + polysemous_ht_2, + search_type_2 == ST_polysemous_generalize); } else { // code-to-code distances @@ -215,7 +215,7 @@ void IndexPQ::search( } } - if (search_type == ST_SDC) { + if (search_type_2 == ST_SDC) { float_maxheap_array_t res = { size_t(n), size_t(k), labels, distances}; @@ -227,7 +227,7 @@ void IndexPQ::search( int_maxheap_array_t res = { size_t(n), size_t(k), labels, idistances.get()}; - if (search_type == ST_HE) { + if (search_type_2 == ST_HE) { hammings_knn_hc( &res, q_codes.get(), @@ -236,7 +236,7 @@ void IndexPQ::search( pq.code_size, true); - } else if (search_type == ST_generalized_HE) { + } else if (search_type_2 == ST_generalized_HE) { generalized_hammings_knn_hc( &res, q_codes.get(), @@ -322,13 +322,13 @@ void IndexPQ::search_core_polysemous( idx_t k, float* distances, idx_t* labels, - int polysemous_ht, + int polysemous_ht_2, bool generalized_hamming) const { FAISS_THROW_IF_NOT(k > 0); FAISS_THROW_IF_NOT(pq.nbits == 8); - if (polysemous_ht == 0) { - polysemous_ht = pq.nbits * pq.M + 1; + if (polysemous_ht_2 == 0) { + polysemous_ht_2 = pq.nbits * pq.M + 1; } // PQ distance tables @@ -374,7 +374,7 @@ void IndexPQ::search_core_polysemous( k, heap_dis, heap_ids, - polysemous_ht); + polysemous_ht_2); } else { // generalized hamming switch (pq.code_size) { @@ -387,7 +387,7 @@ void IndexPQ::search_core_polysemous( k, \ heap_dis, \ heap_ids, \ - polysemous_ht); \ + polysemous_ht_2); \ break; DISPATCH(8) DISPATCH(16) @@ -401,7 +401,7 @@ void IndexPQ::search_core_polysemous( k, heap_dis, heap_ids, - polysemous_ht); + polysemous_ht_2); } else { bad_code_size++; } @@ -516,8 +516,8 @@ struct PreSortedArray { int N; explicit PreSortedArray(int N) : N(N) {} - void init(const T* x) { - this->x = x; + void init(const T* x_2) { + this->x = x_2; } // get smallest value T get_0() { @@ -557,11 +557,11 @@ struct SortedArray { perm.resize(N); } - void init(const T* x) { - this->x = x; + void init(const T* x_2) { + this->x = x_2; for (int n = 0; n < N; n++) perm[n] = n; - ArgSort cmp = {x}; + ArgSort cmp = {x_2}; std::sort(perm.begin(), perm.end(), cmp); } @@ -639,8 +639,8 @@ struct SemiSortedArray { k_factor = 4; } - void init(const T* x) { - this->x = x; + void init(const T* x_2) { + this->x = x_2; for (int n = 0; n < N; n++) perm[n] = n; k = 0; From b8ae854cdd5c82ef41c3cfaec8cddf2808b97dff Mon Sep 17 00:00:00 2001 From: Maria Lomeli Date: Wed, 16 Oct 2024 09:41:53 -0700 Subject: [PATCH 07/21] Cache device major version value to avoid multiple calls of getCudaDeviceProperties (#3950) Summary: This diff enables to cache the device major version value so getCudaDeviceProperties() doesn't need to be called multiple times. Currently, the profiler of the code looks as so: {F1933796291} Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3950 Test Plan: N5114369 -- provides a toy example (2) which exhibits the following timings: Average timings before change: 3.35s Average tmings after change: 1.99s Reviewed By: algoriddle Differential Revision: D64047778 Pulled By: mlomeli1 fbshipit-source-id: 2f09373944237e80b96d40f35c6714c06f5741a9 --- faiss/gpu/GpuDistance.cu | 14 ++++++++++---- faiss/gpu/GpuIndex.cu | 12 +++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/faiss/gpu/GpuDistance.cu b/faiss/gpu/GpuDistance.cu index 38a62f03bb..599f4a3072 100644 --- a/faiss/gpu/GpuDistance.cu +++ b/faiss/gpu/GpuDistance.cu @@ -51,12 +51,18 @@ using namespace raft::distance; using namespace raft::neighbors; #endif +/// Caches device major version +int device_major_version = -1; + bool should_use_raft(GpuDistanceParams args) { - cudaDeviceProp prop; - int dev = args.device >= 0 ? args.device : getCurrentDevice(); - cudaGetDeviceProperties(&prop, dev); + if (device_major_version < 0) { + cudaDeviceProp prop; + int dev = args.device >= 0 ? args.device : getCurrentDevice(); + cudaGetDeviceProperties(&prop, dev); + device_major_version = prop.major; + } - if (prop.major < 7) + if (device_major_version < 7) return false; return args.use_raft; diff --git a/faiss/gpu/GpuIndex.cu b/faiss/gpu/GpuIndex.cu index d1ae3b5384..f91b7dc9c5 100644 --- a/faiss/gpu/GpuIndex.cu +++ b/faiss/gpu/GpuIndex.cu @@ -42,11 +42,17 @@ constexpr idx_t kAddVecSize = (idx_t)512 * 1024; // FIXME: parameterize based on algorithm need constexpr idx_t kSearchVecSize = (idx_t)32 * 1024; +/// Caches device major version +extern int device_major_version; + bool should_use_raft(GpuIndexConfig config_) { - cudaDeviceProp prop; - cudaGetDeviceProperties(&prop, config_.device); + if (device_major_version < 0) { + cudaDeviceProp prop; + cudaGetDeviceProperties(&prop, config_.device); + device_major_version = prop.major; + } - if (prop.major < 7) + if (device_major_version < 7) return false; return config_.use_raft; From 68f66bc26ce2bc605624245b735f1c28f2460ee6 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Wed, 16 Oct 2024 10:16:27 -0700 Subject: [PATCH 08/21] Fix shadowed variable in faiss/IndexIVFAdditiveQuantizer.cpp (#3958) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3958 Our upcoming compiler upgrade will require us not to have shadowed variables. Such variables have a _high_ bug rate and reduce readability, so we would like to avoid them even if the compiler was not forcing us to do so. This codemod attempts to fix an instance of a shadowed variable. Please review with care: if it's failed the result will be a silent bug. **What's a shadowed variable?** Shadowed variables are variables in an inner scope with the same name as another variable in an outer scope. Having the same name for both variables might be semantically correct, but it can make the code confusing to read! It can also hide subtle bugs. This diff fixes such an issue by renaming the variable. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: meyering Differential Revision: D64398701 fbshipit-source-id: 9f7b417bf6e8da6758f9cac4167a8b581bfed8b7 --- faiss/IndexIVFAdditiveQuantizer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/faiss/IndexIVFAdditiveQuantizer.cpp b/faiss/IndexIVFAdditiveQuantizer.cpp index 19b23dab99..1b1a4571de 100644 --- a/faiss/IndexIVFAdditiveQuantizer.cpp +++ b/faiss/IndexIVFAdditiveQuantizer.cpp @@ -186,10 +186,10 @@ struct AQInvertedListScannerDecompress : AQInvertedListScanner { float coarse_dis = 0; /// following codes come from this inverted list - void set_list(idx_t list_no, float coarse_dis) override { - AQInvertedListScanner::set_list(list_no, coarse_dis); + void set_list(idx_t list_no, float coarse_dis_2) override { + AQInvertedListScanner::set_list(list_no, coarse_dis_2); if (ia.by_residual) { - this->coarse_dis = coarse_dis; + this->coarse_dis = coarse_dis_2; } } From c93d1fd105e716fabc2f52a2451da1a21f8fdda7 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Wed, 16 Oct 2024 12:42:03 -0700 Subject: [PATCH 09/21] Fix shadowed variable in faiss/impl/HNSW.cpp (#3961) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3961 Our upcoming compiler upgrade will require us not to have shadowed variables. Such variables have a _high_ bug rate and reduce readability, so we would like to avoid them even if the compiler was not forcing us to do so. This codemod attempts to fix an instance of a shadowed variable. Please review with care: if it's failed the result will be a silent bug. **What's a shadowed variable?** Shadowed variables are variables in an inner scope with the same name as another variable in an outer scope. Having the same name for both variables might be semantically correct, but it can make the code confusing to read! It can also hide subtle bugs. This diff fixes such an issue by renaming the variable. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: meyering Differential Revision: D64398743 fbshipit-source-id: 3ec24a1655133ee0d3b94a55e38857ffa8853268 --- faiss/impl/HNSW.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/faiss/impl/HNSW.cpp b/faiss/impl/HNSW.cpp index c3693fd906..930cf52ce6 100644 --- a/faiss/impl/HNSW.cpp +++ b/faiss/impl/HNSW.cpp @@ -166,10 +166,10 @@ void HNSW::print_neighbor_stats(int level) const { } void HNSW::fill_with_random_links(size_t n) { - int max_level = prepare_level_tab(n); + int max_level_2 = prepare_level_tab(n); RandomGenerator rng2(456); - for (int level = max_level - 1; level >= 0; --level) { + for (int level = max_level_2 - 1; level >= 0; --level) { std::vector elts; for (int i = 0; i < n; i++) { if (levels[i] > level) { @@ -210,16 +210,16 @@ int HNSW::prepare_level_tab(size_t n, bool preset_levels) { } } - int max_level = 0; + int max_level_2 = 0; for (int i = 0; i < n; i++) { int pt_level = levels[i + n0] - 1; - if (pt_level > max_level) - max_level = pt_level; + if (pt_level > max_level_2) + max_level_2 = pt_level; offsets.push_back(offsets.back() + cum_nb_neighbors(pt_level + 1)); } neighbors.resize(offsets.back(), -1); - return max_level; + return max_level_2; } /** Enumerate vertices from nearest to farthest from query, keep a @@ -493,17 +493,17 @@ void HNSW::add_links_starting_from( ::faiss::shrink_neighbor_list(ptdis, link_targets, M, keep_max_size_level0); - std::vector neighbors; - neighbors.reserve(link_targets.size()); + std::vector neighbors_2; + neighbors_2.reserve(link_targets.size()); while (!link_targets.empty()) { storage_idx_t other_id = link_targets.top().id; add_link(*this, ptdis, pt_id, other_id, level, keep_max_size_level0); - neighbors.push_back(other_id); + neighbors_2.push_back(other_id); link_targets.pop(); } omp_unset_lock(&locks[pt_id]); - for (storage_idx_t other_id : neighbors) { + for (storage_idx_t other_id : neighbors_2) { omp_set_lock(&locks[other_id]); add_link(*this, ptdis, other_id, pt_id, level, keep_max_size_level0); omp_unset_lock(&locks[other_id]); From d492753bd9992284e5ac84bd981cf868801ecf61 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Wed, 16 Oct 2024 12:44:27 -0700 Subject: [PATCH 10/21] Fix shadowed variable in faiss/impl/simd_result_handlers.h (#3960) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3960 Our upcoming compiler upgrade will require us not to have shadowed variables. Such variables have a _high_ bug rate and reduce readability, so we would like to avoid them even if the compiler was not forcing us to do so. This codemod attempts to fix an instance of a shadowed variable. Please review with care: if it's failed the result will be a silent bug. **What's a shadowed variable?** Shadowed variables are variables in an inner scope with the same name as another variable in an outer scope. Having the same name for both variables might be semantically correct, but it can make the code confusing to read! It can also hide subtle bugs. This diff fixes such an issue by renaming the variable. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: meyering Differential Revision: D64398709 fbshipit-source-id: b10e44b40aa1d3e21aeb5112eb93fb63d64d4118 --- faiss/impl/simd_result_handlers.h | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/faiss/impl/simd_result_handlers.h b/faiss/impl/simd_result_handlers.h index eaf64c4b27..b8d89abc98 100644 --- a/faiss/impl/simd_result_handlers.h +++ b/faiss/impl/simd_result_handlers.h @@ -368,10 +368,10 @@ struct HeapHandler : ResultHandlerCompare { auto real_idx = this->adjust_id(b, j); lt_mask -= 1 << j; if (this->sel->is_member(real_idx)) { - T dis = d32tab[j]; - if (C::cmp(heap_dis[0], dis)) { + T dis_2 = d32tab[j]; + if (C::cmp(heap_dis[0], dis_2)) { heap_replace_top( - k, heap_dis, heap_ids, dis, real_idx); + k, heap_dis, heap_ids, dis_2, real_idx); } } } @@ -380,10 +380,10 @@ struct HeapHandler : ResultHandlerCompare { // find first non-zero int j = __builtin_ctz(lt_mask); lt_mask -= 1 << j; - T dis = d32tab[j]; - if (C::cmp(heap_dis[0], dis)) { + T dis_2 = d32tab[j]; + if (C::cmp(heap_dis[0], dis_2)) { int64_t idx = this->adjust_id(b, j); - heap_replace_top(k, heap_dis, heap_ids, dis, idx); + heap_replace_top(k, heap_dis, heap_ids, dis_2, idx); } } } @@ -480,8 +480,8 @@ struct ReservoirHandler : ResultHandlerCompare { auto real_idx = this->adjust_id(b, j); lt_mask -= 1 << j; if (this->sel->is_member(real_idx)) { - T dis = d32tab[j]; - res.add(dis, real_idx); + T dis_2 = d32tab[j]; + res.add(dis_2, real_idx); } } } else { @@ -489,8 +489,8 @@ struct ReservoirHandler : ResultHandlerCompare { // find first non-zero int j = __builtin_ctz(lt_mask); lt_mask -= 1 << j; - T dis = d32tab[j]; - res.add(dis, this->adjust_id(b, j)); + T dis_2 = d32tab[j]; + res.add(dis_2, this->adjust_id(b, j)); } } } @@ -719,10 +719,10 @@ void dispatch_SIMDResultHandler_fixedCW( Types... args) { if (auto resh = dynamic_cast*>(&res)) { consumer.template f>(*resh, args...); - } else if (auto resh = dynamic_cast*>(&res)) { - consumer.template f>(*resh, args...); - } else if (auto resh = dynamic_cast*>(&res)) { - consumer.template f>(*resh, args...); + } else if (auto resh_2 = dynamic_cast*>(&res)) { + consumer.template f>(*resh_2, args...); + } else if (auto resh_2 = dynamic_cast*>(&res)) { + consumer.template f>(*resh_2, args...); } else { // generic handler -- will not be inlined FAISS_THROW_IF_NOT_FMT( simd_result_handlers_accept_virtual, @@ -752,8 +752,8 @@ void dispatch_SIMDResultHandler( if (res.sizeof_ids == 0) { if (auto resh = dynamic_cast(&res)) { consumer.template f(*resh, args...); - } else if (auto resh = dynamic_cast(&res)) { - consumer.template f(*resh, args...); + } else if (auto resh_2 = dynamic_cast(&res)) { + consumer.template f(*resh_2, args...); } else { // generic path FAISS_THROW_IF_NOT_FMT( simd_result_handlers_accept_virtual, From 1a799d014b07aea1fca6788691078054f7865f4c Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Wed, 16 Oct 2024 19:35:42 -0700 Subject: [PATCH 11/21] Fix shadowed variable in faiss/utils/NeuralNet.cpp (#3952) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3952 Our upcoming compiler upgrade will require us not to have shadowed variables. Such variables have a _high_ bug rate and reduce readability, so we would like to avoid them even if the compiler was not forcing us to do so. This codemod attempts to fix an instance of a shadowed variable. Please review with care: if it's failed the result will be a silent bug. **What's a shadowed variable?** Shadowed variables are variables in an inner scope with the same name as another variable in an outer scope. Having the same name for both variables might be semantically correct, but it can make the code confusing to read! It can also hide subtle bugs. This diff fixes such an issue by renaming the variable. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: asadoughi Differential Revision: D64398749 fbshipit-source-id: 0e8fd4ab8f6dbf780d4412083fa88fc0df3b89c2 --- faiss/utils/NeuralNet.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/faiss/utils/NeuralNet.cpp b/faiss/utils/NeuralNet.cpp index 9d5465bae8..9d25b24c4c 100644 --- a/faiss/utils/NeuralNet.cpp +++ b/faiss/utils/NeuralNet.cpp @@ -212,19 +212,19 @@ nn::Int32Tensor2D QINCoStep::encode( // repeated codebook Tensor2D zqs_r(n * K, d); // size n, K, d Tensor2D cc(n * K, d * 2); // size n, K, d * 2 - size_t d = this->d; + size_t d_2 = this->d; - auto copy_row = [d](Tensor2D& t, size_t i, size_t j, const float* data) { + auto copy_row = [d_2](Tensor2D& t, size_t i, size_t j, const float* data) { assert(i <= t.shape[0] && j <= t.shape[1]); - memcpy(t.data() + i * t.shape[1] + j, data, sizeof(float) * d); + memcpy(t.data() + i * t.shape[1] + j, data, sizeof(float) * d_2); }; // manual broadcasting for (size_t i = 0; i < n; i++) { for (size_t j = 0; j < K; j++) { - copy_row(zqs_r, i * K + j, 0, codebook.data() + j * d); - copy_row(cc, i * K + j, 0, codebook.data() + j * d); - copy_row(cc, i * K + j, d, xhat.data() + i * d); + copy_row(zqs_r, i * K + j, 0, codebook.data() + j * d_2); + copy_row(cc, i * K + j, 0, codebook.data() + j * d_2); + copy_row(cc, i * K + j, d_2, xhat.data() + i * d_2); } } @@ -237,13 +237,13 @@ nn::Int32Tensor2D QINCoStep::encode( // add the xhat for (size_t i = 0; i < n; i++) { - float* zqs_r_row = zqs_r.data() + i * K * d; - const float* xhat_row = xhat.data() + i * d; + float* zqs_r_row = zqs_r.data() + i * K * d_2; + const float* xhat_row = xhat.data() + i * d_2; for (size_t l = 0; l < K; l++) { - for (size_t j = 0; j < d; j++) { + for (size_t j = 0; j < d_2; j++) { zqs_r_row[j] += xhat_row[j]; } - zqs_r_row += d; + zqs_r_row += d_2; } } @@ -252,31 +252,31 @@ nn::Int32Tensor2D QINCoStep::encode( float* res = nullptr; if (residuals) { FAISS_THROW_IF_NOT( - residuals->shape[0] == n && residuals->shape[1] == d); + residuals->shape[0] == n && residuals->shape[1] == d_2); res = residuals->data(); } for (size_t i = 0; i < n; i++) { - const float* q = x.data() + i * d; - const float* db = zqs_r.data() + i * K * d; + const float* q = x.data() + i * d_2; + const float* db = zqs_r.data() + i * K * d_2; float dis_min = HUGE_VALF; int64_t idx = -1; for (size_t j = 0; j < K; j++) { - float dis = fvec_L2sqr(q, db, d); + float dis = fvec_L2sqr(q, db, d_2); if (dis < dis_min) { dis_min = dis; idx = j; } - db += d; + db += d_2; } codes.v[i] = idx; if (res) { - const float* xhat_row = xhat.data() + i * d; - const float* xhat_next_row = zqs_r.data() + (i * K + idx) * d; - for (size_t j = 0; j < d; j++) { + const float* xhat_row = xhat.data() + i * d_2; + const float* xhat_next_row = zqs_r.data() + (i * K + idx) * d_2; + for (size_t j = 0; j < d_2; j++) { res[j] = xhat_next_row[j] - xhat_row[j]; } - res += d; + res += d_2; } } return codes; From 6617b13fd5956682764e0188eb7ef3639749c1b4 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Fri, 18 Oct 2024 14:58:34 -0700 Subject: [PATCH 12/21] Consolidate set_target_properties() calls in faiss/CMakeLists.txt (#3973) Summary: All of the targets get the same properties and values, so combine them all into one set_target_properties() call for brevity. Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3973 Reviewed By: ramilbakhshyiev Differential Revision: D64618572 Pulled By: asadoughi fbshipit-source-id: 6cff95206de936246c015fb81ce324a620ba23fb --- faiss/CMakeLists.txt | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/faiss/CMakeLists.txt b/faiss/CMakeLists.txt index 2871d9747c..d0e46e5b32 100644 --- a/faiss/CMakeLists.txt +++ b/faiss/CMakeLists.txt @@ -302,19 +302,7 @@ target_include_directories(faiss_avx512 PUBLIC target_include_directories(faiss_sve PUBLIC $) -set_target_properties(faiss PROPERTIES - POSITION_INDEPENDENT_CODE ON - WINDOWS_EXPORT_ALL_SYMBOLS ON -) -set_target_properties(faiss_avx2 PROPERTIES - POSITION_INDEPENDENT_CODE ON - WINDOWS_EXPORT_ALL_SYMBOLS ON -) -set_target_properties(faiss_avx512 PROPERTIES - POSITION_INDEPENDENT_CODE ON - WINDOWS_EXPORT_ALL_SYMBOLS ON -) -set_target_properties(faiss_sve PROPERTIES +set_target_properties(faiss faiss_avx2 faiss_avx512 faiss_sve PROPERTIES POSITION_INDEPENDENT_CODE ON WINDOWS_EXPORT_ALL_SYMBOLS ON ) From f9a01c65c08c4ddd2b194d4f92f6cb20d0b52705 Mon Sep 17 00:00:00 2001 From: Michael Pittard Date: Fri, 18 Oct 2024 15:42:10 -0700 Subject: [PATCH 13/21] 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 --- .github/actions/build_cmake/action.yml | 4 - CMakeLists.txt | 1 + INSTALL.md | 4 +- faiss/gpu/hipify.sh | 266 +++++++++---------------- 4 files changed, 95 insertions(+), 180 deletions(-) diff --git a/.github/actions/build_cmake/action.yml b/.github/actions/build_cmake/action.yml index ad3811f473..2e32dc1578 100644 --- a/.github/actions/build_cmake/action.yml +++ b/.github/actions/build_cmake/action.yml @@ -101,10 +101,6 @@ runs: sudo apt-get -qq autoclean >/dev/null sudo apt-get -qq clean >/dev/null sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - - name: ROCm - Hipify - if: inputs.rocm == 'ON' - shell: bash - run: ./faiss/gpu/hipify.sh - name: Symblink system dependencies if: inputs.raft == 'ON' || inputs.rocm == 'ON' shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index c4fea46a3d..03d2b496eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,7 @@ if(FAISS_ENABLE_GPU) find_package(HIP REQUIRED) find_package(hipBLAS REQUIRED) set(GPU_EXT_PREFIX "hip") + execute_process(COMMAND ${PROJECT_SOURCE_DIR}/faiss/gpu/hipify.sh) else () set(CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER}) enable_language(CUDA) diff --git a/INSTALL.md b/INSTALL.md index d4e2326ffb..e6d3f33fb8 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -147,9 +147,7 @@ Several options can be passed to CMake, among which: to build against (see [CUDA docs](https://developer.nvidia.com/cuda-gpus) to determine which architecture(s) you should pick), - `-DFAISS_ENABLE_ROCM=ON` in order to enable building GPU indices for AMD GPUs. - The hipify script must be executed before using this option. - Invoke `./faiss/gpu/hipify.sh` to execute. `-DFAISS_ENABLE_GPU` must be `ON` - when using this option. (possible values are `ON` and `OFF`), + `-DFAISS_ENABLE_GPU` must be `ON` when using this option. (possible values are `ON` and `OFF`), - python-related options: - `-DPython_EXECUTABLE=/path/to/python3.7` in order to build a python interface for a different python than the default one (see diff --git a/faiss/gpu/hipify.sh b/faiss/gpu/hipify.sh index c8d75bf2fa..2b65854205 100755 --- a/faiss/gpu/hipify.sh +++ b/faiss/gpu/hipify.sh @@ -4,101 +4,87 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -# go one level up from faiss/gpu -top=$(dirname "${BASH_SOURCE[0]}")/.. -echo "top=$top" -cd "$top" || exit -echo "pwd=$(pwd)" +function hipify_dir() +{ + # print dir name + cd "$1" || exit + echo "Hipifying $(pwd)" -# create all destination directories for hipified files into sibling 'gpu-rocm' directory -while IFS= read -r -d '' src -do - dst="${src//gpu/gpu-rocm}" - echo "Creating $dst" - mkdir -p "$dst" -done < <(find ./gpu -type d -print0) - -# run hipify-perl against all *.cu *.cuh *.h *.cpp files, no renaming -# run all files in parallel to speed up -for ext in cu cuh h cpp -do + # create all destination directories for hipified files into sibling 'gpu-rocm' directory while IFS= read -r -d '' src do - dst="${src//\.\/gpu/\.\/gpu-rocm}" - hipify-perl -o="$dst.tmp" "$src" & - done < <(find ./gpu -name "*.$ext" -print0) -done -wait + dst="${src//gpu/gpu-rocm}" -# rename all hipified *.cu files to *.hip -while IFS= read -r -d '' src -do - dst=${src%.cu.tmp}.hip.tmp - mv "$src" "$dst" -done < <(find ./gpu-rocm -name "*.cu.tmp" -print0) + if [ -d $dst ]; then + #Clearing out any leftover files and directories + echo "Removing old $dst" + rm -rf "$dst" + fi -# replace header include statements "@#include @' "$src" - sed -i 's@#include @#include @' "$src" - done < <(find ./gpu-rocm -name "*.$ext.tmp" -print0) -done + #Making directories + echo "Creating $dst" + mkdir -p "$dst" + done < <(find ./gpu -type d -print0) -# hipify was run in parallel above -# don't copy the tmp file if it is unchanged -for ext in hip cuh h cpp -do + # run hipify-perl against all *.cu *.cuh *.h *.cpp files, no renaming + # run all files in parallel to speed up + for ext in cu cuh h cpp c + do + while IFS= read -r -d '' src + do + dst="${src//\.\/gpu/\.\/gpu-rocm}" + hipify-perl -o="$dst.tmp" "$src" & + done < <(find ./gpu -name "*.$ext" -print0) + done + wait + + # rename all hipified *.cu files to *.hip while IFS= read -r -d '' src do - dst=${src%.tmp} - if test -f "$dst" - then - if diff -q "$src" "$dst" >& /dev/null + dst=${src%.cu.tmp}.hip.tmp + mv "$src" "$dst" + done < <(find ./gpu-rocm -name "*.cu.tmp" -print0) + + # replace header include statements "@#include @' "$src" + sed -i 's@#include @#include @' "$src" + done < <(find ./gpu-rocm -name "*.$ext.tmp" -print0) + done + + # hipify was run in parallel above + # don't copy the tmp file if it is unchanged + for ext in hip cuh h cpp c + do + while IFS= read -r -d '' src + do + dst=${src%.tmp} + if test -f "$dst" then - echo "$dst [unchanged]" - rm "$src" + if diff -q "$src" "$dst" >& /dev/null + then + echo "$dst [unchanged]" + rm "$src" + else + echo "$dst" + mv "$src" "$dst" + fi else echo "$dst" mv "$src" "$dst" fi - else - echo "$dst" - mv "$src" "$dst" - fi - done < <(find ./gpu-rocm -name "*.$ext.tmp" -print0) -done - -# copy over CMakeLists.txt -while IFS= read -r -d '' src -do - dst="${src//\.\/gpu/\.\/gpu-rocm}" - if test -f "$dst" - then - if diff -q "$src" "$dst" >& /dev/null - then - echo "$dst [unchanged]" - else - echo "$dst" - cp "$src" "$dst" - fi - else - echo "$dst" - cp "$src" "$dst" - fi -done < <(find ./gpu -name "CMakeLists.txt" -print0) + done < <(find ./gpu-rocm -name "*.$ext.tmp" -print0) + done -# Copy over other files -other_exts="py" -for ext in $other_exts -do + # copy over CMakeLists.txt while IFS= read -r -d '' src do dst="${src//\.\/gpu/\.\/gpu-rocm}" @@ -115,102 +101,36 @@ do echo "$dst" cp "$src" "$dst" fi - done < <(find ./gpu -name "*.$ext" -print0) -done - -################################################################################### -# C_API Support -################################################################################### - -# Now get the c_api dir -# This points to the faiss/c_api dir -top_c_api=$(dirname "${BASH_SOURCE[0]}")/../../c_api -echo "top=$top_c_api" -cd "../$top_c_api" || exit -echo "pwd=$(pwd)" - - -# create all destination directories for hipified files into sibling 'gpu-rocm' directory -while IFS= read -r -d '' src -do - dst="${src//gpu/gpu-rocm}" - echo "Creating $dst" - mkdir -p "$dst" -done < <(find ./gpu -type d -print0) + done < <(find ./gpu -name "CMakeLists.txt" -print0) -# run hipify-perl against all *.cu *.cuh *.h *.cpp files, no renaming -# run all files in parallel to speed up -for ext in cu cuh h cpp c -do - while IFS= read -r -d '' src - do - dst="${src//\.\/gpu/\.\/gpu-rocm}" - hipify-perl -o="$dst.tmp" "$src" & - done < <(find ./gpu -name "*.$ext" -print0) -done -wait - -# rename all hipified *.cu files to *.hip -while IFS= read -r -d '' src -do - dst=${src%.cu.tmp}.hip.tmp - mv "$src" "$dst" -done < <(find ./gpu-rocm -name "*.cu.tmp" -print0) - -# replace header include statements "@#include @' "$src" - sed -i 's@#include @#include @' "$src" - done < <(find ./gpu-rocm -name "*.$ext.tmp" -print0) -done - -# hipify was run in parallel above -# don't copy the tmp file if it is unchanged -for ext in hip cuh h cpp c -do - while IFS= read -r -d '' src - do - dst=${src%.tmp} - if test -f "$dst" - then - if diff -q "$src" "$dst" >& /dev/null + while IFS= read -r -d '' src + do + dst="${src//\.\/gpu/\.\/gpu-rocm}" + if test -f "$dst" then - echo "$dst [unchanged]" - rm "$src" + if diff -q "$src" "$dst" >& /dev/null + then + echo "$dst [unchanged]" + else + echo "$dst" + cp "$src" "$dst" + fi else echo "$dst" - mv "$src" "$dst" + cp "$src" "$dst" fi - else - echo "$dst" - mv "$src" "$dst" - fi - done < <(find ./gpu-rocm -name "*.$ext.tmp" -print0) -done + done < <(find ./gpu -name "*.$ext" -print0) + done +} -# copy over CMakeLists.txt -while IFS= read -r -d '' src -do - dst="${src//\.\/gpu/\.\/gpu-rocm}" - if test -f "$dst" - then - if diff -q "$src" "$dst" >& /dev/null - then - echo "$dst [unchanged]" - else - echo "$dst" - cp "$src" "$dst" - fi - else - echo "$dst" - cp "$src" "$dst" - fi -done < <(find ./gpu -name "CMakeLists.txt" -print0) +# Convert the faiss/gpu dir +dir_name=$(dirname "${BASH_SOURCE[0]}")/.. +hipify_dir $dir_name + +# Convert the faiss/c_api dir +dir_name=$(dirname "${BASH_SOURCE[0]}")/../../c_api +hipify_dir $dir_name From fd6d784114b06c2ed8e8d10f69be1d9a7ba99355 Mon Sep 17 00:00:00 2001 From: Michael Norris Date: Sun, 20 Oct 2024 18:07:08 -0700 Subject: [PATCH 14/21] Resolve "incorrect-portions-license" errors: add no license lint to top of GPU files with both licenses (#3965) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3965 End goal: add some lint to prevent files landing without any header. This creates churn for the oncall. Example is the last diff in this stack: D64488600 This is the first diff in enabling linting. I wanted the diff which updates all files to be just the automated command and the .toml config files changes, so this diff is a preparation step. This particular diff solves: we get errors due to having both NVidia and FB license comment headers in the same files. See the errors in D64429711 under "linter-coverage-verification" signal. Context on linting: https://fb.workplace.com/groups/lintqa/posts/3762373340693743/?comment_id=3762915930639484&reply_comment_id=3763044163959994 Per OSS, we cannot remove the Nvidia notice: https://fb.workplace.com/groups/osssupport/posts/27179779734977284/?comment_id=27181801724775085&reply_comment_id=27181818148106776 So, we add the lint ignore here. Reviewed By: asadoughi Differential Revision: D64481766 fbshipit-source-id: 0468104a095831cac7dd5bf3c519cfb5a2ee1575 --- CMakeLists.txt | 1 + cmake/FindMKL.cmake | 3 ++- cmake/link_to_faiss_lib.cmake | 3 ++- faiss/gpu/GpuDistance.cu | 1 + faiss/gpu/GpuIndex.h | 1 + faiss/gpu/GpuIndexCagra.cu | 1 + faiss/gpu/GpuIndexCagra.h | 1 + faiss/gpu/GpuResources.cpp | 1 + faiss/gpu/GpuResources.h | 1 + faiss/gpu/StandardGpuResources.cpp | 1 + faiss/gpu/StandardGpuResources.h | 1 + faiss/gpu/impl/FlatIndex.cu | 1 + faiss/gpu/impl/FlatIndex.cuh | 1 + faiss/gpu/impl/RaftCagra.cu | 1 + faiss/gpu/impl/RaftCagra.cuh | 1 + faiss/gpu/impl/RaftFlatIndex.cu | 1 + faiss/gpu/impl/RaftFlatIndex.cuh | 1 + faiss/gpu/impl/RaftIVFFlat.cu | 1 + faiss/gpu/impl/RaftIVFFlat.cuh | 1 + faiss/gpu/impl/RaftIVFPQ.cu | 1 + faiss/gpu/impl/RaftIVFPQ.cuh | 1 + faiss/gpu/test/TestGpuDistance.cu | 1 + faiss/gpu/test/TestGpuIndexCagra.cu | 1 + faiss/gpu/test/TestGpuIndexIVFFlat.cpp | 1 + faiss/gpu/utils/RaftUtils.cu | 1 + faiss/gpu/utils/RaftUtils.h | 1 + 26 files changed, 28 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03d2b496eb..4dab5900aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,4 @@ +# @lint-ignore-every LICENSELINT # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # diff --git a/cmake/FindMKL.cmake b/cmake/FindMKL.cmake index 460b86ad58..4504859c27 100644 --- a/cmake/FindMKL.cmake +++ b/cmake/FindMKL.cmake @@ -1,4 +1,5 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# @lint-ignore-every LICENSELINT +# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the diff --git a/cmake/link_to_faiss_lib.cmake b/cmake/link_to_faiss_lib.cmake index 83bdaefaaf..0573c3c74e 100644 --- a/cmake/link_to_faiss_lib.cmake +++ b/cmake/link_to_faiss_lib.cmake @@ -1,4 +1,5 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# @lint-ignore-every LICENSELINT +# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the diff --git a/faiss/gpu/GpuDistance.cu b/faiss/gpu/GpuDistance.cu index 599f4a3072..d5082bbee7 100644 --- a/faiss/gpu/GpuDistance.cu +++ b/faiss/gpu/GpuDistance.cu @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/GpuIndex.h b/faiss/gpu/GpuIndex.h index cc10f21589..4098e6a101 100644 --- a/faiss/gpu/GpuIndex.h +++ b/faiss/gpu/GpuIndex.h @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/GpuIndexCagra.cu b/faiss/gpu/GpuIndexCagra.cu index 4ae56df10d..fb90758f78 100644 --- a/faiss/gpu/GpuIndexCagra.cu +++ b/faiss/gpu/GpuIndexCagra.cu @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/GpuIndexCagra.h b/faiss/gpu/GpuIndexCagra.h index 6ecee3ae03..9c39e6a95a 100644 --- a/faiss/gpu/GpuIndexCagra.h +++ b/faiss/gpu/GpuIndexCagra.h @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/GpuResources.cpp b/faiss/gpu/GpuResources.cpp index 1ed3a6ddd5..7cb5905315 100644 --- a/faiss/gpu/GpuResources.cpp +++ b/faiss/gpu/GpuResources.cpp @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/GpuResources.h b/faiss/gpu/GpuResources.h index fc6dd591b4..8edd8f3d81 100644 --- a/faiss/gpu/GpuResources.h +++ b/faiss/gpu/GpuResources.h @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/StandardGpuResources.cpp b/faiss/gpu/StandardGpuResources.cpp index 059a6049de..4aad6ea1f1 100644 --- a/faiss/gpu/StandardGpuResources.cpp +++ b/faiss/gpu/StandardGpuResources.cpp @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/StandardGpuResources.h b/faiss/gpu/StandardGpuResources.h index 661c784aee..7a48948663 100644 --- a/faiss/gpu/StandardGpuResources.h +++ b/faiss/gpu/StandardGpuResources.h @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/impl/FlatIndex.cu b/faiss/gpu/impl/FlatIndex.cu index 64c4a3d7c0..0f22737892 100644 --- a/faiss/gpu/impl/FlatIndex.cu +++ b/faiss/gpu/impl/FlatIndex.cu @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/impl/FlatIndex.cuh b/faiss/gpu/impl/FlatIndex.cuh index d1610f7244..7b92976942 100644 --- a/faiss/gpu/impl/FlatIndex.cuh +++ b/faiss/gpu/impl/FlatIndex.cuh @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/impl/RaftCagra.cu b/faiss/gpu/impl/RaftCagra.cu index 292079321d..e0f302ae04 100644 --- a/faiss/gpu/impl/RaftCagra.cu +++ b/faiss/gpu/impl/RaftCagra.cu @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/impl/RaftCagra.cuh b/faiss/gpu/impl/RaftCagra.cuh index 95f6c03fca..39d7d75765 100644 --- a/faiss/gpu/impl/RaftCagra.cuh +++ b/faiss/gpu/impl/RaftCagra.cuh @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/impl/RaftFlatIndex.cu b/faiss/gpu/impl/RaftFlatIndex.cu index 24a6d39604..c06ca62cb5 100644 --- a/faiss/gpu/impl/RaftFlatIndex.cu +++ b/faiss/gpu/impl/RaftFlatIndex.cu @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/impl/RaftFlatIndex.cuh b/faiss/gpu/impl/RaftFlatIndex.cuh index d3823bbf58..9d20fade61 100644 --- a/faiss/gpu/impl/RaftFlatIndex.cuh +++ b/faiss/gpu/impl/RaftFlatIndex.cuh @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/impl/RaftIVFFlat.cu b/faiss/gpu/impl/RaftIVFFlat.cu index 0906a60f46..181cf94968 100644 --- a/faiss/gpu/impl/RaftIVFFlat.cu +++ b/faiss/gpu/impl/RaftIVFFlat.cu @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/impl/RaftIVFFlat.cuh b/faiss/gpu/impl/RaftIVFFlat.cuh index 4f8c89ecb0..a2dcef6ce5 100644 --- a/faiss/gpu/impl/RaftIVFFlat.cuh +++ b/faiss/gpu/impl/RaftIVFFlat.cuh @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/impl/RaftIVFPQ.cu b/faiss/gpu/impl/RaftIVFPQ.cu index 3a2a0a4218..15f49bbffd 100644 --- a/faiss/gpu/impl/RaftIVFPQ.cu +++ b/faiss/gpu/impl/RaftIVFPQ.cu @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/impl/RaftIVFPQ.cuh b/faiss/gpu/impl/RaftIVFPQ.cuh index a79db3c40d..9a54dda79b 100644 --- a/faiss/gpu/impl/RaftIVFPQ.cuh +++ b/faiss/gpu/impl/RaftIVFPQ.cuh @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/test/TestGpuDistance.cu b/faiss/gpu/test/TestGpuDistance.cu index 3c59cc1a5f..11ed085edd 100644 --- a/faiss/gpu/test/TestGpuDistance.cu +++ b/faiss/gpu/test/TestGpuDistance.cu @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/test/TestGpuIndexCagra.cu b/faiss/gpu/test/TestGpuIndexCagra.cu index a368e496c5..7f2ba6821a 100644 --- a/faiss/gpu/test/TestGpuIndexCagra.cu +++ b/faiss/gpu/test/TestGpuIndexCagra.cu @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/test/TestGpuIndexIVFFlat.cpp b/faiss/gpu/test/TestGpuIndexIVFFlat.cpp index 28eefec308..df71e9e3fe 100644 --- a/faiss/gpu/test/TestGpuIndexIVFFlat.cpp +++ b/faiss/gpu/test/TestGpuIndexIVFFlat.cpp @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/utils/RaftUtils.cu b/faiss/gpu/utils/RaftUtils.cu index ba40c54c26..a759336eb9 100644 --- a/faiss/gpu/utils/RaftUtils.cu +++ b/faiss/gpu/utils/RaftUtils.cu @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/faiss/gpu/utils/RaftUtils.h b/faiss/gpu/utils/RaftUtils.h index 4dfafa4ec5..59ee1442f0 100644 --- a/faiss/gpu/utils/RaftUtils.h +++ b/faiss/gpu/utils/RaftUtils.h @@ -1,3 +1,4 @@ +// @lint-ignore-every LICENSELINT /** * Copyright (c) Facebook, Inc. and its affiliates. * From adcde10e50f25a5f0e00b5534e9a1bbb6d4eb0e1 Mon Sep 17 00:00:00 2001 From: Matthijs Douze Date: Mon, 21 Oct 2024 06:33:11 -0700 Subject: [PATCH 15/21] Allow to replace graph structure for NSG graphs (#3975) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3975 Graph-based indices are often quite bulky in terms of storage becausee the out-degree of the edges is high (32 or more) and edges are just encoded as 32-bit ints. This diff makes it possible to replace the graph structure of NSG with a compressed version, but only for search (the full graph needs to be present at addition time). It is easier to do it for NSG than for HNSW for several reasons: - NSG's graph is not hierarichal -- HNSW is and the edges for the different levels are interleaved - the NSG graph object is already isolated well (thanks KingLittleQ!) - NSG cannot be built incrementally so it is easier to convert the graph after all adds are done in one go. The custom compressed graph is currently only implemented as a test, but could be integrated in the main Faiss as an option to NSG. Reviewed By: algoriddle Differential Revision: D64646137 fbshipit-source-id: c10c2a485b44561d32941ce1e7a0e3fe512cf0ac --- faiss/impl/NSG.cpp | 44 ++++++++------- faiss/impl/NSG.h | 24 ++++++-- tests/test_NSG_compressed_graph.cpp | 85 +++++++++++++++++++++++++++++ 3 files changed, 128 insertions(+), 25 deletions(-) create mode 100644 tests/test_NSG_compressed_graph.cpp diff --git a/faiss/impl/NSG.cpp b/faiss/impl/NSG.cpp index c974943343..0aa8197ada 100644 --- a/faiss/impl/NSG.cpp +++ b/faiss/impl/NSG.cpp @@ -5,8 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// -*- c++ -*- - #include #include @@ -18,14 +16,16 @@ namespace faiss { -namespace nsg { - namespace { +using LockGuard = std::lock_guard; + // It needs to be smaller than 0 constexpr int EMPTY_ID = -1; -} // namespace +} // anonymous namespace + +namespace nsg { DistanceComputer* storage_distance_computer(const Index* storage) { if (is_similarity_metric(storage->metric_type)) { @@ -35,14 +35,8 @@ DistanceComputer* storage_distance_computer(const Index* storage) { } } -} // namespace nsg - -using namespace nsg; - -using LockGuard = std::lock_guard; - struct Neighbor { - int id; + int32_t id; float distance; bool flag; @@ -56,7 +50,7 @@ struct Neighbor { }; struct Node { - int id; + int32_t id; float distance; Node() = default; @@ -65,6 +59,11 @@ struct Node { inline bool operator<(const Node& other) const { return distance < other.distance; } + + // to keep the compiler happy + inline bool operator<(int other) const { + return id < other; + } }; inline int insert_into_pool(Neighbor* addr, int K, Neighbor nn) { @@ -106,6 +105,10 @@ inline int insert_into_pool(Neighbor* addr, int K, Neighbor nn) { return right; } +} // namespace nsg + +using namespace nsg; + NSG::NSG(int R) : R(R), rng(0x0903) { L = R + 32; C = R + 100; @@ -253,9 +256,11 @@ void NSG::search_on_graph( std::vector init_ids(pool_size); int num_ids = 0; - for (int i = 0; i < init_ids.size() && i < graph.K; i++) { - int id = (int)graph.at(ep, i); - if (id < 0 || id >= ntotal) { + std::vector neighbors(graph.K); + size_t nneigh = graph.get_neighbors(ep, neighbors.data()); + for (int i = 0; i < init_ids.size() && i < nneigh; i++) { + int id = (int)neighbors[i]; + if (id >= ntotal) { continue; } @@ -296,9 +301,10 @@ void NSG::search_on_graph( retset[k].flag = false; int n = retset[k].id; - for (int m = 0; m < graph.K; m++) { - int id = (int)graph.at(n, m); - if (id < 0 || id > ntotal || vt.get(id)) { + size_t nneigh = graph.get_neighbors(n, neighbors.data()); + for (int m = 0; m < nneigh; m++) { + int id = neighbors[m]; + if (id > ntotal || vt.get(id)) { continue; } vt.set(id); diff --git a/faiss/impl/NSG.h b/faiss/impl/NSG.h index 641a42f8cf..2f59bc2f8b 100644 --- a/faiss/impl/NSG.h +++ b/faiss/impl/NSG.h @@ -5,8 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// -*- c++ -*- - #pragma once #include @@ -40,11 +38,12 @@ namespace faiss { */ struct DistanceComputer; // from AuxIndexStructures -struct Neighbor; -struct Node; namespace nsg { +struct Neighbor; +struct Node; + /*********************************************************** * Graph structure to store a graph. * @@ -75,7 +74,7 @@ struct Graph { } // release the allocated memory if needed - ~Graph() { + virtual ~Graph() { if (own_fields) { delete[] data; } @@ -90,6 +89,17 @@ struct Graph { inline node_t& at(int i, int j) { return data[i * K + j]; } + + // get all neighbors of node i (used during search only) + virtual size_t get_neighbors(int i, node_t* neighbors) const { + for (int j = 0; j < K; j++) { + if (data[i * K + j] < 0) { + return j; + } + neighbors[j] = data[i * K + j]; + } + return K; + } }; DistanceComputer* storage_distance_computer(const Index* storage); @@ -99,6 +109,8 @@ DistanceComputer* storage_distance_computer(const Index* storage); struct NSG { /// internal storage of vectors (32 bits: this is expensive) using storage_idx_t = int32_t; + using Node = nsg::Node; + using Neighbor = nsg::Neighbor; int ntotal = 0; ///< nb of nodes @@ -112,7 +124,7 @@ struct NSG { int enterpoint; ///< enterpoint - std::shared_ptr> final_graph; ///< NSG graph structure + std::shared_ptr> final_graph; ///< NSG graph structure bool is_built = false; ///< NSG is built or not diff --git a/tests/test_NSG_compressed_graph.cpp b/tests/test_NSG_compressed_graph.cpp new file mode 100644 index 0000000000..ecfc856be4 --- /dev/null +++ b/tests/test_NSG_compressed_graph.cpp @@ -0,0 +1,85 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include +#include +#include +#include + +using namespace faiss; + +using FinalNSGGraph = nsg::Graph; + +struct CompressedNSGGraph : FinalNSGGraph { + int bits; + size_t stride; + std::vector compressed_data; + + CompressedNSGGraph(const FinalNSGGraph& graph, int bits) + : FinalNSGGraph(graph.data, graph.N, graph.K), bits(bits) { + FAISS_THROW_IF_NOT((1 << bits) >= K + 1); + stride = (K * bits + 7) / 8; + compressed_data.resize(N * stride); + for (size_t i = 0; i < N; i++) { + BitstringWriter writer(compressed_data.data() + i * stride, stride); + for (size_t j = 0; j < K; j++) { + int32_t v = graph.data[i * K + j]; + if (v == -1) { + writer.write(K + 1, bits); + break; + } else { + writer.write(v, bits); + } + } + } + data = nullptr; + } + + size_t get_neighbors(int i, int32_t* neighbors) const override { + BitstringReader reader(compressed_data.data() + i * stride, stride); + for (int j = 0; j < K; j++) { + int32_t v = reader.read(bits); + if (v == K + 1) { + return j; + } + neighbors[j] = v; + } + return K; + } +}; + +TEST(NSGCompressed, test_compressed) { + size_t nq = 10, nt = 0, nb = 5000, d = 32, k = 10; + + using idx_t = faiss::idx_t; + + std::vector buf((nq + nb + nt) * d); + faiss::rand_smooth_vectors(nq + nb + nt, d, buf.data(), 1234); + const float* xt = buf.data(); + const float* xb = xt + nt * d; + const float* xq = xb + nb * d; + + faiss::IndexNSGFlat index(d, 32); + + index.add(nb, xb); + + std::vector Iref(nq * k); + std::vector Dref(nq * k); + index.search(nq, xq, k, Dref.data(), Iref.data()); + + // replace the shared ptr + index.nsg.final_graph.reset( + new CompressedNSGGraph(*index.nsg.final_graph, 13)); + + std::vector I(nq * k); + std::vector D(nq * k); + index.search(nq, xq, k, D.data(), I.data()); + + // make sure we find back the original results + EXPECT_EQ(Iref, I); + EXPECT_EQ(Dref, D); +} From 56a383f253b66dd20a1d6509af9ac10bb94138e2 Mon Sep 17 00:00:00 2001 From: Michael Norris Date: Mon, 21 Oct 2024 08:26:22 -0700 Subject: [PATCH 16/21] Resolve "duplicate-license-header": Find and replace duplicate license headers (#3967) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3967 This diff just finds and replaces duplicate license headers. See the errors for "duplicate-license-header" in D64429711 under "linter-coverage-verification" signal. Reviewed By: asadoughi Differential Revision: D64484123 fbshipit-source-id: 906e8baa3a11a3bbee174a03dcc27681f9fd78c2 --- c_api/AutoTune_c.cpp | 1 - c_api/AutoTune_c.h | 1 - c_api/Clustering_c.cpp | 1 - c_api/Clustering_c.h | 1 - c_api/IndexBinary_c.cpp | 1 - c_api/IndexBinary_c.h | 1 - c_api/IndexFlat_c.cpp | 1 - c_api/IndexFlat_c.h | 1 - c_api/IndexIVFFlat_c.cpp | 1 - c_api/IndexIVFFlat_c.h | 1 - c_api/IndexIVF_c.cpp | 1 - c_api/IndexIVF_c.h | 1 - c_api/IndexLSH_c.cpp | 1 - c_api/IndexLSH_c.h | 1 - c_api/IndexPreTransform_c.cpp | 1 - c_api/IndexPreTransform_c.h | 1 - c_api/IndexReplicas_c.h | 1 - c_api/IndexScalarQuantizer_c.cpp | 1 - c_api/IndexScalarQuantizer_c.h | 1 - c_api/IndexShards_c.h | 1 - c_api/Index_c.cpp | 1 - c_api/Index_c.h | 1 - c_api/MetaIndexes_c.cpp | 1 - c_api/MetaIndexes_c.h | 1 - c_api/VectorTransform_c.cpp | 1 - c_api/VectorTransform_c.h | 3 +-- c_api/clone_index_c.cpp | 3 +-- c_api/clone_index_c.h | 1 - c_api/error_c.h | 1 - c_api/error_impl.cpp | 1 - c_api/error_impl.h | 1 - c_api/example_c.c | 1 - c_api/faiss_c.h | 1 - c_api/gpu/DeviceUtils_c.cpp | 1 - c_api/gpu/DeviceUtils_c.h | 1 - c_api/gpu/GpuAutoTune_c.cpp | 1 - c_api/gpu/GpuAutoTune_c.h | 1 - c_api/gpu/GpuClonerOptions_c.cpp | 1 - c_api/gpu/GpuClonerOptions_c.h | 1 - c_api/gpu/GpuIndex_c.cpp | 1 - c_api/gpu/GpuIndex_c.h | 1 - c_api/gpu/GpuIndicesOptions_c.h | 1 - c_api/gpu/GpuResources_c.cpp | 1 - c_api/gpu/GpuResources_c.h | 1 - c_api/gpu/StandardGpuResources_c.cpp | 1 - c_api/gpu/StandardGpuResources_c.h | 1 - c_api/gpu/example_gpu_c.c | 1 - c_api/gpu/macros_impl.h | 1 - c_api/impl/AuxIndexStructures_c.cpp | 1 - c_api/impl/AuxIndexStructures_c.h | 1 - c_api/index_factory_c.cpp | 3 +-- c_api/index_factory_c.h | 1 - c_api/index_io_c.cpp | 1 - c_api/index_io_c.h | 1 - c_api/macros_impl.h | 1 - c_api/utils/distances_c.cpp | 1 - c_api/utils/distances_c.h | 1 - c_api/utils/utils_c.cpp | 1 - c_api/utils/utils_c.h | 1 - 59 files changed, 3 insertions(+), 62 deletions(-) diff --git a/c_api/AutoTune_c.cpp b/c_api/AutoTune_c.cpp index 5c1a037999..25f2242333 100644 --- a/c_api/AutoTune_c.cpp +++ b/c_api/AutoTune_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "AutoTune_c.h" diff --git a/c_api/AutoTune_c.h b/c_api/AutoTune_c.h index 2bb5529c8a..617546f882 100644 --- a/c_api/AutoTune_c.h +++ b/c_api/AutoTune_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_AUTO_TUNE_C_H diff --git a/c_api/Clustering_c.cpp b/c_api/Clustering_c.cpp index 2206f6d598..dac75ad434 100644 --- a/c_api/Clustering_c.cpp +++ b/c_api/Clustering_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "Clustering_c.h" diff --git a/c_api/Clustering_c.h b/c_api/Clustering_c.h index 18a6bba6c0..7d3e2f8599 100644 --- a/c_api/Clustering_c.h +++ b/c_api/Clustering_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved // -*- c -*- #ifndef FAISS_CLUSTERING_C_H diff --git a/c_api/IndexBinary_c.cpp b/c_api/IndexBinary_c.cpp index 85986af473..365965eca3 100644 --- a/c_api/IndexBinary_c.cpp +++ b/c_api/IndexBinary_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "IndexBinary_c.h" diff --git a/c_api/IndexBinary_c.h b/c_api/IndexBinary_c.h index 84e6e00301..47307aa060 100644 --- a/c_api/IndexBinary_c.h +++ b/c_api/IndexBinary_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved // -*- c -*- #ifndef FAISS_INDEX_BINARY_C_H diff --git a/c_api/IndexFlat_c.cpp b/c_api/IndexFlat_c.cpp index 2d0cbb6d78..0967c14c7f 100644 --- a/c_api/IndexFlat_c.cpp +++ b/c_api/IndexFlat_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "IndexFlat_c.h" diff --git a/c_api/IndexFlat_c.h b/c_api/IndexFlat_c.h index 16f70e4ed7..8d21a13f2b 100644 --- a/c_api/IndexFlat_c.h +++ b/c_api/IndexFlat_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved // -*- c -*- #ifndef FAISS_INDEX_FLAT_C_H diff --git a/c_api/IndexIVFFlat_c.cpp b/c_api/IndexIVFFlat_c.cpp index 69f113aae4..48da5af31e 100644 --- a/c_api/IndexIVFFlat_c.cpp +++ b/c_api/IndexIVFFlat_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "IndexIVFFlat_c.h" diff --git a/c_api/IndexIVFFlat_c.h b/c_api/IndexIVFFlat_c.h index 7ea35da6ee..252f98726e 100644 --- a/c_api/IndexIVFFlat_c.h +++ b/c_api/IndexIVFFlat_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_INDEX_IVF_FLAT_C_H diff --git a/c_api/IndexIVF_c.cpp b/c_api/IndexIVF_c.cpp index 9a6f39dfa1..82e109466f 100644 --- a/c_api/IndexIVF_c.cpp +++ b/c_api/IndexIVF_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "IndexIVF_c.h" diff --git a/c_api/IndexIVF_c.h b/c_api/IndexIVF_c.h index 98a09c2668..5bfeae2b12 100644 --- a/c_api/IndexIVF_c.h +++ b/c_api/IndexIVF_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_INDEX_IVF_C_H diff --git a/c_api/IndexLSH_c.cpp b/c_api/IndexLSH_c.cpp index b63d967a4a..a30e2d5c28 100644 --- a/c_api/IndexLSH_c.cpp +++ b/c_api/IndexLSH_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "IndexLSH_c.h" diff --git a/c_api/IndexLSH_c.h b/c_api/IndexLSH_c.h index 602c19152c..222bd12b83 100644 --- a/c_api/IndexLSH_c.h +++ b/c_api/IndexLSH_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #ifndef INDEX_LSH_C_H diff --git a/c_api/IndexPreTransform_c.cpp b/c_api/IndexPreTransform_c.cpp index 5930eb126c..c2a9985e03 100644 --- a/c_api/IndexPreTransform_c.cpp +++ b/c_api/IndexPreTransform_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "IndexPreTransform_c.h" diff --git a/c_api/IndexPreTransform_c.h b/c_api/IndexPreTransform_c.h index 0e5528905c..8fb3269345 100644 --- a/c_api/IndexPreTransform_c.h +++ b/c_api/IndexPreTransform_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_INDEX_PRETRANSFORM_C_H diff --git a/c_api/IndexReplicas_c.h b/c_api/IndexReplicas_c.h index 3d14eeefa2..84b349e9de 100644 --- a/c_api/IndexReplicas_c.h +++ b/c_api/IndexReplicas_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #ifndef INDEXREPLICAS_C_H diff --git a/c_api/IndexScalarQuantizer_c.cpp b/c_api/IndexScalarQuantizer_c.cpp index 9f3393e831..5e75656888 100644 --- a/c_api/IndexScalarQuantizer_c.cpp +++ b/c_api/IndexScalarQuantizer_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "IndexScalarQuantizer_c.h" diff --git a/c_api/IndexScalarQuantizer_c.h b/c_api/IndexScalarQuantizer_c.h index 55a2676d22..1e99b11439 100644 --- a/c_api/IndexScalarQuantizer_c.h +++ b/c_api/IndexScalarQuantizer_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_INDEX_SCALAR_QUANTIZER_C_H diff --git a/c_api/IndexShards_c.h b/c_api/IndexShards_c.h index 98108902e5..0888fc0610 100644 --- a/c_api/IndexShards_c.h +++ b/c_api/IndexShards_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #ifndef INDEXSHARDS_C_H diff --git a/c_api/Index_c.cpp b/c_api/Index_c.cpp index ed66405676..b0e9877681 100644 --- a/c_api/Index_c.cpp +++ b/c_api/Index_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "Index_c.h" diff --git a/c_api/Index_c.h b/c_api/Index_c.h index a961beb7a9..d834c84724 100644 --- a/c_api/Index_c.h +++ b/c_api/Index_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved // -*- c -*- #ifndef FAISS_INDEX_C_H diff --git a/c_api/MetaIndexes_c.cpp b/c_api/MetaIndexes_c.cpp index 3b535797a9..1edb98aada 100644 --- a/c_api/MetaIndexes_c.cpp +++ b/c_api/MetaIndexes_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "MetaIndexes_c.h" diff --git a/c_api/MetaIndexes_c.h b/c_api/MetaIndexes_c.h index 8cd5cae039..66c2573ac7 100644 --- a/c_api/MetaIndexes_c.h +++ b/c_api/MetaIndexes_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #ifndef METAINDEXES_C_H diff --git a/c_api/VectorTransform_c.cpp b/c_api/VectorTransform_c.cpp index 430470573d..1ddf5bd908 100644 --- a/c_api/VectorTransform_c.cpp +++ b/c_api/VectorTransform_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "VectorTransform_c.h" diff --git a/c_api/VectorTransform_c.h b/c_api/VectorTransform_c.h index 3798eac71f..bbe9113745 100644 --- a/c_api/VectorTransform_c.h +++ b/c_api/VectorTransform_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_VECTOR_TRANSFORM_C_H @@ -171,4 +170,4 @@ int faiss_CenteringTransform_new_with(FaissCenteringTransform** p_vt, int d); } #endif -#endif \ No newline at end of file +#endif diff --git a/c_api/clone_index_c.cpp b/c_api/clone_index_c.cpp index 606e5f9b0a..a195773c9b 100644 --- a/c_api/clone_index_c.cpp +++ b/c_api/clone_index_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved // -*- c++ -*- // I/O code for indexes @@ -33,4 +32,4 @@ int faiss_clone_index_binary( *p_out = reinterpret_cast(out); } CATCH_AND_HANDLE -} \ No newline at end of file +} diff --git a/c_api/clone_index_c.h b/c_api/clone_index_c.h index d2da35b82f..ad626007a9 100644 --- a/c_api/clone_index_c.h +++ b/c_api/clone_index_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved // -*- c++ -*- // I/O code for indexes diff --git a/c_api/error_c.h b/c_api/error_c.h index 8c5575f5aa..742e5ad3d6 100644 --- a/c_api/error_c.h +++ b/c_api/error_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_ERROR_C_H diff --git a/c_api/error_impl.cpp b/c_api/error_impl.cpp index 27f2972454..c2eebf5113 100644 --- a/c_api/error_impl.cpp +++ b/c_api/error_impl.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "error_impl.h" diff --git a/c_api/error_impl.h b/c_api/error_impl.h index b44254ad94..fa5e8ce149 100644 --- a/c_api/error_impl.h +++ b/c_api/error_impl.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include diff --git a/c_api/example_c.c b/c_api/example_c.c index 299305cf3f..1cca86c39d 100644 --- a/c_api/example_c.c +++ b/c_api/example_c.c @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #include diff --git a/c_api/faiss_c.h b/c_api/faiss_c.h index 02d3d714c3..416dfab24a 100644 --- a/c_api/faiss_c.h +++ b/c_api/faiss_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- /// Macros and typedefs for C wrapper API declarations diff --git a/c_api/gpu/DeviceUtils_c.cpp b/c_api/gpu/DeviceUtils_c.cpp index 99194c5d35..37ce94df66 100644 --- a/c_api/gpu/DeviceUtils_c.cpp +++ b/c_api/gpu/DeviceUtils_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "DeviceUtils_c.h" diff --git a/c_api/gpu/DeviceUtils_c.h b/c_api/gpu/DeviceUtils_c.h index 54b8c28eda..1ce512f173 100644 --- a/c_api/gpu/DeviceUtils_c.h +++ b/c_api/gpu/DeviceUtils_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_DEVICE_UTILS_C_H diff --git a/c_api/gpu/GpuAutoTune_c.cpp b/c_api/gpu/GpuAutoTune_c.cpp index 402b328e3e..34b0b6f340 100644 --- a/c_api/gpu/GpuAutoTune_c.cpp +++ b/c_api/gpu/GpuAutoTune_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "GpuAutoTune_c.h" diff --git a/c_api/gpu/GpuAutoTune_c.h b/c_api/gpu/GpuAutoTune_c.h index fbc935b5e6..ccd2394a04 100644 --- a/c_api/gpu/GpuAutoTune_c.h +++ b/c_api/gpu/GpuAutoTune_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_GPU_AUTO_TUNE_C_H diff --git a/c_api/gpu/GpuClonerOptions_c.cpp b/c_api/gpu/GpuClonerOptions_c.cpp index 9f6abed5ee..308e7b66c3 100644 --- a/c_api/gpu/GpuClonerOptions_c.cpp +++ b/c_api/gpu/GpuClonerOptions_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "GpuClonerOptions_c.h" diff --git a/c_api/gpu/GpuClonerOptions_c.h b/c_api/gpu/GpuClonerOptions_c.h index 6c97586a2b..3a0f4884e4 100644 --- a/c_api/gpu/GpuClonerOptions_c.h +++ b/c_api/gpu/GpuClonerOptions_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_GPU_CLONER_OPTIONS_C_H diff --git a/c_api/gpu/GpuIndex_c.cpp b/c_api/gpu/GpuIndex_c.cpp index 9be2ca3b91..445a117efd 100644 --- a/c_api/gpu/GpuIndex_c.cpp +++ b/c_api/gpu/GpuIndex_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "GpuIndex_c.h" diff --git a/c_api/gpu/GpuIndex_c.h b/c_api/gpu/GpuIndex_c.h index 8003ec5205..97dd8dc543 100644 --- a/c_api/gpu/GpuIndex_c.h +++ b/c_api/gpu/GpuIndex_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_GPU_INDEX_C_H diff --git a/c_api/gpu/GpuIndicesOptions_c.h b/c_api/gpu/GpuIndicesOptions_c.h index 6d05383ce4..ffc62a79ac 100644 --- a/c_api/gpu/GpuIndicesOptions_c.h +++ b/c_api/gpu/GpuIndicesOptions_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_GPU_INDICES_OPTIONS_C_H diff --git a/c_api/gpu/GpuResources_c.cpp b/c_api/gpu/GpuResources_c.cpp index 3f9115aff5..890710face 100644 --- a/c_api/gpu/GpuResources_c.cpp +++ b/c_api/gpu/GpuResources_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "GpuResources_c.h" diff --git a/c_api/gpu/GpuResources_c.h b/c_api/gpu/GpuResources_c.h index aaef6d4000..d128b3ab11 100644 --- a/c_api/gpu/GpuResources_c.h +++ b/c_api/gpu/GpuResources_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_GPU_RESOURCES_C_H diff --git a/c_api/gpu/StandardGpuResources_c.cpp b/c_api/gpu/StandardGpuResources_c.cpp index 31766d1784..689ddc4aed 100644 --- a/c_api/gpu/StandardGpuResources_c.cpp +++ b/c_api/gpu/StandardGpuResources_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "StandardGpuResources_c.h" diff --git a/c_api/gpu/StandardGpuResources_c.h b/c_api/gpu/StandardGpuResources_c.h index 1b8c6e7832..2c013790b4 100644 --- a/c_api/gpu/StandardGpuResources_c.h +++ b/c_api/gpu/StandardGpuResources_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_STANDARD_GPURESOURCES_C_H diff --git a/c_api/gpu/example_gpu_c.c b/c_api/gpu/example_gpu_c.c index 81cefa0b01..0a63a67f3b 100644 --- a/c_api/gpu/example_gpu_c.c +++ b/c_api/gpu/example_gpu_c.c @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #include diff --git a/c_api/gpu/macros_impl.h b/c_api/gpu/macros_impl.h index f0cf6b857c..0e291d23cc 100644 --- a/c_api/gpu/macros_impl.h +++ b/c_api/gpu/macros_impl.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #ifndef GPU_MACROS_IMPL_H diff --git a/c_api/impl/AuxIndexStructures_c.cpp b/c_api/impl/AuxIndexStructures_c.cpp index c19c1b63be..b7f359a74d 100644 --- a/c_api/impl/AuxIndexStructures_c.cpp +++ b/c_api/impl/AuxIndexStructures_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "AuxIndexStructures_c.h" diff --git a/c_api/impl/AuxIndexStructures_c.h b/c_api/impl/AuxIndexStructures_c.h index dba3026980..11cf85915d 100644 --- a/c_api/impl/AuxIndexStructures_c.h +++ b/c_api/impl/AuxIndexStructures_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_AUX_INDEX_STRUCTURES_C_H diff --git a/c_api/index_factory_c.cpp b/c_api/index_factory_c.cpp index 3a1ab9bab9..b7159ca4d5 100644 --- a/c_api/index_factory_c.cpp +++ b/c_api/index_factory_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "index_factory_c.h" @@ -42,4 +41,4 @@ int faiss_index_binary_factory( faiss::index_binary_factory(d, description)); } CATCH_AND_HANDLE -} \ No newline at end of file +} diff --git a/c_api/index_factory_c.h b/c_api/index_factory_c.h index ccd58ac778..c3ab756374 100644 --- a/c_api/index_factory_c.h +++ b/c_api/index_factory_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_INDEX_FACTORY_C_H diff --git a/c_api/index_io_c.cpp b/c_api/index_io_c.cpp index 8814db59f1..50eede76da 100644 --- a/c_api/index_io_c.cpp +++ b/c_api/index_io_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved // -*- c++ -*- // I/O code for indexes diff --git a/c_api/index_io_c.h b/c_api/index_io_c.h index 8935de0219..aada997aa6 100644 --- a/c_api/index_io_c.h +++ b/c_api/index_io_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved // -*- c++ -*- // I/O code for indexes diff --git a/c_api/macros_impl.h b/c_api/macros_impl.h index 48c5efffbc..c4c004468a 100644 --- a/c_api/macros_impl.h +++ b/c_api/macros_impl.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- /// Utility macros for the C wrapper implementation. diff --git a/c_api/utils/distances_c.cpp b/c_api/utils/distances_c.cpp index 05872e1eee..c767367125 100644 --- a/c_api/utils/distances_c.cpp +++ b/c_api/utils/distances_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "distances_c.h" diff --git a/c_api/utils/distances_c.h b/c_api/utils/distances_c.h index 73c9d94aba..f4c8d845e6 100644 --- a/c_api/utils/distances_c.h +++ b/c_api/utils/distances_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_DISTANCES_C_H diff --git a/c_api/utils/utils_c.cpp b/c_api/utils/utils_c.cpp index bca2ad8688..6dc039cb5c 100644 --- a/c_api/utils/utils_c.cpp +++ b/c_api/utils/utils_c.cpp @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c++ -*- #include "utils_c.h" diff --git a/c_api/utils/utils_c.h b/c_api/utils/utils_c.h index 07cf4338ff..e8f8a987cf 100644 --- a/c_api/utils/utils_c.h +++ b/c_api/utils/utils_c.h @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -// Copyright 2004-present Facebook. All Rights Reserved. // -*- c -*- #ifndef FAISS_UTILS_C_H From da20af4ca5cf7e077270f7443bd1a01c7db2cbb0 Mon Sep 17 00:00:00 2001 From: Michael Norris Date: Mon, 21 Oct 2024 18:36:33 -0700 Subject: [PATCH 17/21] fix some more nvidia licenses that get erased (#3977) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3977 These were getting erased in D64484165. Similar to D64481766, we need to add lint ignore to not erase Nvidia license. Without the changes in this diff to ignore lint, screenshots show these 4 files erase the license when running the lint command: Before lint: {F1941712401} After lint: {F1941712573} Reviewed By: asadoughi Differential Revision: D64712875 fbshipit-source-id: ada63a8d2f3e4af6c58971f83053b0eb443908d8 --- benchs/bench_ivfflat_raft.py | 3 ++- benchs/bench_ivfpq_raft.py | 5 +++-- faiss/gpu/CMakeLists.txt | 3 ++- faiss/gpu/test/CMakeLists.txt | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/benchs/bench_ivfflat_raft.py b/benchs/bench_ivfflat_raft.py index 9ebfcb3422..d8e299165c 100644 --- a/benchs/bench_ivfflat_raft.py +++ b/benchs/bench_ivfflat_raft.py @@ -1,4 +1,5 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# @lint-ignore-every LICENSELINT +# Copyright (c) Meta Platforms, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_ivfpq_raft.py b/benchs/bench_ivfpq_raft.py index 3494a18741..96a9ab1512 100644 --- a/benchs/bench_ivfpq_raft.py +++ b/benchs/bench_ivfpq_raft.py @@ -1,4 +1,5 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# @lint-ignore-every LICENSELINT +# Copyright (c) Meta Platforms, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. @@ -165,4 +166,4 @@ def bench_search_milliseconds(index, addVecs, queryVecs, nprobe, k, use_raft): classical_gpu_search_time = bench_search_milliseconds( index, xb, queryVecs, args.nprobe, args.k, False) print("Method: IVFPQ, Operation: SEARCH, dim: %d, n_centroids: %d, numSubQuantizers %d, bitsPerCode %d, numVecs: %d, numQuery: %d, nprobe: %d, k: %d, classical GPU search time: %.3f milliseconds, RAFT enabled GPU search time: %.3f milliseconds" % ( - n_cols, nlist, M, args.bits_per_code, n_add, n_rows, args.nprobe, args.k, classical_gpu_search_time, raft_gpu_search_time)) \ No newline at end of file + n_cols, nlist, M, args.bits_per_code, n_add, n_rows, args.nprobe, args.k, classical_gpu_search_time, raft_gpu_search_time)) diff --git a/faiss/gpu/CMakeLists.txt b/faiss/gpu/CMakeLists.txt index b843622661..3517827750 100644 --- a/faiss/gpu/CMakeLists.txt +++ b/faiss/gpu/CMakeLists.txt @@ -1,4 +1,5 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# @lint-ignore-every LICENSELINT +# Copyright (c) Meta Platforms, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the diff --git a/faiss/gpu/test/CMakeLists.txt b/faiss/gpu/test/CMakeLists.txt index 073403e13a..8c44e5360e 100644 --- a/faiss/gpu/test/CMakeLists.txt +++ b/faiss/gpu/test/CMakeLists.txt @@ -1,4 +1,5 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# @lint-ignore-every LICENSELINT +# Copyright (c) Meta Platforms, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the From e7d153dbf543a862b9119572eef501822ccfbba9 Mon Sep 17 00:00:00 2001 From: Amir Sadoughi Date: Mon, 21 Oct 2024 19:19:39 -0700 Subject: [PATCH 18/21] 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 --- .github/workflows/nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 84f8e6fba4..cdca7d873a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -8,7 +8,7 @@ env: jobs: linux-x86_64-nightly: name: Linux x86_64 nightlies - runs-on: ubuntu-latest + runs-on: 4-core-ubuntu steps: - name: Checkout uses: actions/checkout@v4 From eff0898a13ae4d0d7cfce61092299fea0041479a Mon Sep 17 00:00:00 2001 From: Michael Norris Date: Tue, 22 Oct 2024 09:46:48 -0700 Subject: [PATCH 19/21] Enable linting: lint config changes plus arc lint command (#3966) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3966 This actually enables the linting. Manual changes: - tools/arcanist/lint/fbsource-licenselint-config.toml - tools/arcanist/lint/fbsource-lint-engine.toml Automated changes: `arc lint --apply-patches --take LICENSELINT --paths-cmd 'hg files faiss'` Reviewed By: asadoughi Differential Revision: D64484165 fbshipit-source-id: 4f2f6e953c94ef6ebfea8a5ae035ccfbea65ed04 --- benchs/CMakeLists.txt | 5 ++--- benchs/bench_6bit_codec.cpp | 4 ++-- benchs/bench_all_ivf/bench_all_ivf.py | 2 +- benchs/bench_all_ivf/bench_kmeans.py | 2 +- benchs/bench_all_ivf/cmp_with_scann.py | 2 +- benchs/bench_all_ivf/datasets_oss.py | 2 +- benchs/bench_all_ivf/make_groundtruth.py | 2 +- benchs/bench_all_ivf/parse_bench_all_ivf.py | 2 +- benchs/bench_big_batch_ivf.py | 2 +- benchs/bench_cppcontrib_sa_decode.cpp | 4 ++-- benchs/bench_for_interrupt.py | 3 +-- benchs/bench_gpu_1bn.py | 3 +-- benchs/bench_gpu_sift1m.py | 2 +- benchs/bench_hamming_computer.cpp | 4 ++-- benchs/bench_hamming_knn.py | 2 +- benchs/bench_heap_replace.cpp | 4 ++-- benchs/bench_hnsw.py | 2 +- benchs/bench_hybrid_cpu_gpu.py | 2 +- benchs/bench_index_flat.py | 3 +-- benchs/bench_index_pq.py | 2 +- benchs/bench_ivf_fastscan.py | 2 +- benchs/bench_ivf_fastscan_single_query.py | 2 +- benchs/bench_ivf_selector.cpp | 4 ++-- benchs/bench_pairwise_distances.py | 3 +-- benchs/bench_partition.py | 2 +- benchs/bench_polysemous_1bn.py | 2 +- benchs/bench_polysemous_sift1m.py | 3 +-- benchs/bench_pq_tables.py | 3 +-- benchs/bench_pq_transposed_centroid_table.py | 3 +-- benchs/bench_quantizer.py | 2 +- benchs/bench_scalar_quantizer.py | 2 +- benchs/bench_vector_ops.py | 3 +-- benchs/datasets.py | 2 +- benchs/distributed_ondisk/combined_index.py | 3 +-- benchs/distributed_ondisk/distributed_kmeans.py | 3 +-- benchs/distributed_ondisk/distributed_query_demo.py | 2 +- benchs/distributed_ondisk/make_index_vslice.py | 2 +- benchs/distributed_ondisk/make_trained_index.py | 2 +- benchs/distributed_ondisk/merge_to_ondisk.py | 2 +- benchs/distributed_ondisk/run_on_cluster.bash | 3 +-- benchs/distributed_ondisk/search_server.py | 2 +- benchs/kmeans_mnist.py | 3 +-- c_api/AutoTune_c.cpp | 4 ++-- c_api/AutoTune_c.h | 4 ++-- c_api/CMakeLists.txt | 2 +- c_api/Clustering_c.cpp | 4 ++-- c_api/Clustering_c.h | 4 ++-- c_api/IndexBinary_c.cpp | 4 ++-- c_api/IndexBinary_c.h | 4 ++-- c_api/IndexFlat_c.cpp | 4 ++-- c_api/IndexFlat_c.h | 4 ++-- c_api/IndexIVFFlat_c.cpp | 4 ++-- c_api/IndexIVFFlat_c.h | 4 ++-- c_api/IndexIVF_c.cpp | 4 ++-- c_api/IndexIVF_c.h | 4 ++-- c_api/IndexLSH_c.cpp | 4 ++-- c_api/IndexLSH_c.h | 4 ++-- c_api/IndexPreTransform_c.cpp | 4 ++-- c_api/IndexPreTransform_c.h | 4 ++-- c_api/IndexReplicas_c.cpp | 4 ++-- c_api/IndexReplicas_c.h | 4 ++-- c_api/IndexScalarQuantizer_c.cpp | 4 ++-- c_api/IndexScalarQuantizer_c.h | 4 ++-- c_api/IndexShards_c.cpp | 4 ++-- c_api/IndexShards_c.h | 4 ++-- c_api/Index_c.cpp | 4 ++-- c_api/Index_c.h | 4 ++-- c_api/MetaIndexes_c.cpp | 4 ++-- c_api/MetaIndexes_c.h | 4 ++-- c_api/VectorTransform_c.cpp | 4 ++-- c_api/VectorTransform_c.h | 4 ++-- c_api/clone_index_c.cpp | 4 ++-- c_api/clone_index_c.h | 4 ++-- c_api/error_c.h | 4 ++-- c_api/error_impl.cpp | 4 ++-- c_api/error_impl.h | 4 ++-- c_api/example_c.c | 4 ++-- c_api/faiss_c.h | 4 ++-- c_api/gpu/CMakeLists.txt | 2 +- c_api/gpu/DeviceUtils_c.cpp | 4 ++-- c_api/gpu/DeviceUtils_c.h | 4 ++-- c_api/gpu/GpuAutoTune_c.cpp | 4 ++-- c_api/gpu/GpuAutoTune_c.h | 4 ++-- c_api/gpu/GpuClonerOptions_c.cpp | 4 ++-- c_api/gpu/GpuClonerOptions_c.h | 4 ++-- c_api/gpu/GpuIndex_c.cpp | 4 ++-- c_api/gpu/GpuIndex_c.h | 4 ++-- c_api/gpu/GpuIndicesOptions_c.h | 4 ++-- c_api/gpu/GpuResources_c.cpp | 4 ++-- c_api/gpu/GpuResources_c.h | 4 ++-- c_api/gpu/StandardGpuResources_c.cpp | 4 ++-- c_api/gpu/StandardGpuResources_c.h | 4 ++-- c_api/gpu/example_gpu_c.c | 4 ++-- c_api/gpu/macros_impl.h | 4 ++-- c_api/impl/AuxIndexStructures_c.cpp | 4 ++-- c_api/impl/AuxIndexStructures_c.h | 4 ++-- c_api/index_factory_c.cpp | 4 ++-- c_api/index_factory_c.h | 4 ++-- c_api/index_io_c.cpp | 4 ++-- c_api/index_io_c.h | 4 ++-- c_api/macros_impl.h | 4 ++-- c_api/utils/distances_c.cpp | 4 ++-- c_api/utils/distances_c.h | 4 ++-- c_api/utils/utils_c.cpp | 4 ++-- c_api/utils/utils_c.h | 4 ++-- cmake/link_to_faiss_lib.cmake | 3 +-- conda/faiss-gpu-raft/build-lib.sh | 2 +- conda/faiss-gpu-raft/build-pkg.sh | 2 +- conda/faiss-gpu-raft/test_cpu_dispatch.sh | 2 +- conda/faiss-gpu/build-lib.sh | 2 +- conda/faiss-gpu/build-pkg.sh | 2 +- conda/faiss-gpu/test_cpu_dispatch.sh | 2 +- conda/faiss/build-lib-arm64.sh | 2 +- conda/faiss/build-lib-osx.sh | 2 +- conda/faiss/build-lib.bat | 5 +++++ conda/faiss/build-lib.sh | 2 +- conda/faiss/build-pkg-arm64.sh | 2 +- conda/faiss/build-pkg-osx.sh | 2 +- conda/faiss/build-pkg.bat | 5 +++++ conda/faiss/build-pkg.sh | 2 +- conda/faiss/test_cpu_dispatch.sh | 2 +- contrib/big_batch_search.py | 2 +- contrib/client_server.py | 2 +- contrib/clustering.py | 2 +- contrib/datasets.py | 2 +- contrib/evaluation.py | 2 +- contrib/exhaustive_search.py | 2 +- contrib/factory_tools.py | 2 +- contrib/inspect_tools.py | 2 +- contrib/ivf_tools.py | 2 +- contrib/ondisk.py | 2 +- contrib/rpc.py | 2 +- contrib/torch/clustering.py | 2 +- contrib/torch/quantization.py | 2 +- contrib/torch_utils.py | 2 +- contrib/vecs_io.py | 2 +- demos/CMakeLists.txt | 5 ++--- demos/demo_auto_tune.py | 3 +-- demos/demo_client_server_ivf.py | 2 +- demos/demo_distributed_kmeans_torch.py | 2 +- demos/demo_imi_flat.cpp | 4 ++-- demos/demo_imi_pq.cpp | 4 ++-- demos/demo_ivfpq_indexing.cpp | 4 ++-- demos/demo_nndescent.cpp | 4 ++-- demos/demo_ondisk_ivf.py | 3 +-- demos/demo_qinco.py | 2 +- demos/demo_residual_quantizer.cpp | 4 ++-- demos/demo_sift1M.cpp | 4 ++-- demos/demo_weighted_kmeans.cpp | 4 ++-- demos/offline_ivf/create_sharded_ssnpp_files.py | 1 + demos/offline_ivf/dataset.py | 1 + demos/offline_ivf/generate_config.py | 1 + demos/offline_ivf/offline_ivf.py | 1 + demos/offline_ivf/run.py | 1 + demos/offline_ivf/tests/test_iterate_input.py | 1 + demos/offline_ivf/tests/test_offline_ivf.py | 1 + demos/offline_ivf/tests/testing_utils.py | 1 + demos/offline_ivf/utils.py | 1 + demos/rocksdb_ivf/CMakeLists.txt | 5 +++++ demos/rocksdb_ivf/RocksDBInvertedLists.cpp | 2 +- demos/rocksdb_ivf/RocksDBInvertedLists.h | 2 +- demos/rocksdb_ivf/demo_rocksdb_ivf.cpp | 2 +- faiss/AutoTune.cpp | 4 ++-- faiss/AutoTune.h | 4 ++-- faiss/CMakeLists.txt | 5 ++--- faiss/Clustering.cpp | 4 ++-- faiss/Clustering.h | 4 ++-- faiss/IVFlib.cpp | 4 ++-- faiss/IVFlib.h | 4 ++-- faiss/Index.cpp | 4 ++-- faiss/Index.h | 4 ++-- faiss/Index2Layer.cpp | 4 ++-- faiss/Index2Layer.h | 4 ++-- faiss/IndexAdditiveQuantizer.cpp | 4 ++-- faiss/IndexAdditiveQuantizer.h | 4 ++-- faiss/IndexAdditiveQuantizerFastScan.cpp | 4 ++-- faiss/IndexAdditiveQuantizerFastScan.h | 4 ++-- faiss/IndexBinary.cpp | 4 ++-- faiss/IndexBinary.h | 4 ++-- faiss/IndexBinaryFlat.cpp | 4 ++-- faiss/IndexBinaryFlat.h | 4 ++-- faiss/IndexBinaryFromFloat.cpp | 4 ++-- faiss/IndexBinaryFromFloat.h | 4 ++-- faiss/IndexBinaryHNSW.cpp | 4 ++-- faiss/IndexBinaryHNSW.h | 4 ++-- faiss/IndexBinaryHash.cpp | 4 ++-- faiss/IndexBinaryHash.h | 4 ++-- faiss/IndexBinaryIVF.cpp | 4 ++-- faiss/IndexBinaryIVF.h | 4 ++-- faiss/IndexFastScan.cpp | 4 ++-- faiss/IndexFastScan.h | 4 ++-- faiss/IndexFlat.cpp | 4 ++-- faiss/IndexFlat.h | 4 ++-- faiss/IndexFlatCodes.cpp | 4 ++-- faiss/IndexFlatCodes.h | 4 ++-- faiss/IndexHNSW.cpp | 4 ++-- faiss/IndexHNSW.h | 4 ++-- faiss/IndexIDMap.cpp | 4 ++-- faiss/IndexIDMap.h | 4 ++-- faiss/IndexIVF.cpp | 4 ++-- faiss/IndexIVF.h | 4 ++-- faiss/IndexIVFAdditiveQuantizer.cpp | 4 ++-- faiss/IndexIVFAdditiveQuantizer.h | 4 ++-- faiss/IndexIVFAdditiveQuantizerFastScan.cpp | 4 ++-- faiss/IndexIVFAdditiveQuantizerFastScan.h | 4 ++-- faiss/IndexIVFFastScan.cpp | 4 ++-- faiss/IndexIVFFastScan.h | 4 ++-- faiss/IndexIVFFlat.cpp | 4 ++-- faiss/IndexIVFFlat.h | 4 ++-- faiss/IndexIVFIndependentQuantizer.cpp | 4 ++-- faiss/IndexIVFIndependentQuantizer.h | 4 ++-- faiss/IndexIVFPQ.cpp | 4 ++-- faiss/IndexIVFPQ.h | 4 ++-- faiss/IndexIVFPQFastScan.cpp | 4 ++-- faiss/IndexIVFPQFastScan.h | 4 ++-- faiss/IndexIVFPQR.cpp | 4 ++-- faiss/IndexIVFPQR.h | 4 ++-- faiss/IndexIVFSpectralHash.cpp | 4 ++-- faiss/IndexIVFSpectralHash.h | 4 ++-- faiss/IndexLSH.cpp | 4 ++-- faiss/IndexLSH.h | 4 ++-- faiss/IndexLattice.cpp | 4 ++-- faiss/IndexLattice.h | 4 ++-- faiss/IndexNNDescent.cpp | 4 ++-- faiss/IndexNNDescent.h | 4 ++-- faiss/IndexNSG.cpp | 4 ++-- faiss/IndexNSG.h | 4 ++-- faiss/IndexNeuralNetCodec.cpp | 4 ++-- faiss/IndexNeuralNetCodec.h | 4 ++-- faiss/IndexPQ.cpp | 4 ++-- faiss/IndexPQ.h | 4 ++-- faiss/IndexPQFastScan.cpp | 4 ++-- faiss/IndexPQFastScan.h | 4 ++-- faiss/IndexPreTransform.cpp | 4 ++-- faiss/IndexPreTransform.h | 4 ++-- faiss/IndexRefine.cpp | 4 ++-- faiss/IndexRefine.h | 4 ++-- faiss/IndexReplicas.cpp | 4 ++-- faiss/IndexReplicas.h | 4 ++-- faiss/IndexRowwiseMinMax.cpp | 4 ++-- faiss/IndexRowwiseMinMax.h | 4 ++-- faiss/IndexScalarQuantizer.cpp | 4 ++-- faiss/IndexScalarQuantizer.h | 4 ++-- faiss/IndexShards.cpp | 4 ++-- faiss/IndexShards.h | 4 ++-- faiss/IndexShardsIVF.cpp | 4 ++-- faiss/IndexShardsIVF.h | 4 ++-- faiss/MatrixStats.cpp | 4 ++-- faiss/MatrixStats.h | 4 ++-- faiss/MetaIndexes.cpp | 4 ++-- faiss/MetaIndexes.h | 4 ++-- faiss/MetricType.h | 4 ++-- faiss/VectorTransform.cpp | 4 ++-- faiss/VectorTransform.h | 4 ++-- faiss/clone_index.cpp | 4 ++-- faiss/clone_index.h | 4 ++-- faiss/cppcontrib/SaDecodeKernels.h | 4 ++-- faiss/cppcontrib/detail/CoarseBitType.h | 4 ++-- faiss/cppcontrib/detail/UintReader.h | 4 ++-- faiss/cppcontrib/factory_tools.cpp | 4 ++-- faiss/cppcontrib/factory_tools.h | 4 ++-- faiss/cppcontrib/sa_decode/Level2-avx2-inl.h | 4 ++-- faiss/cppcontrib/sa_decode/Level2-inl.h | 4 ++-- faiss/cppcontrib/sa_decode/Level2-neon-inl.h | 4 ++-- faiss/cppcontrib/sa_decode/MinMax-inl.h | 4 ++-- faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h | 4 ++-- faiss/cppcontrib/sa_decode/PQ-avx2-inl.h | 4 ++-- faiss/cppcontrib/sa_decode/PQ-inl.h | 4 ++-- faiss/cppcontrib/sa_decode/PQ-neon-inl.h | 4 ++-- faiss/gpu/GpuAutoTune.cpp | 4 ++-- faiss/gpu/GpuAutoTune.h | 4 ++-- faiss/gpu/GpuCloner.cpp | 4 ++-- faiss/gpu/GpuCloner.h | 4 ++-- faiss/gpu/GpuClonerOptions.h | 4 ++-- faiss/gpu/GpuDistance.h | 4 ++-- faiss/gpu/GpuFaissAssert.h | 4 ++-- faiss/gpu/GpuIcmEncoder.cu | 4 ++-- faiss/gpu/GpuIcmEncoder.h | 4 ++-- faiss/gpu/GpuIndex.cu | 4 ++-- faiss/gpu/GpuIndexBinaryFlat.cu | 4 ++-- faiss/gpu/GpuIndexBinaryFlat.h | 4 ++-- faiss/gpu/GpuIndexFlat.cu | 4 ++-- faiss/gpu/GpuIndexFlat.h | 4 ++-- faiss/gpu/GpuIndexIVF.cu | 4 ++-- faiss/gpu/GpuIndexIVF.h | 4 ++-- faiss/gpu/GpuIndexIVFFlat.cu | 4 ++-- faiss/gpu/GpuIndexIVFFlat.h | 4 ++-- faiss/gpu/GpuIndexIVFPQ.cu | 4 ++-- faiss/gpu/GpuIndexIVFPQ.h | 4 ++-- faiss/gpu/GpuIndexIVFScalarQuantizer.cu | 4 ++-- faiss/gpu/GpuIndexIVFScalarQuantizer.h | 4 ++-- faiss/gpu/GpuIndicesOptions.h | 4 ++-- faiss/gpu/impl/BinaryDistance.cu | 4 ++-- faiss/gpu/impl/BinaryDistance.cuh | 4 ++-- faiss/gpu/impl/BinaryFlatIndex.cu | 4 ++-- faiss/gpu/impl/BinaryFlatIndex.cuh | 4 ++-- faiss/gpu/impl/BroadcastSum.cu | 4 ++-- faiss/gpu/impl/BroadcastSum.cuh | 4 ++-- faiss/gpu/impl/Distance.cu | 4 ++-- faiss/gpu/impl/Distance.cuh | 4 ++-- faiss/gpu/impl/DistanceUtils.cuh | 4 ++-- faiss/gpu/impl/GeneralDistance.cuh | 4 ++-- faiss/gpu/impl/GpuScalarQuantizer.cuh | 4 ++-- faiss/gpu/impl/IVFAppend.cu | 4 ++-- faiss/gpu/impl/IVFAppend.cuh | 4 ++-- faiss/gpu/impl/IVFBase.cu | 4 ++-- faiss/gpu/impl/IVFBase.cuh | 4 ++-- faiss/gpu/impl/IVFFlat.cu | 4 ++-- faiss/gpu/impl/IVFFlat.cuh | 4 ++-- faiss/gpu/impl/IVFFlatScan.cu | 4 ++-- faiss/gpu/impl/IVFFlatScan.cuh | 4 ++-- faiss/gpu/impl/IVFInterleaved.cu | 4 ++-- faiss/gpu/impl/IVFInterleaved.cuh | 4 ++-- faiss/gpu/impl/IVFPQ.cu | 4 ++-- faiss/gpu/impl/IVFPQ.cuh | 4 ++-- faiss/gpu/impl/IVFUtils.cu | 4 ++-- faiss/gpu/impl/IVFUtils.cuh | 4 ++-- faiss/gpu/impl/IVFUtilsSelect1.cu | 4 ++-- faiss/gpu/impl/IVFUtilsSelect2.cu | 4 ++-- faiss/gpu/impl/IcmEncoder.cu | 4 ++-- faiss/gpu/impl/IcmEncoder.cuh | 4 ++-- faiss/gpu/impl/IndexUtils.cu | 4 ++-- faiss/gpu/impl/IndexUtils.h | 4 ++-- faiss/gpu/impl/InterleavedCodes.cpp | 4 ++-- faiss/gpu/impl/InterleavedCodes.h | 4 ++-- faiss/gpu/impl/L2Norm.cu | 4 ++-- faiss/gpu/impl/L2Norm.cuh | 4 ++-- faiss/gpu/impl/L2Select.cu | 4 ++-- faiss/gpu/impl/L2Select.cuh | 4 ++-- faiss/gpu/impl/PQCodeDistances-inl.cuh | 4 ++-- faiss/gpu/impl/PQCodeDistances.cuh | 4 ++-- faiss/gpu/impl/PQCodeLoad.cuh | 4 ++-- faiss/gpu/impl/PQScanMultiPassNoPrecomputed-inl.cuh | 4 ++-- faiss/gpu/impl/PQScanMultiPassNoPrecomputed.cuh | 4 ++-- faiss/gpu/impl/PQScanMultiPassPrecomputed.cu | 4 ++-- faiss/gpu/impl/PQScanMultiPassPrecomputed.cuh | 4 ++-- faiss/gpu/impl/RemapIndices.cpp | 4 ++-- faiss/gpu/impl/RemapIndices.h | 4 ++-- faiss/gpu/impl/VectorResidual.cu | 4 ++-- faiss/gpu/impl/VectorResidual.cuh | 4 ++-- faiss/gpu/impl/scan/IVFInterleavedImpl.cuh | 4 ++-- faiss/gpu/impl/scan/IVFInterleavedScanKernelTemplate.cu | 2 +- faiss/gpu/perf/IndexWrapper-inl.h | 4 ++-- faiss/gpu/perf/IndexWrapper.h | 4 ++-- faiss/gpu/perf/PerfBinaryFlat.cu | 4 ++-- faiss/gpu/perf/PerfClustering.cpp | 4 ++-- faiss/gpu/perf/PerfFlat.cu | 4 ++-- faiss/gpu/perf/PerfIVFFlat.cu | 4 ++-- faiss/gpu/perf/PerfIVFPQ.cu | 4 ++-- faiss/gpu/perf/PerfIVFPQAdd.cpp | 4 ++-- faiss/gpu/perf/PerfSelect.cu | 4 ++-- faiss/gpu/perf/WriteIndex.cpp | 4 ++-- faiss/gpu/perf/slow.py | 3 +-- faiss/gpu/test/TestCodePacking.cpp | 4 ++-- faiss/gpu/test/TestGpuIndexBinaryFlat.cpp | 4 ++-- faiss/gpu/test/TestGpuIndexFlat.cpp | 4 ++-- faiss/gpu/test/TestGpuIndexIVFPQ.cpp | 4 ++-- faiss/gpu/test/TestGpuIndexIVFScalarQuantizer.cpp | 4 ++-- faiss/gpu/test/TestGpuMemoryException.cpp | 4 ++-- faiss/gpu/test/TestGpuSelect.cu | 4 ++-- faiss/gpu/test/TestUtils.cpp | 4 ++-- faiss/gpu/test/TestUtils.h | 4 ++-- faiss/gpu/test/demo_ivfpq_indexing_gpu.cpp | 4 ++-- faiss/gpu/test/test_cagra.py | 2 +- faiss/gpu/test/test_contrib_gpu.py | 2 +- faiss/gpu/test/test_gpu_basics.py | 2 +- faiss/gpu/test/test_gpu_index.py | 2 +- faiss/gpu/test/test_gpu_index_ivfflat.py | 2 +- faiss/gpu/test/test_gpu_index_ivfsq.py | 2 +- faiss/gpu/test/test_gpu_index_serialize.py | 2 +- faiss/gpu/test/test_multi_gpu.py | 2 +- faiss/gpu/test/test_raft.py | 2 +- faiss/gpu/test/torch_test_contrib_gpu.py | 2 +- faiss/gpu/utils/BlockSelectFloat.cu | 4 ++-- faiss/gpu/utils/BlockSelectKernel.cuh | 4 ++-- faiss/gpu/utils/Comparators.cuh | 4 ++-- faiss/gpu/utils/ConversionOperators.cuh | 4 ++-- faiss/gpu/utils/CopyUtils.cuh | 4 ++-- faiss/gpu/utils/DeviceDefs.cuh | 4 ++-- faiss/gpu/utils/DeviceTensor-inl.cuh | 4 ++-- faiss/gpu/utils/DeviceTensor.cuh | 4 ++-- faiss/gpu/utils/DeviceUtils.cu | 4 ++-- faiss/gpu/utils/DeviceUtils.h | 4 ++-- faiss/gpu/utils/DeviceVector.cuh | 4 ++-- faiss/gpu/utils/Float16.cuh | 4 ++-- faiss/gpu/utils/HostTensor-inl.cuh | 4 ++-- faiss/gpu/utils/HostTensor.cuh | 4 ++-- faiss/gpu/utils/Limits.cuh | 4 ++-- faiss/gpu/utils/LoadStoreOperators.cuh | 4 ++-- faiss/gpu/utils/MathOperators.cuh | 4 ++-- faiss/gpu/utils/MatrixMult-inl.cuh | 4 ++-- faiss/gpu/utils/MatrixMult.cuh | 4 ++-- faiss/gpu/utils/MergeNetworkBlock.cuh | 4 ++-- faiss/gpu/utils/MergeNetworkUtils.cuh | 4 ++-- faiss/gpu/utils/MergeNetworkWarp.cuh | 4 ++-- faiss/gpu/utils/NoTypeTensor.cuh | 4 ++-- faiss/gpu/utils/Pair.cuh | 4 ++-- faiss/gpu/utils/PtxUtils.cuh | 4 ++-- faiss/gpu/utils/ReductionOperators.cuh | 4 ++-- faiss/gpu/utils/Reductions.cuh | 4 ++-- faiss/gpu/utils/Select.cuh | 4 ++-- faiss/gpu/utils/StackDeviceMemory.cpp | 4 ++-- faiss/gpu/utils/StackDeviceMemory.h | 4 ++-- faiss/gpu/utils/StaticUtils.h | 4 ++-- faiss/gpu/utils/Tensor-inl.cuh | 4 ++-- faiss/gpu/utils/Tensor.cuh | 4 ++-- faiss/gpu/utils/ThrustUtils.cuh | 4 ++-- faiss/gpu/utils/Timer.cpp | 4 ++-- faiss/gpu/utils/Timer.h | 4 ++-- faiss/gpu/utils/Transpose.cuh | 4 ++-- faiss/gpu/utils/WarpPackedBits.cuh | 4 ++-- faiss/gpu/utils/WarpSelectFloat.cu | 4 ++-- faiss/gpu/utils/WarpSelectKernel.cuh | 4 ++-- faiss/gpu/utils/WarpShuffles.cuh | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectFloat1.cu | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectFloat128.cu | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectFloat256.cu | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectFloat32.cu | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectFloat64.cu | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectFloatF1024.cu | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectFloatF2048.cu | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectFloatF512.cu | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectFloatT1024.cu | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectFloatT2048.cu | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectFloatT512.cu | 4 ++-- faiss/gpu/utils/blockselect/BlockSelectImpl.cuh | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectFloat1.cu | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectFloat128.cu | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectFloat256.cu | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectFloat32.cu | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectFloat64.cu | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectFloatF1024.cu | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectFloatF2048.cu | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectFloatF512.cu | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectFloatT1024.cu | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectFloatT2048.cu | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectFloatT512.cu | 4 ++-- faiss/gpu/utils/warpselect/WarpSelectImpl.cuh | 4 ++-- faiss/impl/AdditiveQuantizer.cpp | 4 ++-- faiss/impl/AdditiveQuantizer.h | 4 ++-- faiss/impl/AuxIndexStructures.cpp | 4 ++-- faiss/impl/AuxIndexStructures.h | 4 ++-- faiss/impl/CodePacker.cpp | 4 ++-- faiss/impl/CodePacker.h | 4 ++-- faiss/impl/DistanceComputer.h | 4 ++-- faiss/impl/FaissAssert.h | 4 ++-- faiss/impl/FaissException.cpp | 4 ++-- faiss/impl/FaissException.h | 5 ++--- faiss/impl/HNSW.cpp | 4 ++-- faiss/impl/HNSW.h | 4 ++-- faiss/impl/IDSelector.cpp | 4 ++-- faiss/impl/IDSelector.h | 4 ++-- faiss/impl/LocalSearchQuantizer.cpp | 4 ++-- faiss/impl/LocalSearchQuantizer.h | 4 ++-- faiss/impl/LookupTableScaler.h | 4 ++-- faiss/impl/NNDescent.cpp | 4 ++-- faiss/impl/NNDescent.h | 4 ++-- faiss/impl/NSG.cpp | 4 ++-- faiss/impl/NSG.h | 4 ++-- faiss/impl/PolysemousTraining.cpp | 4 ++-- faiss/impl/PolysemousTraining.h | 4 ++-- faiss/impl/ProductAdditiveQuantizer.cpp | 4 ++-- faiss/impl/ProductAdditiveQuantizer.h | 4 ++-- faiss/impl/ProductQuantizer-inl.h | 4 ++-- faiss/impl/ProductQuantizer.cpp | 4 ++-- faiss/impl/ProductQuantizer.h | 4 ++-- faiss/impl/Quantizer.h | 4 ++-- faiss/impl/ResidualQuantizer.cpp | 4 ++-- faiss/impl/ResidualQuantizer.h | 4 ++-- faiss/impl/ResultHandler.h | 4 ++-- faiss/impl/ScalarQuantizer.cpp | 4 ++-- faiss/impl/ScalarQuantizer.h | 4 ++-- faiss/impl/ThreadedIndex-inl.h | 4 ++-- faiss/impl/ThreadedIndex.h | 4 ++-- faiss/impl/code_distance/code_distance-avx2.h | 4 ++-- faiss/impl/code_distance/code_distance-avx512.h | 4 ++-- faiss/impl/code_distance/code_distance-generic.h | 4 ++-- faiss/impl/code_distance/code_distance-sve.h | 4 ++-- faiss/impl/code_distance/code_distance.h | 4 ++-- faiss/impl/index_read.cpp | 4 ++-- faiss/impl/index_read_utils.h | 4 ++-- faiss/impl/index_write.cpp | 4 ++-- faiss/impl/io.cpp | 4 ++-- faiss/impl/io.h | 4 ++-- faiss/impl/io_macros.h | 4 ++-- faiss/impl/kmeans1d.cpp | 4 ++-- faiss/impl/kmeans1d.h | 4 ++-- faiss/impl/lattice_Zn.cpp | 4 ++-- faiss/impl/lattice_Zn.h | 4 ++-- faiss/impl/platform_macros.h | 4 ++-- faiss/impl/pq4_fast_scan.cpp | 4 ++-- faiss/impl/pq4_fast_scan.h | 4 ++-- faiss/impl/pq4_fast_scan_search_1.cpp | 4 ++-- faiss/impl/pq4_fast_scan_search_qbs.cpp | 4 ++-- faiss/impl/residual_quantizer_encode_steps.cpp | 4 ++-- faiss/impl/residual_quantizer_encode_steps.h | 4 ++-- faiss/impl/simd_result_handlers.h | 4 ++-- faiss/index_factory.cpp | 4 ++-- faiss/index_factory.h | 4 ++-- faiss/index_io.h | 4 ++-- faiss/invlists/BlockInvertedLists.cpp | 4 ++-- faiss/invlists/BlockInvertedLists.h | 4 ++-- faiss/invlists/DirectMap.cpp | 4 ++-- faiss/invlists/DirectMap.h | 4 ++-- faiss/invlists/InvertedLists.cpp | 4 ++-- faiss/invlists/InvertedLists.h | 4 ++-- faiss/invlists/InvertedListsIOHook.cpp | 4 ++-- faiss/invlists/InvertedListsIOHook.h | 4 ++-- faiss/invlists/OnDiskInvertedLists.cpp | 4 ++-- faiss/invlists/OnDiskInvertedLists.h | 4 ++-- faiss/python/CMakeLists.txt | 5 ++--- faiss/python/class_wrappers.py | 2 +- faiss/python/loader.py | 2 +- faiss/python/python_callbacks.cpp | 4 ++-- faiss/python/python_callbacks.h | 4 ++-- faiss/python/setup.py | 2 +- faiss/utils/AlignedTable.h | 4 ++-- faiss/utils/Heap.cpp | 4 ++-- faiss/utils/Heap.h | 4 ++-- faiss/utils/NeuralNet.cpp | 4 ++-- faiss/utils/NeuralNet.h | 4 ++-- faiss/utils/WorkerThread.cpp | 4 ++-- faiss/utils/WorkerThread.h | 4 ++-- faiss/utils/approx_topk/approx_topk.h | 4 ++-- faiss/utils/approx_topk/avx2-inl.h | 4 ++-- faiss/utils/approx_topk/generic.h | 4 ++-- faiss/utils/approx_topk/mode.h | 4 ++-- faiss/utils/approx_topk_hamming/approx_topk_hamming.h | 4 ++-- faiss/utils/bf16.h | 4 ++-- faiss/utils/distances.cpp | 4 ++-- faiss/utils/distances.h | 4 ++-- faiss/utils/distances_fused/avx512.cpp | 4 ++-- faiss/utils/distances_fused/avx512.h | 4 ++-- faiss/utils/distances_fused/distances_fused.cpp | 4 ++-- faiss/utils/distances_fused/distances_fused.h | 4 ++-- faiss/utils/distances_fused/simdlib_based.cpp | 4 ++-- faiss/utils/distances_fused/simdlib_based.h | 4 ++-- faiss/utils/distances_simd.cpp | 4 ++-- faiss/utils/extra_distances-inl.h | 4 ++-- faiss/utils/extra_distances.cpp | 4 ++-- faiss/utils/extra_distances.h | 4 ++-- faiss/utils/fp16-arm.h | 4 ++-- faiss/utils/fp16-fp16c.h | 4 ++-- faiss/utils/fp16-inl.h | 4 ++-- faiss/utils/fp16.h | 4 ++-- faiss/utils/hamming-inl.h | 4 ++-- faiss/utils/hamming.cpp | 4 ++-- faiss/utils/hamming.h | 4 ++-- faiss/utils/hamming_distance/avx2-inl.h | 4 ++-- faiss/utils/hamming_distance/common.h | 4 ++-- faiss/utils/hamming_distance/generic-inl.h | 4 ++-- faiss/utils/hamming_distance/hamdis-inl.h | 4 ++-- faiss/utils/hamming_distance/neon-inl.h | 4 ++-- faiss/utils/ordered_key_value.h | 4 ++-- faiss/utils/partitioning.cpp | 4 ++-- faiss/utils/partitioning.h | 4 ++-- faiss/utils/prefetch.h | 4 ++-- faiss/utils/quantize_lut.cpp | 4 ++-- faiss/utils/quantize_lut.h | 4 ++-- faiss/utils/random.cpp | 4 ++-- faiss/utils/random.h | 4 ++-- faiss/utils/simdlib.h | 4 ++-- faiss/utils/simdlib_avx2.h | 4 ++-- faiss/utils/simdlib_avx512.h | 4 ++-- faiss/utils/simdlib_emulated.h | 4 ++-- faiss/utils/simdlib_neon.h | 4 ++-- faiss/utils/simdlib_ppc64.h | 4 ++-- faiss/utils/sorting.cpp | 4 ++-- faiss/utils/sorting.h | 4 ++-- faiss/utils/transpose/transpose-avx2-inl.h | 4 ++-- faiss/utils/transpose/transpose-avx512-inl.h | 4 ++-- faiss/utils/utils.cpp | 4 ++-- faiss/utils/utils.h | 4 ++-- misc/test_blas.cpp | 4 ++-- perf_tests/CMakeLists.txt | 5 ++--- perf_tests/bench_hnsw.py | 5 +++++ perf_tests/bench_no_multithreading_rcq_search.cpp | 4 ++-- perf_tests/bench_scalar_quantizer_accuracy.cpp | 4 ++-- perf_tests/bench_scalar_quantizer_decode.cpp | 4 ++-- perf_tests/bench_scalar_quantizer_distance.cpp | 4 ++-- perf_tests/bench_scalar_quantizer_encode.cpp | 4 ++-- perf_tests/utils.cpp | 7 +++++++ perf_tests/utils.h | 7 ++++++- tests/CMakeLists.txt | 5 ++--- tests/common_faiss_tests.py | 2 +- tests/test_NSG_compressed_graph.cpp | 4 ++-- tests/test_RCQ_cropping.cpp | 4 ++-- tests/test_approx_topk.cpp | 4 ++-- tests/test_autotune.py | 2 +- tests/test_binary_factory.py | 2 +- tests/test_binary_flat.cpp | 4 ++-- tests/test_binary_hashindex.py | 2 +- tests/test_binary_io.py | 2 +- tests/test_build_blocks.py | 2 +- tests/test_callback.cpp | 2 +- tests/test_clone.py | 2 +- tests/test_clustering.py | 2 +- tests/test_code_distance.cpp | 4 ++-- tests/test_common_ivf_empty_index.cpp | 2 +- tests/test_contrib.py | 2 +- tests/test_contrib_with_scipy.py | 2 +- tests/test_cppcontrib_sa_decode.cpp | 4 ++-- tests/test_cppcontrib_uintreader.cpp | 4 ++-- tests/test_dealloc_invlists.cpp | 4 ++-- tests/test_disable_pq_sdc_tables.cpp | 4 ++-- tests/test_distances_simd.cpp | 4 ++-- tests/test_documentation.py | 2 +- tests/test_extra_distances.py | 2 +- tests/test_factory.py | 2 +- tests/test_factory_tools.cpp | 7 ++++++- tests/test_fast_scan.py | 2 +- tests/test_fast_scan_ivf.py | 2 +- tests/test_fastscan_perf.cpp | 4 ++-- tests/test_graph_based.py | 2 +- tests/test_heap.cpp | 5 +++-- tests/test_hnsw.cpp | 4 ++-- tests/test_index.py | 2 +- tests/test_index_accuracy.py | 2 +- tests/test_index_binary.py | 2 +- tests/test_index_binary_from_float.py | 2 +- tests/test_index_composite.py | 2 +- tests/test_io.py | 2 +- tests/test_ivf_index.cpp | 4 ++-- tests/test_ivflib.py | 2 +- tests/test_ivfpq_codec.cpp | 4 ++-- tests/test_ivfpq_indexing.cpp | 4 ++-- tests/test_local_search_quantizer.py | 2 +- tests/test_lowlevel_ivf.cpp | 4 ++-- tests/test_mem_leak.cpp | 6 +++--- tests/test_merge.cpp | 4 ++-- tests/test_merge_index.py | 2 +- tests/test_meta_index.py | 2 +- tests/test_omp_threads.cpp | 4 ++-- tests/test_omp_threads_py.py | 2 +- tests/test_ondisk_ivf.cpp | 4 ++-- tests/test_oom_exception.py | 2 +- tests/test_pairs_decoding.cpp | 4 ++-- tests/test_params_override.cpp | 4 ++-- tests/test_partition.py | 2 +- tests/test_partitioning.cpp | 4 ++-- tests/test_pq_encoding.cpp | 4 ++-- tests/test_product_quantizer.py | 2 +- tests/test_referenced_objects.py | 2 +- tests/test_refine.py | 2 +- tests/test_residual_quantizer.py | 2 +- tests/test_rowwise_minmax.py | 2 +- tests/test_search_params.py | 2 +- tests/test_simdlib.cpp | 4 ++-- tests/test_sliding_ivf.cpp | 4 ++-- tests/test_standalone_codec.py | 2 +- tests/test_swig_wrapper.py | 2 +- tests/test_threaded_index.cpp | 4 ++-- tests/test_transfer_invlists.cpp | 4 ++-- tests/test_util.h | 4 ++-- tests/test_utils.cpp | 2 +- tests/torch_test_contrib.py | 2 +- tests/torch_test_neural_net.py | 2 +- tutorial/cpp/1-Flat.cpp | 4 ++-- tutorial/cpp/2-IVFFlat.cpp | 4 ++-- tutorial/cpp/3-IVFPQ.cpp | 4 ++-- tutorial/cpp/4-GPU.cpp | 4 ++-- tutorial/cpp/5-Multiple-GPUs.cpp | 4 ++-- tutorial/cpp/6-HNSW.cpp | 4 ++-- tutorial/cpp/7-PQFastScan.cpp | 4 ++-- tutorial/cpp/8-PQFastScanRefine.cpp | 4 ++-- tutorial/cpp/9-RefineComparison.cpp | 4 ++-- tutorial/cpp/CMakeLists.txt | 5 ++--- tutorial/python/1-Flat.py | 2 +- tutorial/python/2-IVFFlat.py | 2 +- tutorial/python/3-IVFPQ.py | 2 +- tutorial/python/4-GPU.py | 2 +- tutorial/python/5-Multiple-GPUs.py | 2 +- tutorial/python/7-PQFastScan.py | 2 +- tutorial/python/8-PQFastScanRefine.py | 2 +- tutorial/python/9-RefineComparison.py | 2 +- 675 files changed, 1228 insertions(+), 1205 deletions(-) diff --git a/benchs/CMakeLists.txt b/benchs/CMakeLists.txt index 46c81ae248..27bbb22f7b 100644 --- a/benchs/CMakeLists.txt +++ b/benchs/CMakeLists.txt @@ -1,7 +1,6 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# All rights reserved. +# Copyright (c) Meta Platforms, Inc. and affiliates. # -# This source code is licensed under the BSD-style license found in the +# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_6bit_codec.cpp b/benchs/bench_6bit_codec.cpp index 6757855747..94a0d72888 100644 --- a/benchs/bench_6bit_codec.cpp +++ b/benchs/bench_6bit_codec.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_all_ivf/bench_all_ivf.py b/benchs/bench_all_ivf/bench_all_ivf.py index cb4e097a05..dd1ae2e841 100644 --- a/benchs/bench_all_ivf/bench_all_ivf.py +++ b/benchs/bench_all_ivf/bench_all_ivf.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_all_ivf/bench_kmeans.py b/benchs/bench_all_ivf/bench_kmeans.py index 43184ec59b..24380252df 100644 --- a/benchs/bench_all_ivf/bench_kmeans.py +++ b/benchs/bench_all_ivf/bench_kmeans.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_all_ivf/cmp_with_scann.py b/benchs/bench_all_ivf/cmp_with_scann.py index fc6c75e1f5..5d13fbd0b5 100644 --- a/benchs/bench_all_ivf/cmp_with_scann.py +++ b/benchs/bench_all_ivf/cmp_with_scann.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_all_ivf/datasets_oss.py b/benchs/bench_all_ivf/datasets_oss.py index 0ee897f2b6..43e796238e 100644 --- a/benchs/bench_all_ivf/datasets_oss.py +++ b/benchs/bench_all_ivf/datasets_oss.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_all_ivf/make_groundtruth.py b/benchs/bench_all_ivf/make_groundtruth.py index 8ddf901ba7..57836b29fa 100644 --- a/benchs/bench_all_ivf/make_groundtruth.py +++ b/benchs/bench_all_ivf/make_groundtruth.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_all_ivf/parse_bench_all_ivf.py b/benchs/bench_all_ivf/parse_bench_all_ivf.py index 48f1fffd7e..52d59c910f 100644 --- a/benchs/bench_all_ivf/parse_bench_all_ivf.py +++ b/benchs/bench_all_ivf/parse_bench_all_ivf.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_big_batch_ivf.py b/benchs/bench_big_batch_ivf.py index e678d8e7a2..4456a5c2f8 100644 --- a/benchs/bench_big_batch_ivf.py +++ b/benchs/bench_big_batch_ivf.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_cppcontrib_sa_decode.cpp b/benchs/bench_cppcontrib_sa_decode.cpp index b960fb7c6a..524ce17b5a 100644 --- a/benchs/bench_cppcontrib_sa_decode.cpp +++ b/benchs/bench_cppcontrib_sa_decode.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_for_interrupt.py b/benchs/bench_for_interrupt.py index 553e22689b..e3a1228624 100644 --- a/benchs/bench_for_interrupt.py +++ b/benchs/bench_for_interrupt.py @@ -1,6 +1,5 @@ #! /usr/bin/env python3 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_gpu_1bn.py b/benchs/bench_gpu_1bn.py index 94e68d2fab..935b27ad0a 100644 --- a/benchs/bench_gpu_1bn.py +++ b/benchs/bench_gpu_1bn.py @@ -1,6 +1,5 @@ #! /usr/bin/env python2 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_gpu_sift1m.py b/benchs/bench_gpu_sift1m.py index 5372d1bd01..736ba266d5 100644 --- a/benchs/bench_gpu_sift1m.py +++ b/benchs/bench_gpu_sift1m.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_hamming_computer.cpp b/benchs/bench_hamming_computer.cpp index 36da7a1025..9b0f1a74de 100644 --- a/benchs/bench_hamming_computer.cpp +++ b/benchs/bench_hamming_computer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_hamming_knn.py b/benchs/bench_hamming_knn.py index 3a2e9b0235..c20d125e14 100644 --- a/benchs/bench_hamming_knn.py +++ b/benchs/bench_hamming_knn.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_heap_replace.cpp b/benchs/bench_heap_replace.cpp index d53b44be41..90bdd699cb 100644 --- a/benchs/bench_heap_replace.cpp +++ b/benchs/bench_heap_replace.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_hnsw.py b/benchs/bench_hnsw.py index 7c5620bed1..f62c21c405 100644 --- a/benchs/bench_hnsw.py +++ b/benchs/bench_hnsw.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_hybrid_cpu_gpu.py b/benchs/bench_hybrid_cpu_gpu.py index 779a09fefa..7fe3e25465 100644 --- a/benchs/bench_hybrid_cpu_gpu.py +++ b/benchs/bench_hybrid_cpu_gpu.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_index_flat.py b/benchs/bench_index_flat.py index bc5bbbd4e3..a87388f3f1 100644 --- a/benchs/bench_index_flat.py +++ b/benchs/bench_index_flat.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_index_pq.py b/benchs/bench_index_pq.py index 4fd5ccfeb0..a6bfaac42e 100644 --- a/benchs/bench_index_pq.py +++ b/benchs/bench_index_pq.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_ivf_fastscan.py b/benchs/bench_ivf_fastscan.py index c2d1d5e833..038c2024ac 100644 --- a/benchs/bench_ivf_fastscan.py +++ b/benchs/bench_ivf_fastscan.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_ivf_fastscan_single_query.py b/benchs/bench_ivf_fastscan_single_query.py index 45352672ee..b367c443e5 100644 --- a/benchs/bench_ivf_fastscan_single_query.py +++ b/benchs/bench_ivf_fastscan_single_query.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_ivf_selector.cpp b/benchs/bench_ivf_selector.cpp index 6610ce1c92..0bd8745b4f 100644 --- a/benchs/bench_ivf_selector.cpp +++ b/benchs/bench_ivf_selector.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_pairwise_distances.py b/benchs/bench_pairwise_distances.py index e6ab41bf66..eb3f8c10a2 100644 --- a/benchs/bench_pairwise_distances.py +++ b/benchs/bench_pairwise_distances.py @@ -1,6 +1,5 @@ #! /usr/bin/env python3 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_partition.py b/benchs/bench_partition.py index ce48ffe9ac..85c912e071 100644 --- a/benchs/bench_partition.py +++ b/benchs/bench_partition.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_polysemous_1bn.py b/benchs/bench_polysemous_1bn.py index eabced595a..8cbfe0e0d9 100644 --- a/benchs/bench_polysemous_1bn.py +++ b/benchs/bench_polysemous_1bn.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_polysemous_sift1m.py b/benchs/bench_polysemous_sift1m.py index 98a03deb54..9cbd4f6d27 100644 --- a/benchs/bench_polysemous_sift1m.py +++ b/benchs/bench_polysemous_sift1m.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_pq_tables.py b/benchs/bench_pq_tables.py index a2892a891e..9f4cdca117 100644 --- a/benchs/bench_pq_tables.py +++ b/benchs/bench_pq_tables.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_pq_transposed_centroid_table.py b/benchs/bench_pq_transposed_centroid_table.py index 7aed6bffb7..30a3aec72c 100644 --- a/benchs/bench_pq_transposed_centroid_table.py +++ b/benchs/bench_pq_transposed_centroid_table.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_quantizer.py b/benchs/bench_quantizer.py index 882f9fb2db..80921c63d9 100644 --- a/benchs/bench_quantizer.py +++ b/benchs/bench_quantizer.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_scalar_quantizer.py b/benchs/bench_scalar_quantizer.py index 4809f67a39..32d391f13e 100644 --- a/benchs/bench_scalar_quantizer.py +++ b/benchs/bench_scalar_quantizer.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/bench_vector_ops.py b/benchs/bench_vector_ops.py index 01d1e0f00f..96aa97057f 100644 --- a/benchs/bench_vector_ops.py +++ b/benchs/bench_vector_ops.py @@ -1,6 +1,5 @@ #! /usr/bin/env python2 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/datasets.py b/benchs/datasets.py index 3971f278f9..4b9002ff2c 100644 --- a/benchs/datasets.py +++ b/benchs/datasets.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/distributed_ondisk/combined_index.py b/benchs/distributed_ondisk/combined_index.py index 986e2be40c..bc12cb6474 100755 --- a/benchs/distributed_ondisk/combined_index.py +++ b/benchs/distributed_ondisk/combined_index.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/distributed_ondisk/distributed_kmeans.py b/benchs/distributed_ondisk/distributed_kmeans.py index a68359fe2e..c9c47afe99 100755 --- a/benchs/distributed_ondisk/distributed_kmeans.py +++ b/benchs/distributed_ondisk/distributed_kmeans.py @@ -1,6 +1,5 @@ #! /usr/bin/env python3 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/distributed_ondisk/distributed_query_demo.py b/benchs/distributed_ondisk/distributed_query_demo.py index 9453c0ec27..91b03495f7 100644 --- a/benchs/distributed_ondisk/distributed_query_demo.py +++ b/benchs/distributed_ondisk/distributed_query_demo.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/distributed_ondisk/make_index_vslice.py b/benchs/distributed_ondisk/make_index_vslice.py index 4d26aa202c..f7f80b2e2c 100644 --- a/benchs/distributed_ondisk/make_index_vslice.py +++ b/benchs/distributed_ondisk/make_index_vslice.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/distributed_ondisk/make_trained_index.py b/benchs/distributed_ondisk/make_trained_index.py index 50e4668f1b..843f0671e1 100644 --- a/benchs/distributed_ondisk/make_trained_index.py +++ b/benchs/distributed_ondisk/make_trained_index.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/distributed_ondisk/merge_to_ondisk.py b/benchs/distributed_ondisk/merge_to_ondisk.py index bb5750fdf7..59ca269de7 100644 --- a/benchs/distributed_ondisk/merge_to_ondisk.py +++ b/benchs/distributed_ondisk/merge_to_ondisk.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/distributed_ondisk/run_on_cluster.bash b/benchs/distributed_ondisk/run_on_cluster.bash index 9ec3420c82..886fdcbbaa 100755 --- a/benchs/distributed_ondisk/run_on_cluster.bash +++ b/benchs/distributed_ondisk/run_on_cluster.bash @@ -1,6 +1,5 @@ #! /bin/bash - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/distributed_ondisk/search_server.py b/benchs/distributed_ondisk/search_server.py index a7445d558f..ac01f0bc05 100644 --- a/benchs/distributed_ondisk/search_server.py +++ b/benchs/distributed_ondisk/search_server.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/benchs/kmeans_mnist.py b/benchs/kmeans_mnist.py index b60644e78f..adf62e2472 100644 --- a/benchs/kmeans_mnist.py +++ b/benchs/kmeans_mnist.py @@ -1,6 +1,5 @@ #! /usr/bin/env python2 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/c_api/AutoTune_c.cpp b/c_api/AutoTune_c.cpp index 25f2242333..7f683d6757 100644 --- a/c_api/AutoTune_c.cpp +++ b/c_api/AutoTune_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/AutoTune_c.h b/c_api/AutoTune_c.h index 617546f882..4dde348b7f 100644 --- a/c_api/AutoTune_c.h +++ b/c_api/AutoTune_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/CMakeLists.txt b/c_api/CMakeLists.txt index 9e01aabff7..663118679d 100644 --- a/c_api/CMakeLists.txt +++ b/c_api/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/c_api/Clustering_c.cpp b/c_api/Clustering_c.cpp index dac75ad434..e8ef72dfc4 100644 --- a/c_api/Clustering_c.cpp +++ b/c_api/Clustering_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/Clustering_c.h b/c_api/Clustering_c.h index 7d3e2f8599..5142730455 100644 --- a/c_api/Clustering_c.h +++ b/c_api/Clustering_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexBinary_c.cpp b/c_api/IndexBinary_c.cpp index 365965eca3..6f576ca9da 100644 --- a/c_api/IndexBinary_c.cpp +++ b/c_api/IndexBinary_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexBinary_c.h b/c_api/IndexBinary_c.h index 47307aa060..9ad05a69ea 100644 --- a/c_api/IndexBinary_c.h +++ b/c_api/IndexBinary_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexFlat_c.cpp b/c_api/IndexFlat_c.cpp index 0967c14c7f..1a87cb817e 100644 --- a/c_api/IndexFlat_c.cpp +++ b/c_api/IndexFlat_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexFlat_c.h b/c_api/IndexFlat_c.h index 8d21a13f2b..0c0ff0aa05 100644 --- a/c_api/IndexFlat_c.h +++ b/c_api/IndexFlat_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexIVFFlat_c.cpp b/c_api/IndexIVFFlat_c.cpp index 48da5af31e..4155283b05 100644 --- a/c_api/IndexIVFFlat_c.cpp +++ b/c_api/IndexIVFFlat_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexIVFFlat_c.h b/c_api/IndexIVFFlat_c.h index 252f98726e..b535da5f79 100644 --- a/c_api/IndexIVFFlat_c.h +++ b/c_api/IndexIVFFlat_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexIVF_c.cpp b/c_api/IndexIVF_c.cpp index 82e109466f..0e42e0f76b 100644 --- a/c_api/IndexIVF_c.cpp +++ b/c_api/IndexIVF_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexIVF_c.h b/c_api/IndexIVF_c.h index 5bfeae2b12..ca88336682 100644 --- a/c_api/IndexIVF_c.h +++ b/c_api/IndexIVF_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexLSH_c.cpp b/c_api/IndexLSH_c.cpp index a30e2d5c28..0bd52f503d 100644 --- a/c_api/IndexLSH_c.cpp +++ b/c_api/IndexLSH_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexLSH_c.h b/c_api/IndexLSH_c.h index 222bd12b83..252dbf1493 100644 --- a/c_api/IndexLSH_c.h +++ b/c_api/IndexLSH_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexPreTransform_c.cpp b/c_api/IndexPreTransform_c.cpp index c2a9985e03..56955648e4 100644 --- a/c_api/IndexPreTransform_c.cpp +++ b/c_api/IndexPreTransform_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexPreTransform_c.h b/c_api/IndexPreTransform_c.h index 8fb3269345..2ac0f6b8bb 100644 --- a/c_api/IndexPreTransform_c.h +++ b/c_api/IndexPreTransform_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexReplicas_c.cpp b/c_api/IndexReplicas_c.cpp index 820b80323d..37c78494d8 100644 --- a/c_api/IndexReplicas_c.cpp +++ b/c_api/IndexReplicas_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexReplicas_c.h b/c_api/IndexReplicas_c.h index 84b349e9de..179b18c866 100644 --- a/c_api/IndexReplicas_c.h +++ b/c_api/IndexReplicas_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexScalarQuantizer_c.cpp b/c_api/IndexScalarQuantizer_c.cpp index 5e75656888..2d27b430af 100644 --- a/c_api/IndexScalarQuantizer_c.cpp +++ b/c_api/IndexScalarQuantizer_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexScalarQuantizer_c.h b/c_api/IndexScalarQuantizer_c.h index 1e99b11439..d0a4d10cbc 100644 --- a/c_api/IndexScalarQuantizer_c.h +++ b/c_api/IndexScalarQuantizer_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexShards_c.cpp b/c_api/IndexShards_c.cpp index 56b520b381..9d9c95dfc6 100644 --- a/c_api/IndexShards_c.cpp +++ b/c_api/IndexShards_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/IndexShards_c.h b/c_api/IndexShards_c.h index 0888fc0610..578638d631 100644 --- a/c_api/IndexShards_c.h +++ b/c_api/IndexShards_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/Index_c.cpp b/c_api/Index_c.cpp index b0e9877681..5df3c08eaf 100644 --- a/c_api/Index_c.cpp +++ b/c_api/Index_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/Index_c.h b/c_api/Index_c.h index d834c84724..81a3da7c1b 100644 --- a/c_api/Index_c.h +++ b/c_api/Index_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/MetaIndexes_c.cpp b/c_api/MetaIndexes_c.cpp index 1edb98aada..f0a84a4c91 100644 --- a/c_api/MetaIndexes_c.cpp +++ b/c_api/MetaIndexes_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/MetaIndexes_c.h b/c_api/MetaIndexes_c.h index 66c2573ac7..29f483afd4 100644 --- a/c_api/MetaIndexes_c.h +++ b/c_api/MetaIndexes_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/VectorTransform_c.cpp b/c_api/VectorTransform_c.cpp index 1ddf5bd908..01a690a2f2 100644 --- a/c_api/VectorTransform_c.cpp +++ b/c_api/VectorTransform_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/VectorTransform_c.h b/c_api/VectorTransform_c.h index bbe9113745..47c29cd7c2 100644 --- a/c_api/VectorTransform_c.h +++ b/c_api/VectorTransform_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/clone_index_c.cpp b/c_api/clone_index_c.cpp index a195773c9b..d35942e09e 100644 --- a/c_api/clone_index_c.cpp +++ b/c_api/clone_index_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/clone_index_c.h b/c_api/clone_index_c.h index ad626007a9..bc4fd461ad 100644 --- a/c_api/clone_index_c.h +++ b/c_api/clone_index_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/error_c.h b/c_api/error_c.h index 742e5ad3d6..dbc553c9a0 100644 --- a/c_api/error_c.h +++ b/c_api/error_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/error_impl.cpp b/c_api/error_impl.cpp index c2eebf5113..a0c2d52fe9 100644 --- a/c_api/error_impl.cpp +++ b/c_api/error_impl.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/error_impl.h b/c_api/error_impl.h index fa5e8ce149..5fe7c1ec6b 100644 --- a/c_api/error_impl.h +++ b/c_api/error_impl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/example_c.c b/c_api/example_c.c index 1cca86c39d..03e3c3ee70 100644 --- a/c_api/example_c.c +++ b/c_api/example_c.c @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/faiss_c.h b/c_api/faiss_c.h index 416dfab24a..7d38a781d4 100644 --- a/c_api/faiss_c.h +++ b/c_api/faiss_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/CMakeLists.txt b/c_api/gpu/CMakeLists.txt index 2fa1209c40..88550e6750 100644 --- a/c_api/gpu/CMakeLists.txt +++ b/c_api/gpu/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/DeviceUtils_c.cpp b/c_api/gpu/DeviceUtils_c.cpp index 37ce94df66..37850d39a0 100644 --- a/c_api/gpu/DeviceUtils_c.cpp +++ b/c_api/gpu/DeviceUtils_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/DeviceUtils_c.h b/c_api/gpu/DeviceUtils_c.h index 1ce512f173..b5c67e97ad 100644 --- a/c_api/gpu/DeviceUtils_c.h +++ b/c_api/gpu/DeviceUtils_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/GpuAutoTune_c.cpp b/c_api/gpu/GpuAutoTune_c.cpp index 34b0b6f340..d5bc7e973c 100644 --- a/c_api/gpu/GpuAutoTune_c.cpp +++ b/c_api/gpu/GpuAutoTune_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/GpuAutoTune_c.h b/c_api/gpu/GpuAutoTune_c.h index ccd2394a04..19b296dd12 100644 --- a/c_api/gpu/GpuAutoTune_c.h +++ b/c_api/gpu/GpuAutoTune_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/GpuClonerOptions_c.cpp b/c_api/gpu/GpuClonerOptions_c.cpp index 308e7b66c3..80c9d02a73 100644 --- a/c_api/gpu/GpuClonerOptions_c.cpp +++ b/c_api/gpu/GpuClonerOptions_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/GpuClonerOptions_c.h b/c_api/gpu/GpuClonerOptions_c.h index 3a0f4884e4..dc8b82e174 100644 --- a/c_api/gpu/GpuClonerOptions_c.h +++ b/c_api/gpu/GpuClonerOptions_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/GpuIndex_c.cpp b/c_api/gpu/GpuIndex_c.cpp index 445a117efd..92d675a2e8 100644 --- a/c_api/gpu/GpuIndex_c.cpp +++ b/c_api/gpu/GpuIndex_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/GpuIndex_c.h b/c_api/gpu/GpuIndex_c.h index 97dd8dc543..4b7aab061e 100644 --- a/c_api/gpu/GpuIndex_c.h +++ b/c_api/gpu/GpuIndex_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/GpuIndicesOptions_c.h b/c_api/gpu/GpuIndicesOptions_c.h index ffc62a79ac..14ab9ae340 100644 --- a/c_api/gpu/GpuIndicesOptions_c.h +++ b/c_api/gpu/GpuIndicesOptions_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/GpuResources_c.cpp b/c_api/gpu/GpuResources_c.cpp index 890710face..65baeab303 100644 --- a/c_api/gpu/GpuResources_c.cpp +++ b/c_api/gpu/GpuResources_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/GpuResources_c.h b/c_api/gpu/GpuResources_c.h index d128b3ab11..d3d604be9c 100644 --- a/c_api/gpu/GpuResources_c.h +++ b/c_api/gpu/GpuResources_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/StandardGpuResources_c.cpp b/c_api/gpu/StandardGpuResources_c.cpp index 689ddc4aed..5552873018 100644 --- a/c_api/gpu/StandardGpuResources_c.cpp +++ b/c_api/gpu/StandardGpuResources_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/StandardGpuResources_c.h b/c_api/gpu/StandardGpuResources_c.h index 2c013790b4..e435dac360 100644 --- a/c_api/gpu/StandardGpuResources_c.h +++ b/c_api/gpu/StandardGpuResources_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/example_gpu_c.c b/c_api/gpu/example_gpu_c.c index 0a63a67f3b..37ef54b8f5 100644 --- a/c_api/gpu/example_gpu_c.c +++ b/c_api/gpu/example_gpu_c.c @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/gpu/macros_impl.h b/c_api/gpu/macros_impl.h index 0e291d23cc..a8cb57bad9 100644 --- a/c_api/gpu/macros_impl.h +++ b/c_api/gpu/macros_impl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/impl/AuxIndexStructures_c.cpp b/c_api/impl/AuxIndexStructures_c.cpp index b7f359a74d..534d5a0769 100644 --- a/c_api/impl/AuxIndexStructures_c.cpp +++ b/c_api/impl/AuxIndexStructures_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/impl/AuxIndexStructures_c.h b/c_api/impl/AuxIndexStructures_c.h index 11cf85915d..86b017a432 100644 --- a/c_api/impl/AuxIndexStructures_c.h +++ b/c_api/impl/AuxIndexStructures_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/index_factory_c.cpp b/c_api/index_factory_c.cpp index b7159ca4d5..6fea651623 100644 --- a/c_api/index_factory_c.cpp +++ b/c_api/index_factory_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/index_factory_c.h b/c_api/index_factory_c.h index c3ab756374..3790a0e51b 100644 --- a/c_api/index_factory_c.h +++ b/c_api/index_factory_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/index_io_c.cpp b/c_api/index_io_c.cpp index 50eede76da..9be2f9e414 100644 --- a/c_api/index_io_c.cpp +++ b/c_api/index_io_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/index_io_c.h b/c_api/index_io_c.h index aada997aa6..c9026c7e9c 100644 --- a/c_api/index_io_c.h +++ b/c_api/index_io_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/macros_impl.h b/c_api/macros_impl.h index c4c004468a..ade7bb15c1 100644 --- a/c_api/macros_impl.h +++ b/c_api/macros_impl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/utils/distances_c.cpp b/c_api/utils/distances_c.cpp index c767367125..025bae51fa 100644 --- a/c_api/utils/distances_c.cpp +++ b/c_api/utils/distances_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/utils/distances_c.h b/c_api/utils/distances_c.h index f4c8d845e6..e2ef643e40 100644 --- a/c_api/utils/distances_c.h +++ b/c_api/utils/distances_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/utils/utils_c.cpp b/c_api/utils/utils_c.cpp index 6dc039cb5c..b66a069f0a 100644 --- a/c_api/utils/utils_c.cpp +++ b/c_api/utils/utils_c.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/c_api/utils/utils_c.h b/c_api/utils/utils_c.h index e8f8a987cf..a8b3ffac8b 100644 --- a/c_api/utils/utils_c.h +++ b/c_api/utils/utils_c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/cmake/link_to_faiss_lib.cmake b/cmake/link_to_faiss_lib.cmake index 0573c3c74e..939ed61fc9 100644 --- a/cmake/link_to_faiss_lib.cmake +++ b/cmake/link_to_faiss_lib.cmake @@ -1,8 +1,7 @@ # @lint-ignore-every LICENSELINT # Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. # -# This source code is licensed under the BSD-style license found in the +# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. function(link_to_faiss_lib target) diff --git a/conda/faiss-gpu-raft/build-lib.sh b/conda/faiss-gpu-raft/build-lib.sh index 79ca8da2cd..78a7f87eae 100644 --- a/conda/faiss-gpu-raft/build-lib.sh +++ b/conda/faiss-gpu-raft/build-lib.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss-gpu-raft/build-pkg.sh b/conda/faiss-gpu-raft/build-pkg.sh index da5fdefca9..66a91bd006 100644 --- a/conda/faiss-gpu-raft/build-pkg.sh +++ b/conda/faiss-gpu-raft/build-pkg.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss-gpu-raft/test_cpu_dispatch.sh b/conda/faiss-gpu-raft/test_cpu_dispatch.sh index a7c1b2da72..8efb37f060 100755 --- a/conda/faiss-gpu-raft/test_cpu_dispatch.sh +++ b/conda/faiss-gpu-raft/test_cpu_dispatch.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss-gpu/build-lib.sh b/conda/faiss-gpu/build-lib.sh index 9957be96ea..9cb3ad468b 100755 --- a/conda/faiss-gpu/build-lib.sh +++ b/conda/faiss-gpu/build-lib.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss-gpu/build-pkg.sh b/conda/faiss-gpu/build-pkg.sh index e529a83d80..f90ff7d38f 100755 --- a/conda/faiss-gpu/build-pkg.sh +++ b/conda/faiss-gpu/build-pkg.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss-gpu/test_cpu_dispatch.sh b/conda/faiss-gpu/test_cpu_dispatch.sh index a7c1b2da72..8efb37f060 100755 --- a/conda/faiss-gpu/test_cpu_dispatch.sh +++ b/conda/faiss-gpu/test_cpu_dispatch.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss/build-lib-arm64.sh b/conda/faiss/build-lib-arm64.sh index 983e0c613b..fbc261515c 100755 --- a/conda/faiss/build-lib-arm64.sh +++ b/conda/faiss/build-lib-arm64.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss/build-lib-osx.sh b/conda/faiss/build-lib-osx.sh index e858106bf2..ad099b46e3 100755 --- a/conda/faiss/build-lib-osx.sh +++ b/conda/faiss/build-lib-osx.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss/build-lib.bat b/conda/faiss/build-lib.bat index 3077f4ecb5..ff851252c2 100644 --- a/conda/faiss/build-lib.bat +++ b/conda/faiss/build-lib.bat @@ -1,3 +1,8 @@ +@REM Copyright (c) Meta Platforms, Inc. and affiliates. +@REM +@REM This source code is licensed under the MIT license found in the +@REM LICENSE file in the root directory of this source tree. + :: Copyright (c) Facebook, Inc. and its affiliates. :: :: This source code is licensed under the MIT license found in the diff --git a/conda/faiss/build-lib.sh b/conda/faiss/build-lib.sh index 5028891d93..8c986d5e68 100755 --- a/conda/faiss/build-lib.sh +++ b/conda/faiss/build-lib.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss/build-pkg-arm64.sh b/conda/faiss/build-pkg-arm64.sh index 70fc7312e5..a06fe2a2ac 100755 --- a/conda/faiss/build-pkg-arm64.sh +++ b/conda/faiss/build-pkg-arm64.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss/build-pkg-osx.sh b/conda/faiss/build-pkg-osx.sh index 914aed174d..95819c630c 100755 --- a/conda/faiss/build-pkg-osx.sh +++ b/conda/faiss/build-pkg-osx.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss/build-pkg.bat b/conda/faiss/build-pkg.bat index 37b08556aa..b331255fc2 100644 --- a/conda/faiss/build-pkg.bat +++ b/conda/faiss/build-pkg.bat @@ -1,3 +1,8 @@ +@REM Copyright (c) Meta Platforms, Inc. and affiliates. +@REM +@REM This source code is licensed under the MIT license found in the +@REM LICENSE file in the root directory of this source tree. + :: Copyright (c) Facebook, Inc. and its affiliates. :: :: This source code is licensed under the MIT license found in the diff --git a/conda/faiss/build-pkg.sh b/conda/faiss/build-pkg.sh index 92e0febfa8..a0e3b12042 100755 --- a/conda/faiss/build-pkg.sh +++ b/conda/faiss/build-pkg.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/conda/faiss/test_cpu_dispatch.sh b/conda/faiss/test_cpu_dispatch.sh index a7c1b2da72..8efb37f060 100755 --- a/conda/faiss/test_cpu_dispatch.sh +++ b/conda/faiss/test_cpu_dispatch.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/big_batch_search.py b/contrib/big_batch_search.py index 440a538c15..f82fbd502e 100644 --- a/contrib/big_batch_search.py +++ b/contrib/big_batch_search.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/client_server.py b/contrib/client_server.py index ee39798e5d..4c3d34952f 100755 --- a/contrib/client_server.py +++ b/contrib/client_server.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/clustering.py b/contrib/clustering.py index 19c2656dc1..c2a7c77757 100644 --- a/contrib/clustering.py +++ b/contrib/clustering.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/datasets.py b/contrib/datasets.py index de65088b7c..e830a03e29 100644 --- a/contrib/datasets.py +++ b/contrib/datasets.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/evaluation.py b/contrib/evaluation.py index 435c390594..a53f6052d1 100644 --- a/contrib/evaluation.py +++ b/contrib/evaluation.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/exhaustive_search.py b/contrib/exhaustive_search.py index eadb097fae..808453e6c1 100644 --- a/contrib/exhaustive_search.py +++ b/contrib/exhaustive_search.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/factory_tools.py b/contrib/factory_tools.py index cfad7c7b5c..c8531cc7b8 100644 --- a/contrib/factory_tools.py +++ b/contrib/factory_tools.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/inspect_tools.py b/contrib/inspect_tools.py index 0aef5ac96d..3181559bad 100644 --- a/contrib/inspect_tools.py +++ b/contrib/inspect_tools.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/ivf_tools.py b/contrib/ivf_tools.py index 1c10eb0386..2cfec86b56 100644 --- a/contrib/ivf_tools.py +++ b/contrib/ivf_tools.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/ondisk.py b/contrib/ondisk.py index 81ec71941c..4150091127 100644 --- a/contrib/ondisk.py +++ b/contrib/ondisk.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/rpc.py b/contrib/rpc.py index e7145b9815..765d22ab81 100755 --- a/contrib/rpc.py +++ b/contrib/rpc.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/torch/clustering.py b/contrib/torch/clustering.py index 9e1ce94b91..7438534605 100644 --- a/contrib/torch/clustering.py +++ b/contrib/torch/clustering.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/torch/quantization.py b/contrib/torch/quantization.py index 8d6b17fa8f..a1d8f7dd8a 100644 --- a/contrib/torch/quantization.py +++ b/contrib/torch/quantization.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/torch_utils.py b/contrib/torch_utils.py index 820cf19705..6db271ec48 100644 --- a/contrib/torch_utils.py +++ b/contrib/torch_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/contrib/vecs_io.py b/contrib/vecs_io.py index 9ef9e0ab64..f130645ecf 100644 --- a/contrib/vecs_io.py +++ b/contrib/vecs_io.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt index 0e0bc41710..ec9de3161e 100644 --- a/demos/CMakeLists.txt +++ b/demos/CMakeLists.txt @@ -1,7 +1,6 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# All rights reserved. +# Copyright (c) Meta Platforms, Inc. and affiliates. # -# This source code is licensed under the BSD-style license found in the +# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. add_executable(demo_imi_flat EXCLUDE_FROM_ALL demo_imi_flat.cpp) diff --git a/demos/demo_auto_tune.py b/demos/demo_auto_tune.py index be1079aed0..d078df7b86 100755 --- a/demos/demo_auto_tune.py +++ b/demos/demo_auto_tune.py @@ -1,6 +1,5 @@ #!/usr/bin/env python2 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/demo_client_server_ivf.py b/demos/demo_client_server_ivf.py index 82803d8852..e89dd28509 100755 --- a/demos/demo_client_server_ivf.py +++ b/demos/demo_client_server_ivf.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/demo_distributed_kmeans_torch.py b/demos/demo_distributed_kmeans_torch.py index 279efa2080..c7264950a1 100644 --- a/demos/demo_distributed_kmeans_torch.py +++ b/demos/demo_distributed_kmeans_torch.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/demo_imi_flat.cpp b/demos/demo_imi_flat.cpp index 1480422ac6..4de4670baf 100644 --- a/demos/demo_imi_flat.cpp +++ b/demos/demo_imi_flat.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/demos/demo_imi_pq.cpp b/demos/demo_imi_pq.cpp index 4fab0778d8..1e6387312d 100644 --- a/demos/demo_imi_pq.cpp +++ b/demos/demo_imi_pq.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/demos/demo_ivfpq_indexing.cpp b/demos/demo_ivfpq_indexing.cpp index 9773cac29e..aa84542cf5 100644 --- a/demos/demo_ivfpq_indexing.cpp +++ b/demos/demo_ivfpq_indexing.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/demos/demo_nndescent.cpp b/demos/demo_nndescent.cpp index 34594b035c..9200a62cb3 100644 --- a/demos/demo_nndescent.cpp +++ b/demos/demo_nndescent.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/demos/demo_ondisk_ivf.py b/demos/demo_ondisk_ivf.py index e4d64378bc..e2d57fa9ff 100755 --- a/demos/demo_ondisk_ivf.py +++ b/demos/demo_ondisk_ivf.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/demo_qinco.py b/demos/demo_qinco.py index 5d826bcab8..b89bb6818e 100644 --- a/demos/demo_qinco.py +++ b/demos/demo_qinco.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/demo_residual_quantizer.cpp b/demos/demo_residual_quantizer.cpp index 6a0fe4e7fb..cf9c0cdf85 100644 --- a/demos/demo_residual_quantizer.cpp +++ b/demos/demo_residual_quantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/demos/demo_sift1M.cpp b/demos/demo_sift1M.cpp index 598565f858..15032c2aca 100644 --- a/demos/demo_sift1M.cpp +++ b/demos/demo_sift1M.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/demos/demo_weighted_kmeans.cpp b/demos/demo_weighted_kmeans.cpp index 245029131f..d0041e525a 100644 --- a/demos/demo_weighted_kmeans.cpp +++ b/demos/demo_weighted_kmeans.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/demos/offline_ivf/create_sharded_ssnpp_files.py b/demos/offline_ivf/create_sharded_ssnpp_files.py index 1dd22d2be8..1e3b36d24c 100644 --- a/demos/offline_ivf/create_sharded_ssnpp_files.py +++ b/demos/offline_ivf/create_sharded_ssnpp_files.py @@ -1,4 +1,5 @@ # Copyright (c) Meta Platforms, Inc. and affiliates. +# # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/offline_ivf/dataset.py b/demos/offline_ivf/dataset.py index f9e30009c5..5c96a83a94 100644 --- a/demos/offline_ivf/dataset.py +++ b/demos/offline_ivf/dataset.py @@ -1,4 +1,5 @@ # Copyright (c) Meta Platforms, Inc. and affiliates. +# # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/offline_ivf/generate_config.py b/demos/offline_ivf/generate_config.py index b5a12645ab..e70085c33b 100644 --- a/demos/offline_ivf/generate_config.py +++ b/demos/offline_ivf/generate_config.py @@ -1,4 +1,5 @@ # Copyright (c) Meta Platforms, Inc. and affiliates. +# # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/offline_ivf/offline_ivf.py b/demos/offline_ivf/offline_ivf.py index eccd2b95cb..8fe7d6b39d 100644 --- a/demos/offline_ivf/offline_ivf.py +++ b/demos/offline_ivf/offline_ivf.py @@ -1,4 +1,5 @@ # Copyright (c) Meta Platforms, Inc. and affiliates. +# # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/offline_ivf/run.py b/demos/offline_ivf/run.py index dfa831d6f0..563a3e422b 100644 --- a/demos/offline_ivf/run.py +++ b/demos/offline_ivf/run.py @@ -1,4 +1,5 @@ # Copyright (c) Meta Platforms, Inc. and affiliates. +# # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/offline_ivf/tests/test_iterate_input.py b/demos/offline_ivf/tests/test_iterate_input.py index 3f59071102..2e0cf52b6f 100644 --- a/demos/offline_ivf/tests/test_iterate_input.py +++ b/demos/offline_ivf/tests/test_iterate_input.py @@ -1,4 +1,5 @@ # Copyright (c) Meta Platforms, Inc. and affiliates. +# # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/offline_ivf/tests/test_offline_ivf.py b/demos/offline_ivf/tests/test_offline_ivf.py index 557a0b37dd..4d866fd5e3 100644 --- a/demos/offline_ivf/tests/test_offline_ivf.py +++ b/demos/offline_ivf/tests/test_offline_ivf.py @@ -1,4 +1,5 @@ # Copyright (c) Meta Platforms, Inc. and affiliates. +# # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/offline_ivf/tests/testing_utils.py b/demos/offline_ivf/tests/testing_utils.py index 34751f278a..0d2dc492b1 100644 --- a/demos/offline_ivf/tests/testing_utils.py +++ b/demos/offline_ivf/tests/testing_utils.py @@ -1,4 +1,5 @@ # Copyright (c) Meta Platforms, Inc. and affiliates. +# # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/offline_ivf/utils.py b/demos/offline_ivf/utils.py index 378af00c30..c1d91c9705 100644 --- a/demos/offline_ivf/utils.py +++ b/demos/offline_ivf/utils.py @@ -1,4 +1,5 @@ # Copyright (c) Meta Platforms, Inc. and affiliates. +# # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/demos/rocksdb_ivf/CMakeLists.txt b/demos/rocksdb_ivf/CMakeLists.txt index 7bc3fe079c..7b92fe7d15 100644 --- a/demos/rocksdb_ivf/CMakeLists.txt +++ b/demos/rocksdb_ivf/CMakeLists.txt @@ -1,3 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + cmake_minimum_required(VERSION 3.17 FATAL_ERROR) project (ROCKSDB_IVF) set(CMAKE_BUILD_TYPE Debug) diff --git a/demos/rocksdb_ivf/RocksDBInvertedLists.cpp b/demos/rocksdb_ivf/RocksDBInvertedLists.cpp index a17c7cfd67..a72ec75e2e 100644 --- a/demos/rocksdb_ivf/RocksDBInvertedLists.cpp +++ b/demos/rocksdb_ivf/RocksDBInvertedLists.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the diff --git a/demos/rocksdb_ivf/RocksDBInvertedLists.h b/demos/rocksdb_ivf/RocksDBInvertedLists.h index ebaccc0670..c52f57f24b 100644 --- a/demos/rocksdb_ivf/RocksDBInvertedLists.h +++ b/demos/rocksdb_ivf/RocksDBInvertedLists.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the diff --git a/demos/rocksdb_ivf/demo_rocksdb_ivf.cpp b/demos/rocksdb_ivf/demo_rocksdb_ivf.cpp index 69e83fe240..5f998d3bf1 100644 --- a/demos/rocksdb_ivf/demo_rocksdb_ivf.cpp +++ b/demos/rocksdb_ivf/demo_rocksdb_ivf.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the diff --git a/faiss/AutoTune.cpp b/faiss/AutoTune.cpp index 7c663a1dd4..fd9bb62f71 100644 --- a/faiss/AutoTune.cpp +++ b/faiss/AutoTune.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/AutoTune.h b/faiss/AutoTune.h index fe840d42f5..57d4c69adc 100644 --- a/faiss/AutoTune.h +++ b/faiss/AutoTune.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/CMakeLists.txt b/faiss/CMakeLists.txt index d0e46e5b32..a89082facd 100644 --- a/faiss/CMakeLists.txt +++ b/faiss/CMakeLists.txt @@ -1,7 +1,6 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# All rights reserved. +# Copyright (c) Meta Platforms, Inc. and affiliates. # -# This source code is licensed under the BSD-style license found in the +# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. set(FAISS_SRC diff --git a/faiss/Clustering.cpp b/faiss/Clustering.cpp index 16aefe8e83..e557deaa51 100644 --- a/faiss/Clustering.cpp +++ b/faiss/Clustering.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/Clustering.h b/faiss/Clustering.h index 520225904a..95594d1309 100644 --- a/faiss/Clustering.h +++ b/faiss/Clustering.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IVFlib.cpp b/faiss/IVFlib.cpp index f2c975f4de..83812f6abe 100644 --- a/faiss/IVFlib.cpp +++ b/faiss/IVFlib.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IVFlib.h b/faiss/IVFlib.h index 5524b41e2b..6f6a590c72 100644 --- a/faiss/IVFlib.h +++ b/faiss/IVFlib.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/Index.cpp b/faiss/Index.cpp index ce5aa956c1..9f83dbe310 100644 --- a/faiss/Index.cpp +++ b/faiss/Index.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/Index.h b/faiss/Index.h index 1773758628..2c3e62d718 100644 --- a/faiss/Index.h +++ b/faiss/Index.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/Index2Layer.cpp b/faiss/Index2Layer.cpp index 743dac6cea..6a1669fd57 100644 --- a/faiss/Index2Layer.cpp +++ b/faiss/Index2Layer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/Index2Layer.h b/faiss/Index2Layer.h index 2068ad0555..5c727d0965 100644 --- a/faiss/Index2Layer.h +++ b/faiss/Index2Layer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexAdditiveQuantizer.cpp b/faiss/IndexAdditiveQuantizer.cpp index 2e410a79e0..10f4e121b9 100644 --- a/faiss/IndexAdditiveQuantizer.cpp +++ b/faiss/IndexAdditiveQuantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexAdditiveQuantizer.h b/faiss/IndexAdditiveQuantizer.h index 48f54c8b3d..31e3c8c0a4 100644 --- a/faiss/IndexAdditiveQuantizer.h +++ b/faiss/IndexAdditiveQuantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexAdditiveQuantizerFastScan.cpp b/faiss/IndexAdditiveQuantizerFastScan.cpp index 1ad4d60926..cb3097ac22 100644 --- a/faiss/IndexAdditiveQuantizerFastScan.cpp +++ b/faiss/IndexAdditiveQuantizerFastScan.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexAdditiveQuantizerFastScan.h b/faiss/IndexAdditiveQuantizerFastScan.h index d7d23336f0..93a4c807b6 100644 --- a/faiss/IndexAdditiveQuantizerFastScan.h +++ b/faiss/IndexAdditiveQuantizerFastScan.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinary.cpp b/faiss/IndexBinary.cpp index 2bc7c56cc1..8d3e335aca 100644 --- a/faiss/IndexBinary.cpp +++ b/faiss/IndexBinary.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinary.h b/faiss/IndexBinary.h index a026f34177..2546b04a34 100644 --- a/faiss/IndexBinary.h +++ b/faiss/IndexBinary.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinaryFlat.cpp b/faiss/IndexBinaryFlat.cpp index 89a9f6a147..ee15e59f17 100644 --- a/faiss/IndexBinaryFlat.cpp +++ b/faiss/IndexBinaryFlat.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinaryFlat.h b/faiss/IndexBinaryFlat.h index 4664529e52..f6188322ad 100644 --- a/faiss/IndexBinaryFlat.h +++ b/faiss/IndexBinaryFlat.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinaryFromFloat.cpp b/faiss/IndexBinaryFromFloat.cpp index 407c919958..efc68fffa0 100644 --- a/faiss/IndexBinaryFromFloat.cpp +++ b/faiss/IndexBinaryFromFloat.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinaryFromFloat.h b/faiss/IndexBinaryFromFloat.h index 3f6c98c979..49e19628b9 100644 --- a/faiss/IndexBinaryFromFloat.h +++ b/faiss/IndexBinaryFromFloat.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinaryHNSW.cpp b/faiss/IndexBinaryHNSW.cpp index f1bda08fbc..73853c4e75 100644 --- a/faiss/IndexBinaryHNSW.cpp +++ b/faiss/IndexBinaryHNSW.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinaryHNSW.h b/faiss/IndexBinaryHNSW.h index cda3c0b245..a40b16e0bf 100644 --- a/faiss/IndexBinaryHNSW.h +++ b/faiss/IndexBinaryHNSW.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinaryHash.cpp b/faiss/IndexBinaryHash.cpp index aca332d8d8..0d514435f0 100644 --- a/faiss/IndexBinaryHash.cpp +++ b/faiss/IndexBinaryHash.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinaryHash.h b/faiss/IndexBinaryHash.h index 224d0e21eb..43b10cf771 100644 --- a/faiss/IndexBinaryHash.h +++ b/faiss/IndexBinaryHash.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinaryIVF.cpp b/faiss/IndexBinaryIVF.cpp index ab1b9fd89a..69c37b3171 100644 --- a/faiss/IndexBinaryIVF.cpp +++ b/faiss/IndexBinaryIVF.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexBinaryIVF.h b/faiss/IndexBinaryIVF.h index 8b0534f173..0b563b4cc0 100644 --- a/faiss/IndexBinaryIVF.h +++ b/faiss/IndexBinaryIVF.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexFastScan.cpp b/faiss/IndexFastScan.cpp index 36ebafe931..cc4f1bddcb 100644 --- a/faiss/IndexFastScan.cpp +++ b/faiss/IndexFastScan.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexFastScan.h b/faiss/IndexFastScan.h index 3c89dcf928..b9787bf7cd 100644 --- a/faiss/IndexFastScan.h +++ b/faiss/IndexFastScan.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexFlat.cpp b/faiss/IndexFlat.cpp index 7d29ca5387..e1fcc6d999 100644 --- a/faiss/IndexFlat.cpp +++ b/faiss/IndexFlat.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexFlat.h b/faiss/IndexFlat.h index ac15cae467..876a2ec2fa 100644 --- a/faiss/IndexFlat.h +++ b/faiss/IndexFlat.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexFlatCodes.cpp b/faiss/IndexFlatCodes.cpp index 919a51d2f8..ec9a9a9b2d 100644 --- a/faiss/IndexFlatCodes.cpp +++ b/faiss/IndexFlatCodes.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexFlatCodes.h b/faiss/IndexFlatCodes.h index 787e2bb2d3..1dafffc6b3 100644 --- a/faiss/IndexFlatCodes.h +++ b/faiss/IndexFlatCodes.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexHNSW.cpp b/faiss/IndexHNSW.cpp index 6a1186ca6a..23922cc0b8 100644 --- a/faiss/IndexHNSW.cpp +++ b/faiss/IndexHNSW.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexHNSW.h b/faiss/IndexHNSW.h index 0768eb88b9..c796d7e18a 100644 --- a/faiss/IndexHNSW.h +++ b/faiss/IndexHNSW.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIDMap.cpp b/faiss/IndexIDMap.cpp index dc84052b2f..8c70fb2dec 100644 --- a/faiss/IndexIDMap.cpp +++ b/faiss/IndexIDMap.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIDMap.h b/faiss/IndexIDMap.h index 2d16412301..7b59d7b161 100644 --- a/faiss/IndexIDMap.h +++ b/faiss/IndexIDMap.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVF.cpp b/faiss/IndexIVF.cpp index 14830475d9..004bbdc03c 100644 --- a/faiss/IndexIVF.cpp +++ b/faiss/IndexIVF.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVF.h b/faiss/IndexIVF.h index e7822589ca..d8ed048075 100644 --- a/faiss/IndexIVF.h +++ b/faiss/IndexIVF.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFAdditiveQuantizer.cpp b/faiss/IndexIVFAdditiveQuantizer.cpp index 1b1a4571de..01ae9a072b 100644 --- a/faiss/IndexIVFAdditiveQuantizer.cpp +++ b/faiss/IndexIVFAdditiveQuantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFAdditiveQuantizer.h b/faiss/IndexIVFAdditiveQuantizer.h index ecd5a7bda6..dfb22d1110 100644 --- a/faiss/IndexIVFAdditiveQuantizer.h +++ b/faiss/IndexIVFAdditiveQuantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFAdditiveQuantizerFastScan.cpp b/faiss/IndexIVFAdditiveQuantizerFastScan.cpp index 23a2de554d..9bc0abd15d 100644 --- a/faiss/IndexIVFAdditiveQuantizerFastScan.cpp +++ b/faiss/IndexIVFAdditiveQuantizerFastScan.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFAdditiveQuantizerFastScan.h b/faiss/IndexIVFAdditiveQuantizerFastScan.h index 643628dec1..77f535c923 100644 --- a/faiss/IndexIVFAdditiveQuantizerFastScan.h +++ b/faiss/IndexIVFAdditiveQuantizerFastScan.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFFastScan.cpp b/faiss/IndexIVFFastScan.cpp index b1f512c3d7..84aa508c37 100644 --- a/faiss/IndexIVFFastScan.cpp +++ b/faiss/IndexIVFFastScan.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFFastScan.h b/faiss/IndexIVFFastScan.h index 9d4c4910d3..054c803a18 100644 --- a/faiss/IndexIVFFastScan.h +++ b/faiss/IndexIVFFastScan.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFFlat.cpp b/faiss/IndexIVFFlat.cpp index 1b36fea379..2b2d9dbae4 100644 --- a/faiss/IndexIVFFlat.cpp +++ b/faiss/IndexIVFFlat.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFFlat.h b/faiss/IndexIVFFlat.h index 8e47547e02..919bca2b25 100644 --- a/faiss/IndexIVFFlat.h +++ b/faiss/IndexIVFFlat.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFIndependentQuantizer.cpp b/faiss/IndexIVFIndependentQuantizer.cpp index 2073dd2ee4..ae94982330 100644 --- a/faiss/IndexIVFIndependentQuantizer.cpp +++ b/faiss/IndexIVFIndependentQuantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFIndependentQuantizer.h b/faiss/IndexIVFIndependentQuantizer.h index 4fe1666616..ff3c63b8f7 100644 --- a/faiss/IndexIVFIndependentQuantizer.h +++ b/faiss/IndexIVFIndependentQuantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFPQ.cpp b/faiss/IndexIVFPQ.cpp index 100f499cc5..c1adf981ac 100644 --- a/faiss/IndexIVFPQ.cpp +++ b/faiss/IndexIVFPQ.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFPQ.h b/faiss/IndexIVFPQ.h index d5d21da49d..7bf97ec0f3 100644 --- a/faiss/IndexIVFPQ.h +++ b/faiss/IndexIVFPQ.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFPQFastScan.cpp b/faiss/IndexIVFPQFastScan.cpp index 2844ae4936..438edd9057 100644 --- a/faiss/IndexIVFPQFastScan.cpp +++ b/faiss/IndexIVFPQFastScan.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFPQFastScan.h b/faiss/IndexIVFPQFastScan.h index 00dd2f11dd..a2cce3266b 100644 --- a/faiss/IndexIVFPQFastScan.h +++ b/faiss/IndexIVFPQFastScan.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFPQR.cpp b/faiss/IndexIVFPQR.cpp index f55332cddf..8f76c86b1c 100644 --- a/faiss/IndexIVFPQR.cpp +++ b/faiss/IndexIVFPQR.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFPQR.h b/faiss/IndexIVFPQR.h index 7642d2f232..1c61d6cfd2 100644 --- a/faiss/IndexIVFPQR.h +++ b/faiss/IndexIVFPQR.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFSpectralHash.cpp b/faiss/IndexIVFSpectralHash.cpp index 14741691d0..ab8cd8221f 100644 --- a/faiss/IndexIVFSpectralHash.cpp +++ b/faiss/IndexIVFSpectralHash.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexIVFSpectralHash.h b/faiss/IndexIVFSpectralHash.h index ae7df58e40..9f11105c11 100644 --- a/faiss/IndexIVFSpectralHash.h +++ b/faiss/IndexIVFSpectralHash.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexLSH.cpp b/faiss/IndexLSH.cpp index c2cbcb8b46..1f44c6116c 100644 --- a/faiss/IndexLSH.cpp +++ b/faiss/IndexLSH.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexLSH.h b/faiss/IndexLSH.h index bba0f97489..cc3bbcc8fe 100644 --- a/faiss/IndexLSH.h +++ b/faiss/IndexLSH.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexLattice.cpp b/faiss/IndexLattice.cpp index 4da9c9ff61..b550e8d7b9 100644 --- a/faiss/IndexLattice.cpp +++ b/faiss/IndexLattice.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexLattice.h b/faiss/IndexLattice.h index f814c4aff1..beec8da699 100644 --- a/faiss/IndexLattice.h +++ b/faiss/IndexLattice.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexNNDescent.cpp b/faiss/IndexNNDescent.cpp index 382e9c41c6..696a979b39 100644 --- a/faiss/IndexNNDescent.cpp +++ b/faiss/IndexNNDescent.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexNNDescent.h b/faiss/IndexNNDescent.h index 1db11c36a0..0de302b586 100644 --- a/faiss/IndexNNDescent.h +++ b/faiss/IndexNNDescent.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexNSG.cpp b/faiss/IndexNSG.cpp index 45a547b93b..bd0b00e865 100644 --- a/faiss/IndexNSG.cpp +++ b/faiss/IndexNSG.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexNSG.h b/faiss/IndexNSG.h index 401d00a99c..8d26968e05 100644 --- a/faiss/IndexNSG.h +++ b/faiss/IndexNSG.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexNeuralNetCodec.cpp b/faiss/IndexNeuralNetCodec.cpp index 3109dce7dc..022c5b1760 100644 --- a/faiss/IndexNeuralNetCodec.cpp +++ b/faiss/IndexNeuralNetCodec.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexNeuralNetCodec.h b/faiss/IndexNeuralNetCodec.h index 7c581e80e8..6ce405a75f 100644 --- a/faiss/IndexNeuralNetCodec.h +++ b/faiss/IndexNeuralNetCodec.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexPQ.cpp b/faiss/IndexPQ.cpp index b1ac990af1..7037c24322 100644 --- a/faiss/IndexPQ.cpp +++ b/faiss/IndexPQ.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexPQ.h b/faiss/IndexPQ.h index c806c7f186..2954f580f0 100644 --- a/faiss/IndexPQ.h +++ b/faiss/IndexPQ.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexPQFastScan.cpp b/faiss/IndexPQFastScan.cpp index b8a6cdbeeb..5eb716df1a 100644 --- a/faiss/IndexPQFastScan.cpp +++ b/faiss/IndexPQFastScan.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexPQFastScan.h b/faiss/IndexPQFastScan.h index 220da378cc..495aad47e2 100644 --- a/faiss/IndexPQFastScan.h +++ b/faiss/IndexPQFastScan.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexPreTransform.cpp b/faiss/IndexPreTransform.cpp index 8bc847a957..a3b14c6c47 100644 --- a/faiss/IndexPreTransform.cpp +++ b/faiss/IndexPreTransform.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexPreTransform.h b/faiss/IndexPreTransform.h index ab7193e60f..31db101152 100644 --- a/faiss/IndexPreTransform.h +++ b/faiss/IndexPreTransform.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexRefine.cpp b/faiss/IndexRefine.cpp index 4f1d34d5bf..01dd97a08b 100644 --- a/faiss/IndexRefine.cpp +++ b/faiss/IndexRefine.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexRefine.h b/faiss/IndexRefine.h index 23687af9f8..9ad4e4be29 100644 --- a/faiss/IndexRefine.h +++ b/faiss/IndexRefine.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexReplicas.cpp b/faiss/IndexReplicas.cpp index 85f3fda746..91dd0d23a0 100644 --- a/faiss/IndexReplicas.cpp +++ b/faiss/IndexReplicas.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexReplicas.h b/faiss/IndexReplicas.h index 84b12a7b8f..c3430eef23 100644 --- a/faiss/IndexReplicas.h +++ b/faiss/IndexReplicas.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexRowwiseMinMax.cpp b/faiss/IndexRowwiseMinMax.cpp index 045bc3061a..10fac48510 100644 --- a/faiss/IndexRowwiseMinMax.cpp +++ b/faiss/IndexRowwiseMinMax.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexRowwiseMinMax.h b/faiss/IndexRowwiseMinMax.h index 5e16da4b42..bca9e07998 100644 --- a/faiss/IndexRowwiseMinMax.h +++ b/faiss/IndexRowwiseMinMax.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexScalarQuantizer.cpp b/faiss/IndexScalarQuantizer.cpp index 44a628f000..ecb4fefe1e 100644 --- a/faiss/IndexScalarQuantizer.cpp +++ b/faiss/IndexScalarQuantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexScalarQuantizer.h b/faiss/IndexScalarQuantizer.h index 27332500c1..36054f8849 100644 --- a/faiss/IndexScalarQuantizer.h +++ b/faiss/IndexScalarQuantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexShards.cpp b/faiss/IndexShards.cpp index 716e69a594..d7cc87afe1 100644 --- a/faiss/IndexShards.cpp +++ b/faiss/IndexShards.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexShards.h b/faiss/IndexShards.h index 278d5724aa..75c716e1c6 100644 --- a/faiss/IndexShards.h +++ b/faiss/IndexShards.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexShardsIVF.cpp b/faiss/IndexShardsIVF.cpp index 33c8f0e3e6..d75e051388 100644 --- a/faiss/IndexShardsIVF.cpp +++ b/faiss/IndexShardsIVF.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/IndexShardsIVF.h b/faiss/IndexShardsIVF.h index 8b17e22b8e..bc18122e72 100644 --- a/faiss/IndexShardsIVF.h +++ b/faiss/IndexShardsIVF.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/MatrixStats.cpp b/faiss/MatrixStats.cpp index f2f9a431e5..22b6cbd755 100644 --- a/faiss/MatrixStats.cpp +++ b/faiss/MatrixStats.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/MatrixStats.h b/faiss/MatrixStats.h index 45a7c97da4..2fe8edb6b4 100644 --- a/faiss/MatrixStats.h +++ b/faiss/MatrixStats.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/MetaIndexes.cpp b/faiss/MetaIndexes.cpp index afa9ecc355..3577ca1309 100644 --- a/faiss/MetaIndexes.cpp +++ b/faiss/MetaIndexes.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/MetaIndexes.h b/faiss/MetaIndexes.h index d94809cd4a..ae6558c5dc 100644 --- a/faiss/MetaIndexes.h +++ b/faiss/MetaIndexes.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/MetricType.h b/faiss/MetricType.h index 8e889b1a03..a09ff7a595 100644 --- a/faiss/MetricType.h +++ b/faiss/MetricType.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/VectorTransform.cpp b/faiss/VectorTransform.cpp index b0421bef9f..e325562686 100644 --- a/faiss/VectorTransform.cpp +++ b/faiss/VectorTransform.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/VectorTransform.h b/faiss/VectorTransform.h index 55e46e81d5..8c4e1e4ba0 100644 --- a/faiss/VectorTransform.h +++ b/faiss/VectorTransform.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/clone_index.cpp b/faiss/clone_index.cpp index db16455f92..7174cd6ae0 100644 --- a/faiss/clone_index.cpp +++ b/faiss/clone_index.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/clone_index.h b/faiss/clone_index.h index 397c0ff5f7..a3ae0e41a1 100644 --- a/faiss/clone_index.h +++ b/faiss/clone_index.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/SaDecodeKernels.h b/faiss/cppcontrib/SaDecodeKernels.h index ae333e1f1b..b0e7efe1fc 100644 --- a/faiss/cppcontrib/SaDecodeKernels.h +++ b/faiss/cppcontrib/SaDecodeKernels.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/detail/CoarseBitType.h b/faiss/cppcontrib/detail/CoarseBitType.h index 7b438fedae..2fc8e8d0d7 100644 --- a/faiss/cppcontrib/detail/CoarseBitType.h +++ b/faiss/cppcontrib/detail/CoarseBitType.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/detail/UintReader.h b/faiss/cppcontrib/detail/UintReader.h index 4a64a1a254..b02dc41917 100644 --- a/faiss/cppcontrib/detail/UintReader.h +++ b/faiss/cppcontrib/detail/UintReader.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/factory_tools.cpp b/faiss/cppcontrib/factory_tools.cpp index 76cbe73efe..743e58effe 100644 --- a/faiss/cppcontrib/factory_tools.cpp +++ b/faiss/cppcontrib/factory_tools.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/factory_tools.h b/faiss/cppcontrib/factory_tools.h index bde4971854..50bc76ea73 100644 --- a/faiss/cppcontrib/factory_tools.h +++ b/faiss/cppcontrib/factory_tools.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/sa_decode/Level2-avx2-inl.h b/faiss/cppcontrib/sa_decode/Level2-avx2-inl.h index 75ca7b8e4b..801029e699 100644 --- a/faiss/cppcontrib/sa_decode/Level2-avx2-inl.h +++ b/faiss/cppcontrib/sa_decode/Level2-avx2-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/sa_decode/Level2-inl.h b/faiss/cppcontrib/sa_decode/Level2-inl.h index 1eb7767ba8..1d03e81e2d 100644 --- a/faiss/cppcontrib/sa_decode/Level2-inl.h +++ b/faiss/cppcontrib/sa_decode/Level2-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/sa_decode/Level2-neon-inl.h b/faiss/cppcontrib/sa_decode/Level2-neon-inl.h index 20e815a01d..51daec4260 100644 --- a/faiss/cppcontrib/sa_decode/Level2-neon-inl.h +++ b/faiss/cppcontrib/sa_decode/Level2-neon-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/sa_decode/MinMax-inl.h b/faiss/cppcontrib/sa_decode/MinMax-inl.h index a310bebfce..90a5bf3740 100644 --- a/faiss/cppcontrib/sa_decode/MinMax-inl.h +++ b/faiss/cppcontrib/sa_decode/MinMax-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h b/faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h index b7375fb9c4..6eb542a54d 100644 --- a/faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h +++ b/faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/sa_decode/PQ-avx2-inl.h b/faiss/cppcontrib/sa_decode/PQ-avx2-inl.h index d63f52afed..147ef4fddf 100644 --- a/faiss/cppcontrib/sa_decode/PQ-avx2-inl.h +++ b/faiss/cppcontrib/sa_decode/PQ-avx2-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/sa_decode/PQ-inl.h b/faiss/cppcontrib/sa_decode/PQ-inl.h index de6622de49..1ef0df8e47 100644 --- a/faiss/cppcontrib/sa_decode/PQ-inl.h +++ b/faiss/cppcontrib/sa_decode/PQ-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/cppcontrib/sa_decode/PQ-neon-inl.h b/faiss/cppcontrib/sa_decode/PQ-neon-inl.h index a84014d26b..1ee278e25c 100644 --- a/faiss/cppcontrib/sa_decode/PQ-neon-inl.h +++ b/faiss/cppcontrib/sa_decode/PQ-neon-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuAutoTune.cpp b/faiss/gpu/GpuAutoTune.cpp index 4a7ba5ffcb..8cdb3210fa 100644 --- a/faiss/gpu/GpuAutoTune.cpp +++ b/faiss/gpu/GpuAutoTune.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuAutoTune.h b/faiss/gpu/GpuAutoTune.h index fbe9a11d66..b61f015b80 100644 --- a/faiss/gpu/GpuAutoTune.h +++ b/faiss/gpu/GpuAutoTune.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuCloner.cpp b/faiss/gpu/GpuCloner.cpp index b6d55a47aa..a5a57da770 100644 --- a/faiss/gpu/GpuCloner.cpp +++ b/faiss/gpu/GpuCloner.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuCloner.h b/faiss/gpu/GpuCloner.h index 105e83a0c5..d92d81ffe1 100644 --- a/faiss/gpu/GpuCloner.h +++ b/faiss/gpu/GpuCloner.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuClonerOptions.h b/faiss/gpu/GpuClonerOptions.h index e643e848fb..f3788fd170 100644 --- a/faiss/gpu/GpuClonerOptions.h +++ b/faiss/gpu/GpuClonerOptions.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuDistance.h b/faiss/gpu/GpuDistance.h index 17dbee617b..54777058a6 100644 --- a/faiss/gpu/GpuDistance.h +++ b/faiss/gpu/GpuDistance.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuFaissAssert.h b/faiss/gpu/GpuFaissAssert.h index 4986a0bca5..d17f98c69b 100644 --- a/faiss/gpu/GpuFaissAssert.h +++ b/faiss/gpu/GpuFaissAssert.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIcmEncoder.cu b/faiss/gpu/GpuIcmEncoder.cu index 8bd60f91b8..999dd998a0 100644 --- a/faiss/gpu/GpuIcmEncoder.cu +++ b/faiss/gpu/GpuIcmEncoder.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIcmEncoder.h b/faiss/gpu/GpuIcmEncoder.h index 463027bb65..5bf13a2d2f 100644 --- a/faiss/gpu/GpuIcmEncoder.h +++ b/faiss/gpu/GpuIcmEncoder.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndex.cu b/faiss/gpu/GpuIndex.cu index f91b7dc9c5..0740ad4dab 100644 --- a/faiss/gpu/GpuIndex.cu +++ b/faiss/gpu/GpuIndex.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexBinaryFlat.cu b/faiss/gpu/GpuIndexBinaryFlat.cu index 0d4163e399..e72638d60f 100644 --- a/faiss/gpu/GpuIndexBinaryFlat.cu +++ b/faiss/gpu/GpuIndexBinaryFlat.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexBinaryFlat.h b/faiss/gpu/GpuIndexBinaryFlat.h index a62aed1549..32b76d6b47 100644 --- a/faiss/gpu/GpuIndexBinaryFlat.h +++ b/faiss/gpu/GpuIndexBinaryFlat.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexFlat.cu b/faiss/gpu/GpuIndexFlat.cu index d361a7182a..baa27d6e85 100644 --- a/faiss/gpu/GpuIndexFlat.cu +++ b/faiss/gpu/GpuIndexFlat.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexFlat.h b/faiss/gpu/GpuIndexFlat.h index 96c9505bba..ee4c14466e 100644 --- a/faiss/gpu/GpuIndexFlat.h +++ b/faiss/gpu/GpuIndexFlat.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexIVF.cu b/faiss/gpu/GpuIndexIVF.cu index 40129a54c5..846bc197e4 100644 --- a/faiss/gpu/GpuIndexIVF.cu +++ b/faiss/gpu/GpuIndexIVF.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexIVF.h b/faiss/gpu/GpuIndexIVF.h index 65a27aa94e..d6fd5b6ffa 100644 --- a/faiss/gpu/GpuIndexIVF.h +++ b/faiss/gpu/GpuIndexIVF.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexIVFFlat.cu b/faiss/gpu/GpuIndexIVFFlat.cu index 884b5b0fc0..0d8396b193 100644 --- a/faiss/gpu/GpuIndexIVFFlat.cu +++ b/faiss/gpu/GpuIndexIVFFlat.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexIVFFlat.h b/faiss/gpu/GpuIndexIVFFlat.h index 1401e2b291..d6826cd9f9 100644 --- a/faiss/gpu/GpuIndexIVFFlat.h +++ b/faiss/gpu/GpuIndexIVFFlat.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexIVFPQ.cu b/faiss/gpu/GpuIndexIVFPQ.cu index d39f036b89..27cc7ecc9e 100644 --- a/faiss/gpu/GpuIndexIVFPQ.cu +++ b/faiss/gpu/GpuIndexIVFPQ.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexIVFPQ.h b/faiss/gpu/GpuIndexIVFPQ.h index 1084d4d0d2..06b0cad274 100644 --- a/faiss/gpu/GpuIndexIVFPQ.h +++ b/faiss/gpu/GpuIndexIVFPQ.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexIVFScalarQuantizer.cu b/faiss/gpu/GpuIndexIVFScalarQuantizer.cu index 7c21a770d0..3c856ba5ee 100644 --- a/faiss/gpu/GpuIndexIVFScalarQuantizer.cu +++ b/faiss/gpu/GpuIndexIVFScalarQuantizer.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndexIVFScalarQuantizer.h b/faiss/gpu/GpuIndexIVFScalarQuantizer.h index af966bc8ac..44a8c1b5a8 100644 --- a/faiss/gpu/GpuIndexIVFScalarQuantizer.h +++ b/faiss/gpu/GpuIndexIVFScalarQuantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/GpuIndicesOptions.h b/faiss/gpu/GpuIndicesOptions.h index 2f318ed217..2d305ab227 100644 --- a/faiss/gpu/GpuIndicesOptions.h +++ b/faiss/gpu/GpuIndicesOptions.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/BinaryDistance.cu b/faiss/gpu/impl/BinaryDistance.cu index 4ea5004442..5061e4705c 100644 --- a/faiss/gpu/impl/BinaryDistance.cu +++ b/faiss/gpu/impl/BinaryDistance.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/BinaryDistance.cuh b/faiss/gpu/impl/BinaryDistance.cuh index 6192f3ba42..752435357d 100644 --- a/faiss/gpu/impl/BinaryDistance.cuh +++ b/faiss/gpu/impl/BinaryDistance.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/BinaryFlatIndex.cu b/faiss/gpu/impl/BinaryFlatIndex.cu index 8d69b91073..fd148b3149 100644 --- a/faiss/gpu/impl/BinaryFlatIndex.cu +++ b/faiss/gpu/impl/BinaryFlatIndex.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/BinaryFlatIndex.cuh b/faiss/gpu/impl/BinaryFlatIndex.cuh index 4db0ea0caa..4047618790 100644 --- a/faiss/gpu/impl/BinaryFlatIndex.cuh +++ b/faiss/gpu/impl/BinaryFlatIndex.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/BroadcastSum.cu b/faiss/gpu/impl/BroadcastSum.cu index 9bd873bdbf..9a0a92795e 100644 --- a/faiss/gpu/impl/BroadcastSum.cu +++ b/faiss/gpu/impl/BroadcastSum.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/BroadcastSum.cuh b/faiss/gpu/impl/BroadcastSum.cuh index 87aeb2b367..9a421f19b5 100644 --- a/faiss/gpu/impl/BroadcastSum.cuh +++ b/faiss/gpu/impl/BroadcastSum.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/Distance.cu b/faiss/gpu/impl/Distance.cu index 4211bac961..3ac99b2576 100644 --- a/faiss/gpu/impl/Distance.cu +++ b/faiss/gpu/impl/Distance.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/Distance.cuh b/faiss/gpu/impl/Distance.cuh index b9ea4242ff..17d21f4d9a 100644 --- a/faiss/gpu/impl/Distance.cuh +++ b/faiss/gpu/impl/Distance.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/DistanceUtils.cuh b/faiss/gpu/impl/DistanceUtils.cuh index 530382b40e..fd894ae3bd 100644 --- a/faiss/gpu/impl/DistanceUtils.cuh +++ b/faiss/gpu/impl/DistanceUtils.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/GeneralDistance.cuh b/faiss/gpu/impl/GeneralDistance.cuh index cf2c82b896..cc60794a04 100644 --- a/faiss/gpu/impl/GeneralDistance.cuh +++ b/faiss/gpu/impl/GeneralDistance.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/GpuScalarQuantizer.cuh b/faiss/gpu/impl/GpuScalarQuantizer.cuh index 437928041a..cb7454cf11 100644 --- a/faiss/gpu/impl/GpuScalarQuantizer.cuh +++ b/faiss/gpu/impl/GpuScalarQuantizer.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFAppend.cu b/faiss/gpu/impl/IVFAppend.cu index 65af470cd3..ba5cedf3c7 100644 --- a/faiss/gpu/impl/IVFAppend.cu +++ b/faiss/gpu/impl/IVFAppend.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFAppend.cuh b/faiss/gpu/impl/IVFAppend.cuh index cf1d745d9b..330957f639 100644 --- a/faiss/gpu/impl/IVFAppend.cuh +++ b/faiss/gpu/impl/IVFAppend.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFBase.cu b/faiss/gpu/impl/IVFBase.cu index 3b373b8280..4023aac398 100644 --- a/faiss/gpu/impl/IVFBase.cu +++ b/faiss/gpu/impl/IVFBase.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFBase.cuh b/faiss/gpu/impl/IVFBase.cuh index 26411aa4e9..965c6554e6 100644 --- a/faiss/gpu/impl/IVFBase.cuh +++ b/faiss/gpu/impl/IVFBase.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFFlat.cu b/faiss/gpu/impl/IVFFlat.cu index 9a7fd87d34..b6a8a3fd98 100644 --- a/faiss/gpu/impl/IVFFlat.cu +++ b/faiss/gpu/impl/IVFFlat.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFFlat.cuh b/faiss/gpu/impl/IVFFlat.cuh index 889b510795..cd592cde43 100644 --- a/faiss/gpu/impl/IVFFlat.cuh +++ b/faiss/gpu/impl/IVFFlat.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFFlatScan.cu b/faiss/gpu/impl/IVFFlatScan.cu index 66e9a396b6..457d0afeb6 100644 --- a/faiss/gpu/impl/IVFFlatScan.cu +++ b/faiss/gpu/impl/IVFFlatScan.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFFlatScan.cuh b/faiss/gpu/impl/IVFFlatScan.cuh index ebff37c31f..c00c4b4386 100644 --- a/faiss/gpu/impl/IVFFlatScan.cuh +++ b/faiss/gpu/impl/IVFFlatScan.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFInterleaved.cu b/faiss/gpu/impl/IVFInterleaved.cu index 9a98473f7b..e5b13f3aa8 100644 --- a/faiss/gpu/impl/IVFInterleaved.cu +++ b/faiss/gpu/impl/IVFInterleaved.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFInterleaved.cuh b/faiss/gpu/impl/IVFInterleaved.cuh index a3f218a212..f1da8342d4 100644 --- a/faiss/gpu/impl/IVFInterleaved.cuh +++ b/faiss/gpu/impl/IVFInterleaved.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFPQ.cu b/faiss/gpu/impl/IVFPQ.cu index a19f465b93..f20e6e69d7 100644 --- a/faiss/gpu/impl/IVFPQ.cu +++ b/faiss/gpu/impl/IVFPQ.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFPQ.cuh b/faiss/gpu/impl/IVFPQ.cuh index 0d17b02c9b..a9bf4b8f6a 100644 --- a/faiss/gpu/impl/IVFPQ.cuh +++ b/faiss/gpu/impl/IVFPQ.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFUtils.cu b/faiss/gpu/impl/IVFUtils.cu index ba9724ce46..b5ce9e4734 100644 --- a/faiss/gpu/impl/IVFUtils.cu +++ b/faiss/gpu/impl/IVFUtils.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFUtils.cuh b/faiss/gpu/impl/IVFUtils.cuh index 4609cadbff..b5a664e7f1 100644 --- a/faiss/gpu/impl/IVFUtils.cuh +++ b/faiss/gpu/impl/IVFUtils.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFUtilsSelect1.cu b/faiss/gpu/impl/IVFUtilsSelect1.cu index b778190bbb..3cb88bd9c7 100644 --- a/faiss/gpu/impl/IVFUtilsSelect1.cu +++ b/faiss/gpu/impl/IVFUtilsSelect1.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IVFUtilsSelect2.cu b/faiss/gpu/impl/IVFUtilsSelect2.cu index 9141a19959..3a94101bdb 100644 --- a/faiss/gpu/impl/IVFUtilsSelect2.cu +++ b/faiss/gpu/impl/IVFUtilsSelect2.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IcmEncoder.cu b/faiss/gpu/impl/IcmEncoder.cu index 13cb297282..20ff36e2d2 100644 --- a/faiss/gpu/impl/IcmEncoder.cu +++ b/faiss/gpu/impl/IcmEncoder.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IcmEncoder.cuh b/faiss/gpu/impl/IcmEncoder.cuh index 9577aae8b5..7e3171c13f 100644 --- a/faiss/gpu/impl/IcmEncoder.cuh +++ b/faiss/gpu/impl/IcmEncoder.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IndexUtils.cu b/faiss/gpu/impl/IndexUtils.cu index 1265e668a9..013c00b3ee 100644 --- a/faiss/gpu/impl/IndexUtils.cu +++ b/faiss/gpu/impl/IndexUtils.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/IndexUtils.h b/faiss/gpu/impl/IndexUtils.h index 3f3589bfc4..7d930f1cce 100644 --- a/faiss/gpu/impl/IndexUtils.h +++ b/faiss/gpu/impl/IndexUtils.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/InterleavedCodes.cpp b/faiss/gpu/impl/InterleavedCodes.cpp index 5a2dc4b770..6bb2c05f61 100644 --- a/faiss/gpu/impl/InterleavedCodes.cpp +++ b/faiss/gpu/impl/InterleavedCodes.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/InterleavedCodes.h b/faiss/gpu/impl/InterleavedCodes.h index 2014f7ec89..2badce1368 100644 --- a/faiss/gpu/impl/InterleavedCodes.h +++ b/faiss/gpu/impl/InterleavedCodes.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/L2Norm.cu b/faiss/gpu/impl/L2Norm.cu index 1834048d23..66eb06d0d7 100644 --- a/faiss/gpu/impl/L2Norm.cu +++ b/faiss/gpu/impl/L2Norm.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/L2Norm.cuh b/faiss/gpu/impl/L2Norm.cuh index c0447b91c1..fa798b75b7 100644 --- a/faiss/gpu/impl/L2Norm.cuh +++ b/faiss/gpu/impl/L2Norm.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/L2Select.cu b/faiss/gpu/impl/L2Select.cu index 660c513933..9c7f001298 100644 --- a/faiss/gpu/impl/L2Select.cu +++ b/faiss/gpu/impl/L2Select.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/L2Select.cuh b/faiss/gpu/impl/L2Select.cuh index c7edf528ca..c537edd187 100644 --- a/faiss/gpu/impl/L2Select.cuh +++ b/faiss/gpu/impl/L2Select.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/PQCodeDistances-inl.cuh b/faiss/gpu/impl/PQCodeDistances-inl.cuh index f054915b7e..e2e66f30c7 100644 --- a/faiss/gpu/impl/PQCodeDistances-inl.cuh +++ b/faiss/gpu/impl/PQCodeDistances-inl.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/PQCodeDistances.cuh b/faiss/gpu/impl/PQCodeDistances.cuh index 007e7c0d22..9d2108259e 100644 --- a/faiss/gpu/impl/PQCodeDistances.cuh +++ b/faiss/gpu/impl/PQCodeDistances.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/PQCodeLoad.cuh b/faiss/gpu/impl/PQCodeLoad.cuh index fcca5c3ad1..4669bf4278 100644 --- a/faiss/gpu/impl/PQCodeLoad.cuh +++ b/faiss/gpu/impl/PQCodeLoad.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/PQScanMultiPassNoPrecomputed-inl.cuh b/faiss/gpu/impl/PQScanMultiPassNoPrecomputed-inl.cuh index 8a1fd82c32..8a48ef4ae7 100644 --- a/faiss/gpu/impl/PQScanMultiPassNoPrecomputed-inl.cuh +++ b/faiss/gpu/impl/PQScanMultiPassNoPrecomputed-inl.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/PQScanMultiPassNoPrecomputed.cuh b/faiss/gpu/impl/PQScanMultiPassNoPrecomputed.cuh index 19f17c8117..bed13217d0 100644 --- a/faiss/gpu/impl/PQScanMultiPassNoPrecomputed.cuh +++ b/faiss/gpu/impl/PQScanMultiPassNoPrecomputed.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/PQScanMultiPassPrecomputed.cu b/faiss/gpu/impl/PQScanMultiPassPrecomputed.cu index f50388a08c..4c4cdc4618 100644 --- a/faiss/gpu/impl/PQScanMultiPassPrecomputed.cu +++ b/faiss/gpu/impl/PQScanMultiPassPrecomputed.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/PQScanMultiPassPrecomputed.cuh b/faiss/gpu/impl/PQScanMultiPassPrecomputed.cuh index 931196928f..7da19aab07 100644 --- a/faiss/gpu/impl/PQScanMultiPassPrecomputed.cuh +++ b/faiss/gpu/impl/PQScanMultiPassPrecomputed.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/RemapIndices.cpp b/faiss/gpu/impl/RemapIndices.cpp index 49d969a21f..42d5e521aa 100644 --- a/faiss/gpu/impl/RemapIndices.cpp +++ b/faiss/gpu/impl/RemapIndices.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/RemapIndices.h b/faiss/gpu/impl/RemapIndices.h index f109d3fc45..997339eee6 100644 --- a/faiss/gpu/impl/RemapIndices.h +++ b/faiss/gpu/impl/RemapIndices.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/VectorResidual.cu b/faiss/gpu/impl/VectorResidual.cu index 75ffb9ef48..cba7d9073c 100644 --- a/faiss/gpu/impl/VectorResidual.cu +++ b/faiss/gpu/impl/VectorResidual.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/VectorResidual.cuh b/faiss/gpu/impl/VectorResidual.cuh index 6979f00e3c..2206e9a3ac 100644 --- a/faiss/gpu/impl/VectorResidual.cuh +++ b/faiss/gpu/impl/VectorResidual.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/scan/IVFInterleavedImpl.cuh b/faiss/gpu/impl/scan/IVFInterleavedImpl.cuh index f52753e5f3..75c228c11a 100644 --- a/faiss/gpu/impl/scan/IVFInterleavedImpl.cuh +++ b/faiss/gpu/impl/scan/IVFInterleavedImpl.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/impl/scan/IVFInterleavedScanKernelTemplate.cu b/faiss/gpu/impl/scan/IVFInterleavedScanKernelTemplate.cu index bad10027c8..1481f4d120 100644 --- a/faiss/gpu/impl/scan/IVFInterleavedScanKernelTemplate.cu +++ b/faiss/gpu/impl/scan/IVFInterleavedScanKernelTemplate.cu @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the diff --git a/faiss/gpu/perf/IndexWrapper-inl.h b/faiss/gpu/perf/IndexWrapper-inl.h index ba3278d345..b43a5b3cf2 100644 --- a/faiss/gpu/perf/IndexWrapper-inl.h +++ b/faiss/gpu/perf/IndexWrapper-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/perf/IndexWrapper.h b/faiss/gpu/perf/IndexWrapper.h index 5043a875bd..bfc2cc921f 100644 --- a/faiss/gpu/perf/IndexWrapper.h +++ b/faiss/gpu/perf/IndexWrapper.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/perf/PerfBinaryFlat.cu b/faiss/gpu/perf/PerfBinaryFlat.cu index 202cbce46a..7ac6a933d6 100644 --- a/faiss/gpu/perf/PerfBinaryFlat.cu +++ b/faiss/gpu/perf/PerfBinaryFlat.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/perf/PerfClustering.cpp b/faiss/gpu/perf/PerfClustering.cpp index 532557fe20..72bc738274 100644 --- a/faiss/gpu/perf/PerfClustering.cpp +++ b/faiss/gpu/perf/PerfClustering.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/perf/PerfFlat.cu b/faiss/gpu/perf/PerfFlat.cu index 9db807a52f..ee40aa7f4e 100644 --- a/faiss/gpu/perf/PerfFlat.cu +++ b/faiss/gpu/perf/PerfFlat.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/perf/PerfIVFFlat.cu b/faiss/gpu/perf/PerfIVFFlat.cu index a3584ba387..b73fed3a86 100644 --- a/faiss/gpu/perf/PerfIVFFlat.cu +++ b/faiss/gpu/perf/PerfIVFFlat.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/perf/PerfIVFPQ.cu b/faiss/gpu/perf/PerfIVFPQ.cu index baae8af23b..7404ee2f4e 100644 --- a/faiss/gpu/perf/PerfIVFPQ.cu +++ b/faiss/gpu/perf/PerfIVFPQ.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/perf/PerfIVFPQAdd.cpp b/faiss/gpu/perf/PerfIVFPQAdd.cpp index 9842a5273f..90caefcd6a 100644 --- a/faiss/gpu/perf/PerfIVFPQAdd.cpp +++ b/faiss/gpu/perf/PerfIVFPQAdd.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/perf/PerfSelect.cu b/faiss/gpu/perf/PerfSelect.cu index 9cc2406923..64c9a019f2 100644 --- a/faiss/gpu/perf/PerfSelect.cu +++ b/faiss/gpu/perf/PerfSelect.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/perf/WriteIndex.cpp b/faiss/gpu/perf/WriteIndex.cpp index 7dab8fa743..c5912c66cb 100644 --- a/faiss/gpu/perf/WriteIndex.cpp +++ b/faiss/gpu/perf/WriteIndex.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/perf/slow.py b/faiss/gpu/perf/slow.py index 4559bb4e35..5369dc062d 100755 --- a/faiss/gpu/perf/slow.py +++ b/faiss/gpu/perf/slow.py @@ -1,6 +1,5 @@ #! /usr/bin/env python3 - -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/TestCodePacking.cpp b/faiss/gpu/test/TestCodePacking.cpp index 5d80150b20..4b08b6276f 100644 --- a/faiss/gpu/test/TestCodePacking.cpp +++ b/faiss/gpu/test/TestCodePacking.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/TestGpuIndexBinaryFlat.cpp b/faiss/gpu/test/TestGpuIndexBinaryFlat.cpp index 037a579df6..064464a935 100644 --- a/faiss/gpu/test/TestGpuIndexBinaryFlat.cpp +++ b/faiss/gpu/test/TestGpuIndexBinaryFlat.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/TestGpuIndexFlat.cpp b/faiss/gpu/test/TestGpuIndexFlat.cpp index 06b860ded4..0398606bb6 100644 --- a/faiss/gpu/test/TestGpuIndexFlat.cpp +++ b/faiss/gpu/test/TestGpuIndexFlat.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/TestGpuIndexIVFPQ.cpp b/faiss/gpu/test/TestGpuIndexIVFPQ.cpp index 9cc52bc788..134a4b449d 100644 --- a/faiss/gpu/test/TestGpuIndexIVFPQ.cpp +++ b/faiss/gpu/test/TestGpuIndexIVFPQ.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/TestGpuIndexIVFScalarQuantizer.cpp b/faiss/gpu/test/TestGpuIndexIVFScalarQuantizer.cpp index 737f87693a..9cb69dce17 100644 --- a/faiss/gpu/test/TestGpuIndexIVFScalarQuantizer.cpp +++ b/faiss/gpu/test/TestGpuIndexIVFScalarQuantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/TestGpuMemoryException.cpp b/faiss/gpu/test/TestGpuMemoryException.cpp index ff4be0893e..b70b9cc538 100644 --- a/faiss/gpu/test/TestGpuMemoryException.cpp +++ b/faiss/gpu/test/TestGpuMemoryException.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/TestGpuSelect.cu b/faiss/gpu/test/TestGpuSelect.cu index 26bd49e7fe..cb8b7cba60 100644 --- a/faiss/gpu/test/TestGpuSelect.cu +++ b/faiss/gpu/test/TestGpuSelect.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/TestUtils.cpp b/faiss/gpu/test/TestUtils.cpp index c81d34339e..38807d9cf7 100644 --- a/faiss/gpu/test/TestUtils.cpp +++ b/faiss/gpu/test/TestUtils.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/TestUtils.h b/faiss/gpu/test/TestUtils.h index 3edd1daefc..02ef37ccfa 100644 --- a/faiss/gpu/test/TestUtils.h +++ b/faiss/gpu/test/TestUtils.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/demo_ivfpq_indexing_gpu.cpp b/faiss/gpu/test/demo_ivfpq_indexing_gpu.cpp index f5bee11170..596c3f0bc7 100644 --- a/faiss/gpu/test/demo_ivfpq_indexing_gpu.cpp +++ b/faiss/gpu/test/demo_ivfpq_indexing_gpu.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/test_cagra.py b/faiss/gpu/test/test_cagra.py index 4c7e532c2b..5324379fc5 100644 --- a/faiss/gpu/test/test_cagra.py +++ b/faiss/gpu/test/test_cagra.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/test_contrib_gpu.py b/faiss/gpu/test/test_contrib_gpu.py index e6c28ac3aa..c898f7f64f 100644 --- a/faiss/gpu/test/test_contrib_gpu.py +++ b/faiss/gpu/test/test_contrib_gpu.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/test_gpu_basics.py b/faiss/gpu/test/test_gpu_basics.py index 4b4024d236..00506bf1f1 100755 --- a/faiss/gpu/test/test_gpu_basics.py +++ b/faiss/gpu/test/test_gpu_basics.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/test_gpu_index.py b/faiss/gpu/test/test_gpu_index.py index 28572ebcb4..f85f6ff913 100755 --- a/faiss/gpu/test/test_gpu_index.py +++ b/faiss/gpu/test/test_gpu_index.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/test_gpu_index_ivfflat.py b/faiss/gpu/test/test_gpu_index_ivfflat.py index 099615aff5..1dbf9b694d 100644 --- a/faiss/gpu/test/test_gpu_index_ivfflat.py +++ b/faiss/gpu/test/test_gpu_index_ivfflat.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/test_gpu_index_ivfsq.py b/faiss/gpu/test/test_gpu_index_ivfsq.py index 09dcdae079..6600d46661 100755 --- a/faiss/gpu/test/test_gpu_index_ivfsq.py +++ b/faiss/gpu/test/test_gpu_index_ivfsq.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/test_gpu_index_serialize.py b/faiss/gpu/test/test_gpu_index_serialize.py index 49e51af8b4..fcd62f573c 100644 --- a/faiss/gpu/test/test_gpu_index_serialize.py +++ b/faiss/gpu/test/test_gpu_index_serialize.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/test_multi_gpu.py b/faiss/gpu/test/test_multi_gpu.py index e341f5715a..aca0e988d6 100644 --- a/faiss/gpu/test/test_multi_gpu.py +++ b/faiss/gpu/test/test_multi_gpu.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/test_raft.py b/faiss/gpu/test/test_raft.py index 37ae2ef003..d08faaa57b 100644 --- a/faiss/gpu/test/test_raft.py +++ b/faiss/gpu/test/test_raft.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/test/torch_test_contrib_gpu.py b/faiss/gpu/test/torch_test_contrib_gpu.py index 1f6f27ecca..8bb9d58120 100644 --- a/faiss/gpu/test/torch_test_contrib_gpu.py +++ b/faiss/gpu/test/torch_test_contrib_gpu.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/BlockSelectFloat.cu b/faiss/gpu/utils/BlockSelectFloat.cu index f76fd6421d..82260f067e 100644 --- a/faiss/gpu/utils/BlockSelectFloat.cu +++ b/faiss/gpu/utils/BlockSelectFloat.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/BlockSelectKernel.cuh b/faiss/gpu/utils/BlockSelectKernel.cuh index e4dc8e20d3..43c1471934 100644 --- a/faiss/gpu/utils/BlockSelectKernel.cuh +++ b/faiss/gpu/utils/BlockSelectKernel.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/Comparators.cuh b/faiss/gpu/utils/Comparators.cuh index cbbda0ce81..6144eb29bd 100644 --- a/faiss/gpu/utils/Comparators.cuh +++ b/faiss/gpu/utils/Comparators.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/ConversionOperators.cuh b/faiss/gpu/utils/ConversionOperators.cuh index e843c02320..bbaac78f64 100644 --- a/faiss/gpu/utils/ConversionOperators.cuh +++ b/faiss/gpu/utils/ConversionOperators.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/CopyUtils.cuh b/faiss/gpu/utils/CopyUtils.cuh index 8ff600a049..19a07f901c 100644 --- a/faiss/gpu/utils/CopyUtils.cuh +++ b/faiss/gpu/utils/CopyUtils.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/DeviceDefs.cuh b/faiss/gpu/utils/DeviceDefs.cuh index c89f1cb07e..dc4c469a1b 100644 --- a/faiss/gpu/utils/DeviceDefs.cuh +++ b/faiss/gpu/utils/DeviceDefs.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/DeviceTensor-inl.cuh b/faiss/gpu/utils/DeviceTensor-inl.cuh index b218e10b62..df51414c43 100644 --- a/faiss/gpu/utils/DeviceTensor-inl.cuh +++ b/faiss/gpu/utils/DeviceTensor-inl.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/DeviceTensor.cuh b/faiss/gpu/utils/DeviceTensor.cuh index 6c0b5649db..197570f438 100644 --- a/faiss/gpu/utils/DeviceTensor.cuh +++ b/faiss/gpu/utils/DeviceTensor.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/DeviceUtils.cu b/faiss/gpu/utils/DeviceUtils.cu index 7a22c09e8f..15036d39fb 100644 --- a/faiss/gpu/utils/DeviceUtils.cu +++ b/faiss/gpu/utils/DeviceUtils.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/DeviceUtils.h b/faiss/gpu/utils/DeviceUtils.h index dee13079c1..edb1b71572 100644 --- a/faiss/gpu/utils/DeviceUtils.h +++ b/faiss/gpu/utils/DeviceUtils.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/DeviceVector.cuh b/faiss/gpu/utils/DeviceVector.cuh index 51cb7c8d37..20c58ffc64 100644 --- a/faiss/gpu/utils/DeviceVector.cuh +++ b/faiss/gpu/utils/DeviceVector.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/Float16.cuh b/faiss/gpu/utils/Float16.cuh index 8ff15df153..449829de66 100644 --- a/faiss/gpu/utils/Float16.cuh +++ b/faiss/gpu/utils/Float16.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/HostTensor-inl.cuh b/faiss/gpu/utils/HostTensor-inl.cuh index 5b093fb19b..9a6083ea92 100644 --- a/faiss/gpu/utils/HostTensor-inl.cuh +++ b/faiss/gpu/utils/HostTensor-inl.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/HostTensor.cuh b/faiss/gpu/utils/HostTensor.cuh index a354ee1978..5c7f96dfbb 100644 --- a/faiss/gpu/utils/HostTensor.cuh +++ b/faiss/gpu/utils/HostTensor.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/Limits.cuh b/faiss/gpu/utils/Limits.cuh index 9815e2d772..849e5c2258 100644 --- a/faiss/gpu/utils/Limits.cuh +++ b/faiss/gpu/utils/Limits.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/LoadStoreOperators.cuh b/faiss/gpu/utils/LoadStoreOperators.cuh index f86793ddfc..e0c87d0367 100644 --- a/faiss/gpu/utils/LoadStoreOperators.cuh +++ b/faiss/gpu/utils/LoadStoreOperators.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/MathOperators.cuh b/faiss/gpu/utils/MathOperators.cuh index 7fe8098a9f..d825233c0d 100644 --- a/faiss/gpu/utils/MathOperators.cuh +++ b/faiss/gpu/utils/MathOperators.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/MatrixMult-inl.cuh b/faiss/gpu/utils/MatrixMult-inl.cuh index 841df93c1a..98fd0956cd 100644 --- a/faiss/gpu/utils/MatrixMult-inl.cuh +++ b/faiss/gpu/utils/MatrixMult-inl.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/MatrixMult.cuh b/faiss/gpu/utils/MatrixMult.cuh index b15a49f5d1..28f0d41687 100644 --- a/faiss/gpu/utils/MatrixMult.cuh +++ b/faiss/gpu/utils/MatrixMult.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/MergeNetworkBlock.cuh b/faiss/gpu/utils/MergeNetworkBlock.cuh index 50c9fb9fc8..dbc2308633 100644 --- a/faiss/gpu/utils/MergeNetworkBlock.cuh +++ b/faiss/gpu/utils/MergeNetworkBlock.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/MergeNetworkUtils.cuh b/faiss/gpu/utils/MergeNetworkUtils.cuh index 56ebfbb681..44f4fd8cbd 100644 --- a/faiss/gpu/utils/MergeNetworkUtils.cuh +++ b/faiss/gpu/utils/MergeNetworkUtils.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/MergeNetworkWarp.cuh b/faiss/gpu/utils/MergeNetworkWarp.cuh index 4f64d490c0..e48dd1839c 100644 --- a/faiss/gpu/utils/MergeNetworkWarp.cuh +++ b/faiss/gpu/utils/MergeNetworkWarp.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/NoTypeTensor.cuh b/faiss/gpu/utils/NoTypeTensor.cuh index 5d776be441..98671111e3 100644 --- a/faiss/gpu/utils/NoTypeTensor.cuh +++ b/faiss/gpu/utils/NoTypeTensor.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/Pair.cuh b/faiss/gpu/utils/Pair.cuh index d7c377c2ed..8c7a6e63de 100644 --- a/faiss/gpu/utils/Pair.cuh +++ b/faiss/gpu/utils/Pair.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/PtxUtils.cuh b/faiss/gpu/utils/PtxUtils.cuh index d22835464c..c40fea2127 100644 --- a/faiss/gpu/utils/PtxUtils.cuh +++ b/faiss/gpu/utils/PtxUtils.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/ReductionOperators.cuh b/faiss/gpu/utils/ReductionOperators.cuh index ed87ac3ad0..8e721a1f44 100644 --- a/faiss/gpu/utils/ReductionOperators.cuh +++ b/faiss/gpu/utils/ReductionOperators.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/Reductions.cuh b/faiss/gpu/utils/Reductions.cuh index 5dcda8f0a9..8f31c4a05d 100644 --- a/faiss/gpu/utils/Reductions.cuh +++ b/faiss/gpu/utils/Reductions.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/Select.cuh b/faiss/gpu/utils/Select.cuh index d2b316b6f8..19ae65e06a 100644 --- a/faiss/gpu/utils/Select.cuh +++ b/faiss/gpu/utils/Select.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/StackDeviceMemory.cpp b/faiss/gpu/utils/StackDeviceMemory.cpp index 5f121733c0..f218a1c24b 100644 --- a/faiss/gpu/utils/StackDeviceMemory.cpp +++ b/faiss/gpu/utils/StackDeviceMemory.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/StackDeviceMemory.h b/faiss/gpu/utils/StackDeviceMemory.h index 26a7987a85..aacec602ca 100644 --- a/faiss/gpu/utils/StackDeviceMemory.h +++ b/faiss/gpu/utils/StackDeviceMemory.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/StaticUtils.h b/faiss/gpu/utils/StaticUtils.h index cc18e1475b..93f1f70250 100644 --- a/faiss/gpu/utils/StaticUtils.h +++ b/faiss/gpu/utils/StaticUtils.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/Tensor-inl.cuh b/faiss/gpu/utils/Tensor-inl.cuh index 5feb785645..6f575cfb78 100644 --- a/faiss/gpu/utils/Tensor-inl.cuh +++ b/faiss/gpu/utils/Tensor-inl.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/Tensor.cuh b/faiss/gpu/utils/Tensor.cuh index e16425848d..37c0e919dc 100644 --- a/faiss/gpu/utils/Tensor.cuh +++ b/faiss/gpu/utils/Tensor.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/ThrustUtils.cuh b/faiss/gpu/utils/ThrustUtils.cuh index 8836939149..1bf4805bb7 100644 --- a/faiss/gpu/utils/ThrustUtils.cuh +++ b/faiss/gpu/utils/ThrustUtils.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/Timer.cpp b/faiss/gpu/utils/Timer.cpp index f543a08007..6993257f10 100644 --- a/faiss/gpu/utils/Timer.cpp +++ b/faiss/gpu/utils/Timer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/Timer.h b/faiss/gpu/utils/Timer.h index aa5d65038e..8b52e6c682 100644 --- a/faiss/gpu/utils/Timer.h +++ b/faiss/gpu/utils/Timer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/Transpose.cuh b/faiss/gpu/utils/Transpose.cuh index b6e10efbda..9ab90bb54e 100644 --- a/faiss/gpu/utils/Transpose.cuh +++ b/faiss/gpu/utils/Transpose.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/WarpPackedBits.cuh b/faiss/gpu/utils/WarpPackedBits.cuh index ebb7806a75..1588efb577 100644 --- a/faiss/gpu/utils/WarpPackedBits.cuh +++ b/faiss/gpu/utils/WarpPackedBits.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/WarpSelectFloat.cu b/faiss/gpu/utils/WarpSelectFloat.cu index 221dad9703..62af91a348 100644 --- a/faiss/gpu/utils/WarpSelectFloat.cu +++ b/faiss/gpu/utils/WarpSelectFloat.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/WarpSelectKernel.cuh b/faiss/gpu/utils/WarpSelectKernel.cuh index fa7a34109d..bb5a7a1614 100644 --- a/faiss/gpu/utils/WarpSelectKernel.cuh +++ b/faiss/gpu/utils/WarpSelectKernel.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/WarpShuffles.cuh b/faiss/gpu/utils/WarpShuffles.cuh index b8dd66f1a8..3c70b076ac 100644 --- a/faiss/gpu/utils/WarpShuffles.cuh +++ b/faiss/gpu/utils/WarpShuffles.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectFloat1.cu b/faiss/gpu/utils/blockselect/BlockSelectFloat1.cu index 46202d891b..a76aeea84b 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectFloat1.cu +++ b/faiss/gpu/utils/blockselect/BlockSelectFloat1.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectFloat128.cu b/faiss/gpu/utils/blockselect/BlockSelectFloat128.cu index 85a400d104..e0174cf23e 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectFloat128.cu +++ b/faiss/gpu/utils/blockselect/BlockSelectFloat128.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectFloat256.cu b/faiss/gpu/utils/blockselect/BlockSelectFloat256.cu index 7fe2a9dd69..50f41d2052 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectFloat256.cu +++ b/faiss/gpu/utils/blockselect/BlockSelectFloat256.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectFloat32.cu b/faiss/gpu/utils/blockselect/BlockSelectFloat32.cu index 71c0c4e571..9d091cedd3 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectFloat32.cu +++ b/faiss/gpu/utils/blockselect/BlockSelectFloat32.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectFloat64.cu b/faiss/gpu/utils/blockselect/BlockSelectFloat64.cu index 8f774ca8fc..e9b7438be9 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectFloat64.cu +++ b/faiss/gpu/utils/blockselect/BlockSelectFloat64.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectFloatF1024.cu b/faiss/gpu/utils/blockselect/BlockSelectFloatF1024.cu index 1a4eed223b..88c5d028ff 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectFloatF1024.cu +++ b/faiss/gpu/utils/blockselect/BlockSelectFloatF1024.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectFloatF2048.cu b/faiss/gpu/utils/blockselect/BlockSelectFloatF2048.cu index 510adcefdb..c49f9a85fb 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectFloatF2048.cu +++ b/faiss/gpu/utils/blockselect/BlockSelectFloatF2048.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectFloatF512.cu b/faiss/gpu/utils/blockselect/BlockSelectFloatF512.cu index f52dffd0ef..c8060af2f0 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectFloatF512.cu +++ b/faiss/gpu/utils/blockselect/BlockSelectFloatF512.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectFloatT1024.cu b/faiss/gpu/utils/blockselect/BlockSelectFloatT1024.cu index da22fcf621..3d0fb65899 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectFloatT1024.cu +++ b/faiss/gpu/utils/blockselect/BlockSelectFloatT1024.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectFloatT2048.cu b/faiss/gpu/utils/blockselect/BlockSelectFloatT2048.cu index 09d6a049f3..12152208f2 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectFloatT2048.cu +++ b/faiss/gpu/utils/blockselect/BlockSelectFloatT2048.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectFloatT512.cu b/faiss/gpu/utils/blockselect/BlockSelectFloatT512.cu index 2f08019125..485d13c26f 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectFloatT512.cu +++ b/faiss/gpu/utils/blockselect/BlockSelectFloatT512.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/blockselect/BlockSelectImpl.cuh b/faiss/gpu/utils/blockselect/BlockSelectImpl.cuh index 8234debe46..4790c15ced 100644 --- a/faiss/gpu/utils/blockselect/BlockSelectImpl.cuh +++ b/faiss/gpu/utils/blockselect/BlockSelectImpl.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectFloat1.cu b/faiss/gpu/utils/warpselect/WarpSelectFloat1.cu index 08f597e7df..56275c198f 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectFloat1.cu +++ b/faiss/gpu/utils/warpselect/WarpSelectFloat1.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectFloat128.cu b/faiss/gpu/utils/warpselect/WarpSelectFloat128.cu index ef43dc21ff..83838b67a0 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectFloat128.cu +++ b/faiss/gpu/utils/warpselect/WarpSelectFloat128.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectFloat256.cu b/faiss/gpu/utils/warpselect/WarpSelectFloat256.cu index c74563514a..4698a988e1 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectFloat256.cu +++ b/faiss/gpu/utils/warpselect/WarpSelectFloat256.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectFloat32.cu b/faiss/gpu/utils/warpselect/WarpSelectFloat32.cu index 183ae49cf6..2b665c90d2 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectFloat32.cu +++ b/faiss/gpu/utils/warpselect/WarpSelectFloat32.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectFloat64.cu b/faiss/gpu/utils/warpselect/WarpSelectFloat64.cu index 300993449c..25743a90a1 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectFloat64.cu +++ b/faiss/gpu/utils/warpselect/WarpSelectFloat64.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectFloatF1024.cu b/faiss/gpu/utils/warpselect/WarpSelectFloatF1024.cu index 2a671af4be..5b7076107b 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectFloatF1024.cu +++ b/faiss/gpu/utils/warpselect/WarpSelectFloatF1024.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectFloatF2048.cu b/faiss/gpu/utils/warpselect/WarpSelectFloatF2048.cu index 0bef8b2119..de30d8c72e 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectFloatF2048.cu +++ b/faiss/gpu/utils/warpselect/WarpSelectFloatF2048.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectFloatF512.cu b/faiss/gpu/utils/warpselect/WarpSelectFloatF512.cu index b8f2f1b759..c35dce5b8d 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectFloatF512.cu +++ b/faiss/gpu/utils/warpselect/WarpSelectFloatF512.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectFloatT1024.cu b/faiss/gpu/utils/warpselect/WarpSelectFloatT1024.cu index a9d5b3456f..f803b1b499 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectFloatT1024.cu +++ b/faiss/gpu/utils/warpselect/WarpSelectFloatT1024.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectFloatT2048.cu b/faiss/gpu/utils/warpselect/WarpSelectFloatT2048.cu index 13621aada1..be630c1526 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectFloatT2048.cu +++ b/faiss/gpu/utils/warpselect/WarpSelectFloatT2048.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectFloatT512.cu b/faiss/gpu/utils/warpselect/WarpSelectFloatT512.cu index 00c9878962..10782f6f1a 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectFloatT512.cu +++ b/faiss/gpu/utils/warpselect/WarpSelectFloatT512.cu @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/gpu/utils/warpselect/WarpSelectImpl.cuh b/faiss/gpu/utils/warpselect/WarpSelectImpl.cuh index eb49816a62..3db7b4096a 100644 --- a/faiss/gpu/utils/warpselect/WarpSelectImpl.cuh +++ b/faiss/gpu/utils/warpselect/WarpSelectImpl.cuh @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/AdditiveQuantizer.cpp b/faiss/impl/AdditiveQuantizer.cpp index b7bc5af69e..fb58a49600 100644 --- a/faiss/impl/AdditiveQuantizer.cpp +++ b/faiss/impl/AdditiveQuantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/AdditiveQuantizer.h b/faiss/impl/AdditiveQuantizer.h index 0a6cd241ce..813cdd7f07 100644 --- a/faiss/impl/AdditiveQuantizer.h +++ b/faiss/impl/AdditiveQuantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/AuxIndexStructures.cpp b/faiss/impl/AuxIndexStructures.cpp index e2b2791e55..d37507a127 100644 --- a/faiss/impl/AuxIndexStructures.cpp +++ b/faiss/impl/AuxIndexStructures.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/AuxIndexStructures.h b/faiss/impl/AuxIndexStructures.h index d90a13b466..e1825c2f24 100644 --- a/faiss/impl/AuxIndexStructures.h +++ b/faiss/impl/AuxIndexStructures.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/CodePacker.cpp b/faiss/impl/CodePacker.cpp index 36dbf526b4..ee7b70249c 100644 --- a/faiss/impl/CodePacker.cpp +++ b/faiss/impl/CodePacker.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/CodePacker.h b/faiss/impl/CodePacker.h index 84c323ed69..60b42f55ff 100644 --- a/faiss/impl/CodePacker.h +++ b/faiss/impl/CodePacker.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/DistanceComputer.h b/faiss/impl/DistanceComputer.h index 5ac3a702c9..a714de19b5 100644 --- a/faiss/impl/DistanceComputer.h +++ b/faiss/impl/DistanceComputer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/FaissAssert.h b/faiss/impl/FaissAssert.h index 9d357823d0..0c56bc035a 100644 --- a/faiss/impl/FaissAssert.h +++ b/faiss/impl/FaissAssert.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/FaissException.cpp b/faiss/impl/FaissException.cpp index 3dcf47a5ea..5f99694f65 100644 --- a/faiss/impl/FaissException.cpp +++ b/faiss/impl/FaissException.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/FaissException.h b/faiss/impl/FaissException.h index b2774e8515..de943a3781 100644 --- a/faiss/impl/FaissException.h +++ b/faiss/impl/FaissException.h @@ -1,6 +1,5 @@ - -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/HNSW.cpp b/faiss/impl/HNSW.cpp index 930cf52ce6..4f1ac7c3ba 100644 --- a/faiss/impl/HNSW.cpp +++ b/faiss/impl/HNSW.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/HNSW.h b/faiss/impl/HNSW.h index dbe75d0b6e..71419edbb5 100644 --- a/faiss/impl/HNSW.h +++ b/faiss/impl/HNSW.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/IDSelector.cpp b/faiss/impl/IDSelector.cpp index e4a4bba967..f3aea424c0 100644 --- a/faiss/impl/IDSelector.cpp +++ b/faiss/impl/IDSelector.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/IDSelector.h b/faiss/impl/IDSelector.h index 7760d2a9fa..b79569c02f 100644 --- a/faiss/impl/IDSelector.h +++ b/faiss/impl/IDSelector.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/LocalSearchQuantizer.cpp b/faiss/impl/LocalSearchQuantizer.cpp index 943fe32c9d..b5bcc3ce7d 100644 --- a/faiss/impl/LocalSearchQuantizer.cpp +++ b/faiss/impl/LocalSearchQuantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/LocalSearchQuantizer.h b/faiss/impl/LocalSearchQuantizer.h index 3904d349af..39d7d6cc6c 100644 --- a/faiss/impl/LocalSearchQuantizer.h +++ b/faiss/impl/LocalSearchQuantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/LookupTableScaler.h b/faiss/impl/LookupTableScaler.h index b6438307fb..015bcdee5a 100644 --- a/faiss/impl/LookupTableScaler.h +++ b/faiss/impl/LookupTableScaler.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/NNDescent.cpp b/faiss/impl/NNDescent.cpp index 5afcdaf5b7..fdf1e73967 100644 --- a/faiss/impl/NNDescent.cpp +++ b/faiss/impl/NNDescent.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/NNDescent.h b/faiss/impl/NNDescent.h index 2426b0d7bb..b9523bf747 100644 --- a/faiss/impl/NNDescent.h +++ b/faiss/impl/NNDescent.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/NSG.cpp b/faiss/impl/NSG.cpp index 0aa8197ada..57307d8819 100644 --- a/faiss/impl/NSG.cpp +++ b/faiss/impl/NSG.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/NSG.h b/faiss/impl/NSG.h index 2f59bc2f8b..b09b43cfd2 100644 --- a/faiss/impl/NSG.h +++ b/faiss/impl/NSG.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/PolysemousTraining.cpp b/faiss/impl/PolysemousTraining.cpp index a3bd400fb6..000a918224 100644 --- a/faiss/impl/PolysemousTraining.cpp +++ b/faiss/impl/PolysemousTraining.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/PolysemousTraining.h b/faiss/impl/PolysemousTraining.h index d8b5efaca5..cc9b76b280 100644 --- a/faiss/impl/PolysemousTraining.h +++ b/faiss/impl/PolysemousTraining.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ProductAdditiveQuantizer.cpp b/faiss/impl/ProductAdditiveQuantizer.cpp index 1104b778a4..248f3a617a 100644 --- a/faiss/impl/ProductAdditiveQuantizer.cpp +++ b/faiss/impl/ProductAdditiveQuantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ProductAdditiveQuantizer.h b/faiss/impl/ProductAdditiveQuantizer.h index a161180b16..dc336847c0 100644 --- a/faiss/impl/ProductAdditiveQuantizer.h +++ b/faiss/impl/ProductAdditiveQuantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ProductQuantizer-inl.h b/faiss/impl/ProductQuantizer-inl.h index 684270548b..a76ab2556c 100644 --- a/faiss/impl/ProductQuantizer-inl.h +++ b/faiss/impl/ProductQuantizer-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ProductQuantizer.cpp b/faiss/impl/ProductQuantizer.cpp index b258d155ab..3fbedb8135 100644 --- a/faiss/impl/ProductQuantizer.cpp +++ b/faiss/impl/ProductQuantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ProductQuantizer.h b/faiss/impl/ProductQuantizer.h index eae30fb281..57c005cf63 100644 --- a/faiss/impl/ProductQuantizer.h +++ b/faiss/impl/ProductQuantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/Quantizer.h b/faiss/impl/Quantizer.h index 9171448ef5..f35b6863db 100644 --- a/faiss/impl/Quantizer.h +++ b/faiss/impl/Quantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ResidualQuantizer.cpp b/faiss/impl/ResidualQuantizer.cpp index f474ac64e3..96eb2c37ff 100644 --- a/faiss/impl/ResidualQuantizer.cpp +++ b/faiss/impl/ResidualQuantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ResidualQuantizer.h b/faiss/impl/ResidualQuantizer.h index 5a1ea63e66..9ad5902244 100644 --- a/faiss/impl/ResidualQuantizer.h +++ b/faiss/impl/ResidualQuantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ResultHandler.h b/faiss/impl/ResultHandler.h index 3116eb24df..68574df0dc 100644 --- a/faiss/impl/ResultHandler.h +++ b/faiss/impl/ResultHandler.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ScalarQuantizer.cpp b/faiss/impl/ScalarQuantizer.cpp index 846f542409..e05f3a1f25 100644 --- a/faiss/impl/ScalarQuantizer.cpp +++ b/faiss/impl/ScalarQuantizer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ScalarQuantizer.h b/faiss/impl/ScalarQuantizer.h index 904e6f6b60..c1f4f98f63 100644 --- a/faiss/impl/ScalarQuantizer.h +++ b/faiss/impl/ScalarQuantizer.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ThreadedIndex-inl.h b/faiss/impl/ThreadedIndex-inl.h index 1dbbb6727f..38a4ff3b10 100644 --- a/faiss/impl/ThreadedIndex-inl.h +++ b/faiss/impl/ThreadedIndex-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/ThreadedIndex.h b/faiss/impl/ThreadedIndex.h index eaea6d9335..2d6e8e1681 100644 --- a/faiss/impl/ThreadedIndex.h +++ b/faiss/impl/ThreadedIndex.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/code_distance/code_distance-avx2.h b/faiss/impl/code_distance/code_distance-avx2.h index d37b022441..53380b6e46 100644 --- a/faiss/impl/code_distance/code_distance-avx2.h +++ b/faiss/impl/code_distance/code_distance-avx2.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/code_distance/code_distance-avx512.h b/faiss/impl/code_distance/code_distance-avx512.h index 6c6afc7e0a..d05c41c19c 100644 --- a/faiss/impl/code_distance/code_distance-avx512.h +++ b/faiss/impl/code_distance/code_distance-avx512.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/code_distance/code_distance-generic.h b/faiss/impl/code_distance/code_distance-generic.h index 31f18d277d..c02551c415 100644 --- a/faiss/impl/code_distance/code_distance-generic.h +++ b/faiss/impl/code_distance/code_distance-generic.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/code_distance/code_distance-sve.h b/faiss/impl/code_distance/code_distance-sve.h index c15a755d1c..713b7d8099 100644 --- a/faiss/impl/code_distance/code_distance-sve.h +++ b/faiss/impl/code_distance/code_distance-sve.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/code_distance/code_distance.h b/faiss/impl/code_distance/code_distance.h index 155e19a6d8..8f29abda97 100644 --- a/faiss/impl/code_distance/code_distance.h +++ b/faiss/impl/code_distance/code_distance.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/index_read.cpp b/faiss/impl/index_read.cpp index 837520f697..121b8cf979 100644 --- a/faiss/impl/index_read.cpp +++ b/faiss/impl/index_read.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/index_read_utils.h b/faiss/impl/index_read_utils.h index b39150ea04..543f48126f 100644 --- a/faiss/impl/index_read_utils.h +++ b/faiss/impl/index_read_utils.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/index_write.cpp b/faiss/impl/index_write.cpp index 6e787aed44..9addd6d22f 100644 --- a/faiss/impl/index_write.cpp +++ b/faiss/impl/index_write.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/io.cpp b/faiss/impl/io.cpp index 5f5b2d5ebd..af453bd0c3 100644 --- a/faiss/impl/io.cpp +++ b/faiss/impl/io.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/io.h b/faiss/impl/io.h index 59c2e31539..56a074fec1 100644 --- a/faiss/impl/io.h +++ b/faiss/impl/io.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/io_macros.h b/faiss/impl/io_macros.h index 4cdcade554..e51a10f0da 100644 --- a/faiss/impl/io_macros.h +++ b/faiss/impl/io_macros.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/kmeans1d.cpp b/faiss/impl/kmeans1d.cpp index faa4fad84a..1ad07c6ed3 100644 --- a/faiss/impl/kmeans1d.cpp +++ b/faiss/impl/kmeans1d.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/kmeans1d.h b/faiss/impl/kmeans1d.h index f9a132668e..c823ae5ad2 100644 --- a/faiss/impl/kmeans1d.h +++ b/faiss/impl/kmeans1d.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/lattice_Zn.cpp b/faiss/impl/lattice_Zn.cpp index b5f9a657d4..3b6f217675 100644 --- a/faiss/impl/lattice_Zn.cpp +++ b/faiss/impl/lattice_Zn.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/lattice_Zn.h b/faiss/impl/lattice_Zn.h index 44e0249046..e6da2af68f 100644 --- a/faiss/impl/lattice_Zn.h +++ b/faiss/impl/lattice_Zn.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/platform_macros.h b/faiss/impl/platform_macros.h index 3fc328535b..3e9716b06f 100644 --- a/faiss/impl/platform_macros.h +++ b/faiss/impl/platform_macros.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/pq4_fast_scan.cpp b/faiss/impl/pq4_fast_scan.cpp index 127646e0eb..5d7e2a4efd 100644 --- a/faiss/impl/pq4_fast_scan.cpp +++ b/faiss/impl/pq4_fast_scan.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/pq4_fast_scan.h b/faiss/impl/pq4_fast_scan.h index 9f95f76cc1..b9ca9439ab 100644 --- a/faiss/impl/pq4_fast_scan.h +++ b/faiss/impl/pq4_fast_scan.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/pq4_fast_scan_search_1.cpp b/faiss/impl/pq4_fast_scan_search_1.cpp index 6f093e4c13..5c7d797142 100644 --- a/faiss/impl/pq4_fast_scan_search_1.cpp +++ b/faiss/impl/pq4_fast_scan_search_1.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/pq4_fast_scan_search_qbs.cpp b/faiss/impl/pq4_fast_scan_search_qbs.cpp index 1b24682a28..a9efe13fc1 100644 --- a/faiss/impl/pq4_fast_scan_search_qbs.cpp +++ b/faiss/impl/pq4_fast_scan_search_qbs.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/residual_quantizer_encode_steps.cpp b/faiss/impl/residual_quantizer_encode_steps.cpp index 9fcdd9e1d2..e4c74b13e9 100644 --- a/faiss/impl/residual_quantizer_encode_steps.cpp +++ b/faiss/impl/residual_quantizer_encode_steps.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/residual_quantizer_encode_steps.h b/faiss/impl/residual_quantizer_encode_steps.h index 05730b4b4e..3d17efd944 100644 --- a/faiss/impl/residual_quantizer_encode_steps.h +++ b/faiss/impl/residual_quantizer_encode_steps.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/impl/simd_result_handlers.h b/faiss/impl/simd_result_handlers.h index b8d89abc98..e12277a690 100644 --- a/faiss/impl/simd_result_handlers.h +++ b/faiss/impl/simd_result_handlers.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/index_factory.cpp b/faiss/index_factory.cpp index 092df879bf..546d3a886c 100644 --- a/faiss/index_factory.cpp +++ b/faiss/index_factory.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/index_factory.h b/faiss/index_factory.h index 2de8ee0a33..5f92f1347e 100644 --- a/faiss/index_factory.h +++ b/faiss/index_factory.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/index_io.h b/faiss/index_io.h index 3e77d0227c..b266712af7 100644 --- a/faiss/index_io.h +++ b/faiss/index_io.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/invlists/BlockInvertedLists.cpp b/faiss/invlists/BlockInvertedLists.cpp index bdf0dd38b2..4d100e2ab8 100644 --- a/faiss/invlists/BlockInvertedLists.cpp +++ b/faiss/invlists/BlockInvertedLists.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/invlists/BlockInvertedLists.h b/faiss/invlists/BlockInvertedLists.h index 2b9cbba455..7f608a87a2 100644 --- a/faiss/invlists/BlockInvertedLists.h +++ b/faiss/invlists/BlockInvertedLists.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/invlists/DirectMap.cpp b/faiss/invlists/DirectMap.cpp index dc2b92aa1c..cc0fe30d05 100644 --- a/faiss/invlists/DirectMap.cpp +++ b/faiss/invlists/DirectMap.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/invlists/DirectMap.h b/faiss/invlists/DirectMap.h index 30117d6d40..08fc018489 100644 --- a/faiss/invlists/DirectMap.h +++ b/faiss/invlists/DirectMap.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/invlists/InvertedLists.cpp b/faiss/invlists/InvertedLists.cpp index c2bfa2cabc..f02b2d250a 100644 --- a/faiss/invlists/InvertedLists.cpp +++ b/faiss/invlists/InvertedLists.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/invlists/InvertedLists.h b/faiss/invlists/InvertedLists.h index b24700fad1..f8c72c0841 100644 --- a/faiss/invlists/InvertedLists.h +++ b/faiss/invlists/InvertedLists.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/invlists/InvertedListsIOHook.cpp b/faiss/invlists/InvertedListsIOHook.cpp index 0081c4f9a0..0534a11907 100644 --- a/faiss/invlists/InvertedListsIOHook.cpp +++ b/faiss/invlists/InvertedListsIOHook.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/invlists/InvertedListsIOHook.h b/faiss/invlists/InvertedListsIOHook.h index 8100aa2923..cfeeac8c55 100644 --- a/faiss/invlists/InvertedListsIOHook.h +++ b/faiss/invlists/InvertedListsIOHook.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/invlists/OnDiskInvertedLists.cpp b/faiss/invlists/OnDiskInvertedLists.cpp index 8565572a9b..725367ef16 100644 --- a/faiss/invlists/OnDiskInvertedLists.cpp +++ b/faiss/invlists/OnDiskInvertedLists.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/invlists/OnDiskInvertedLists.h b/faiss/invlists/OnDiskInvertedLists.h index 01c7f3481e..52953f9c05 100644 --- a/faiss/invlists/OnDiskInvertedLists.h +++ b/faiss/invlists/OnDiskInvertedLists.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/python/CMakeLists.txt b/faiss/python/CMakeLists.txt index aea99af795..76cf3f639d 100644 --- a/faiss/python/CMakeLists.txt +++ b/faiss/python/CMakeLists.txt @@ -1,7 +1,6 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# All rights reserved. +# Copyright (c) Meta Platforms, Inc. and affiliates. # -# This source code is licensed under the BSD-style license found in the +# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. cmake_minimum_required(VERSION 3.17 FATAL_ERROR) diff --git a/faiss/python/class_wrappers.py b/faiss/python/class_wrappers.py index 20cef772b1..98d995152a 100644 --- a/faiss/python/class_wrappers.py +++ b/faiss/python/class_wrappers.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/python/loader.py b/faiss/python/loader.py index 977ada1d9f..9f5be7d2ed 100644 --- a/faiss/python/loader.py +++ b/faiss/python/loader.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/python/python_callbacks.cpp b/faiss/python/python_callbacks.cpp index 06b5c18cfc..ce36bed437 100644 --- a/faiss/python/python_callbacks.cpp +++ b/faiss/python/python_callbacks.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/python/python_callbacks.h b/faiss/python/python_callbacks.h index 421239bd0f..fa8ebaf53c 100644 --- a/faiss/python/python_callbacks.h +++ b/faiss/python/python_callbacks.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/python/setup.py b/faiss/python/setup.py index 46cacc0514..167999f308 100644 --- a/faiss/python/setup.py +++ b/faiss/python/setup.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/AlignedTable.h b/faiss/utils/AlignedTable.h index 05adb1c0d0..f570797a01 100644 --- a/faiss/utils/AlignedTable.h +++ b/faiss/utils/AlignedTable.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/Heap.cpp b/faiss/utils/Heap.cpp index 1907a0b1cd..e68c3b8456 100644 --- a/faiss/utils/Heap.cpp +++ b/faiss/utils/Heap.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/Heap.h b/faiss/utils/Heap.h index b67707ecb1..4653751c6d 100644 --- a/faiss/utils/Heap.h +++ b/faiss/utils/Heap.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/NeuralNet.cpp b/faiss/utils/NeuralNet.cpp index 9d25b24c4c..e26779f682 100644 --- a/faiss/utils/NeuralNet.cpp +++ b/faiss/utils/NeuralNet.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/NeuralNet.h b/faiss/utils/NeuralNet.h index 928fa96bab..0d97b67549 100644 --- a/faiss/utils/NeuralNet.h +++ b/faiss/utils/NeuralNet.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/WorkerThread.cpp b/faiss/utils/WorkerThread.cpp index afef9c04c0..f734b528f1 100644 --- a/faiss/utils/WorkerThread.cpp +++ b/faiss/utils/WorkerThread.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/WorkerThread.h b/faiss/utils/WorkerThread.h index 3f2377eba2..78d7505d57 100644 --- a/faiss/utils/WorkerThread.h +++ b/faiss/utils/WorkerThread.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/approx_topk/approx_topk.h b/faiss/utils/approx_topk/approx_topk.h index f5af1ffea6..234dce8590 100644 --- a/faiss/utils/approx_topk/approx_topk.h +++ b/faiss/utils/approx_topk/approx_topk.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/approx_topk/avx2-inl.h b/faiss/utils/approx_topk/avx2-inl.h index 09bae6965b..4949982591 100644 --- a/faiss/utils/approx_topk/avx2-inl.h +++ b/faiss/utils/approx_topk/avx2-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/approx_topk/generic.h b/faiss/utils/approx_topk/generic.h index 59a8dc8dcf..5bc813d4d9 100644 --- a/faiss/utils/approx_topk/generic.h +++ b/faiss/utils/approx_topk/generic.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/approx_topk/mode.h b/faiss/utils/approx_topk/mode.h index 5701b1c7b7..f4294e238b 100644 --- a/faiss/utils/approx_topk/mode.h +++ b/faiss/utils/approx_topk/mode.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/approx_topk_hamming/approx_topk_hamming.h b/faiss/utils/approx_topk_hamming/approx_topk_hamming.h index 49cdcee8d3..68d8e8c9f0 100644 --- a/faiss/utils/approx_topk_hamming/approx_topk_hamming.h +++ b/faiss/utils/approx_topk_hamming/approx_topk_hamming.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/bf16.h b/faiss/utils/bf16.h index ff0fbe898b..7d29e35525 100644 --- a/faiss/utils/bf16.h +++ b/faiss/utils/bf16.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/distances.cpp b/faiss/utils/distances.cpp index e698037aa1..4241f2fc6b 100644 --- a/faiss/utils/distances.cpp +++ b/faiss/utils/distances.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/distances.h b/faiss/utils/distances.h index 1d6e436c4a..5fc349b6fe 100644 --- a/faiss/utils/distances.h +++ b/faiss/utils/distances.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/distances_fused/avx512.cpp b/faiss/utils/distances_fused/avx512.cpp index d4c442c79b..be792b9212 100644 --- a/faiss/utils/distances_fused/avx512.cpp +++ b/faiss/utils/distances_fused/avx512.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/distances_fused/avx512.h b/faiss/utils/distances_fused/avx512.h index 4cb62771a2..92d42c1768 100644 --- a/faiss/utils/distances_fused/avx512.h +++ b/faiss/utils/distances_fused/avx512.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/distances_fused/distances_fused.cpp b/faiss/utils/distances_fused/distances_fused.cpp index 2ba7e29014..96d4690d00 100644 --- a/faiss/utils/distances_fused/distances_fused.cpp +++ b/faiss/utils/distances_fused/distances_fused.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/distances_fused/distances_fused.h b/faiss/utils/distances_fused/distances_fused.h index 54b58752b1..dcfdbfa44f 100644 --- a/faiss/utils/distances_fused/distances_fused.h +++ b/faiss/utils/distances_fused/distances_fused.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/distances_fused/simdlib_based.cpp b/faiss/utils/distances_fused/simdlib_based.cpp index 309fb72118..146dfe88ba 100644 --- a/faiss/utils/distances_fused/simdlib_based.cpp +++ b/faiss/utils/distances_fused/simdlib_based.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/distances_fused/simdlib_based.h b/faiss/utils/distances_fused/simdlib_based.h index 6240a8f110..dac5163d3a 100644 --- a/faiss/utils/distances_fused/simdlib_based.h +++ b/faiss/utils/distances_fused/simdlib_based.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/distances_simd.cpp b/faiss/utils/distances_simd.cpp index 7cabfc0a25..ecf7e74146 100644 --- a/faiss/utils/distances_simd.cpp +++ b/faiss/utils/distances_simd.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/extra_distances-inl.h b/faiss/utils/extra_distances-inl.h index cf89c47629..da629306a1 100644 --- a/faiss/utils/extra_distances-inl.h +++ b/faiss/utils/extra_distances-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/extra_distances.cpp b/faiss/utils/extra_distances.cpp index 69ee961c7f..c2faea4bcb 100644 --- a/faiss/utils/extra_distances.cpp +++ b/faiss/utils/extra_distances.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/extra_distances.h b/faiss/utils/extra_distances.h index f8b47cfba5..ae3edf85d4 100644 --- a/faiss/utils/extra_distances.h +++ b/faiss/utils/extra_distances.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/fp16-arm.h b/faiss/utils/fp16-arm.h index 79c885b058..181d9a631f 100644 --- a/faiss/utils/fp16-arm.h +++ b/faiss/utils/fp16-arm.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/fp16-fp16c.h b/faiss/utils/fp16-fp16c.h index 571d52752f..8bf7844f34 100644 --- a/faiss/utils/fp16-fp16c.h +++ b/faiss/utils/fp16-fp16c.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/fp16-inl.h b/faiss/utils/fp16-inl.h index c07d36f5e3..6c376e0161 100644 --- a/faiss/utils/fp16-inl.h +++ b/faiss/utils/fp16-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/fp16.h b/faiss/utils/fp16.h index 43e05dc3d3..af97831899 100644 --- a/faiss/utils/fp16.h +++ b/faiss/utils/fp16.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/hamming-inl.h b/faiss/utils/hamming-inl.h index 185937dbb7..97d433df82 100644 --- a/faiss/utils/hamming-inl.h +++ b/faiss/utils/hamming-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/hamming.cpp b/faiss/utils/hamming.cpp index d3cd4dc9b3..402f1f117c 100644 --- a/faiss/utils/hamming.cpp +++ b/faiss/utils/hamming.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/hamming.h b/faiss/utils/hamming.h index 7cdc05d252..85f9730e5c 100644 --- a/faiss/utils/hamming.h +++ b/faiss/utils/hamming.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/hamming_distance/avx2-inl.h b/faiss/utils/hamming_distance/avx2-inl.h index 5cdc6a2b46..20a613d0eb 100644 --- a/faiss/utils/hamming_distance/avx2-inl.h +++ b/faiss/utils/hamming_distance/avx2-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/hamming_distance/common.h b/faiss/utils/hamming_distance/common.h index 0a2de08d17..664900e74d 100644 --- a/faiss/utils/hamming_distance/common.h +++ b/faiss/utils/hamming_distance/common.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/hamming_distance/generic-inl.h b/faiss/utils/hamming_distance/generic-inl.h index a006814877..b8e7b42c9c 100644 --- a/faiss/utils/hamming_distance/generic-inl.h +++ b/faiss/utils/hamming_distance/generic-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/hamming_distance/hamdis-inl.h b/faiss/utils/hamming_distance/hamdis-inl.h index dcd3fe2d12..eac7054317 100644 --- a/faiss/utils/hamming_distance/hamdis-inl.h +++ b/faiss/utils/hamming_distance/hamdis-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/hamming_distance/neon-inl.h b/faiss/utils/hamming_distance/neon-inl.h index d8a42f7218..fa06b2c6b5 100644 --- a/faiss/utils/hamming_distance/neon-inl.h +++ b/faiss/utils/hamming_distance/neon-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/ordered_key_value.h b/faiss/utils/ordered_key_value.h index 2f19f3a3f6..ec0a82eb17 100644 --- a/faiss/utils/ordered_key_value.h +++ b/faiss/utils/ordered_key_value.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/partitioning.cpp b/faiss/utils/partitioning.cpp index 4b44126cc7..8fa2787316 100644 --- a/faiss/utils/partitioning.cpp +++ b/faiss/utils/partitioning.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/partitioning.h b/faiss/utils/partitioning.h index 90157d2312..66f8780a35 100644 --- a/faiss/utils/partitioning.h +++ b/faiss/utils/partitioning.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/prefetch.h b/faiss/utils/prefetch.h index 9549eb3441..7afe58aba4 100644 --- a/faiss/utils/prefetch.h +++ b/faiss/utils/prefetch.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/quantize_lut.cpp b/faiss/utils/quantize_lut.cpp index ca917e582c..9253d23d7f 100644 --- a/faiss/utils/quantize_lut.cpp +++ b/faiss/utils/quantize_lut.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/quantize_lut.h b/faiss/utils/quantize_lut.h index b7d4fc42f8..fc9e2dc014 100644 --- a/faiss/utils/quantize_lut.h +++ b/faiss/utils/quantize_lut.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/random.cpp b/faiss/utils/random.cpp index 877a7c2526..6187e170f9 100644 --- a/faiss/utils/random.cpp +++ b/faiss/utils/random.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/random.h b/faiss/utils/random.h index ac985d69b7..2e2f3e52a9 100644 --- a/faiss/utils/random.h +++ b/faiss/utils/random.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/simdlib.h b/faiss/utils/simdlib.h index ea5020d719..eadfb78ae3 100644 --- a/faiss/utils/simdlib.h +++ b/faiss/utils/simdlib.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/simdlib_avx2.h b/faiss/utils/simdlib_avx2.h index fc51e3ed18..1a84d12b30 100644 --- a/faiss/utils/simdlib_avx2.h +++ b/faiss/utils/simdlib_avx2.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/simdlib_avx512.h b/faiss/utils/simdlib_avx512.h index 9ce0965895..63b23f9b19 100644 --- a/faiss/utils/simdlib_avx512.h +++ b/faiss/utils/simdlib_avx512.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/simdlib_emulated.h b/faiss/utils/simdlib_emulated.h index f9cfb3b34b..55e6534da4 100644 --- a/faiss/utils/simdlib_emulated.h +++ b/faiss/utils/simdlib_emulated.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/simdlib_neon.h b/faiss/utils/simdlib_neon.h index 1bdf0ed01e..10adc222e0 100644 --- a/faiss/utils/simdlib_neon.h +++ b/faiss/utils/simdlib_neon.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/simdlib_ppc64.h b/faiss/utils/simdlib_ppc64.h index 94b3e42dc7..8fc1109719 100644 --- a/faiss/utils/simdlib_ppc64.h +++ b/faiss/utils/simdlib_ppc64.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/sorting.cpp b/faiss/utils/sorting.cpp index f8ed250ddb..e3bf4959e6 100644 --- a/faiss/utils/sorting.cpp +++ b/faiss/utils/sorting.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/sorting.h b/faiss/utils/sorting.h index 593d952ae0..abe113fed3 100644 --- a/faiss/utils/sorting.h +++ b/faiss/utils/sorting.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/transpose/transpose-avx2-inl.h b/faiss/utils/transpose/transpose-avx2-inl.h index 4b67984295..464f44ccc9 100644 --- a/faiss/utils/transpose/transpose-avx2-inl.h +++ b/faiss/utils/transpose/transpose-avx2-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/transpose/transpose-avx512-inl.h b/faiss/utils/transpose/transpose-avx512-inl.h index d8c41af91c..52413e21a0 100644 --- a/faiss/utils/transpose/transpose-avx512-inl.h +++ b/faiss/utils/transpose/transpose-avx512-inl.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/utils.cpp b/faiss/utils/utils.cpp index d0883ca962..99ece90cd6 100644 --- a/faiss/utils/utils.cpp +++ b/faiss/utils/utils.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/faiss/utils/utils.h b/faiss/utils/utils.h index 4d10a8c0f9..755a3fd829 100644 --- a/faiss/utils/utils.h +++ b/faiss/utils/utils.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/misc/test_blas.cpp b/misc/test_blas.cpp index 3359df82ed..567e0bc302 100644 --- a/misc/test_blas.cpp +++ b/misc/test_blas.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/perf_tests/CMakeLists.txt b/perf_tests/CMakeLists.txt index 200430f04c..e89d115789 100644 --- a/perf_tests/CMakeLists.txt +++ b/perf_tests/CMakeLists.txt @@ -1,7 +1,6 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# All rights reserved. +# Copyright (c) Meta Platforms, Inc. and affiliates. # -# This source code is licensed under the BSD-style license found in the +# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # @lint-ignore-every LINEWRAP diff --git a/perf_tests/bench_hnsw.py b/perf_tests/bench_hnsw.py index 3bd1b17a5c..d6ac59d9cb 100644 --- a/perf_tests/bench_hnsw.py +++ b/perf_tests/bench_hnsw.py @@ -1,3 +1,8 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + import argparse import resource import time diff --git a/perf_tests/bench_no_multithreading_rcq_search.cpp b/perf_tests/bench_no_multithreading_rcq_search.cpp index ff2c8eab34..e684d6a60f 100644 --- a/perf_tests/bench_no_multithreading_rcq_search.cpp +++ b/perf_tests/bench_no_multithreading_rcq_search.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/perf_tests/bench_scalar_quantizer_accuracy.cpp b/perf_tests/bench_scalar_quantizer_accuracy.cpp index b13b9114b8..1e70690f94 100644 --- a/perf_tests/bench_scalar_quantizer_accuracy.cpp +++ b/perf_tests/bench_scalar_quantizer_accuracy.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/perf_tests/bench_scalar_quantizer_decode.cpp b/perf_tests/bench_scalar_quantizer_decode.cpp index fc9d520557..02b2adcf04 100644 --- a/perf_tests/bench_scalar_quantizer_decode.cpp +++ b/perf_tests/bench_scalar_quantizer_decode.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/perf_tests/bench_scalar_quantizer_distance.cpp b/perf_tests/bench_scalar_quantizer_distance.cpp index d0d1d9a474..a6990ea442 100644 --- a/perf_tests/bench_scalar_quantizer_distance.cpp +++ b/perf_tests/bench_scalar_quantizer_distance.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/perf_tests/bench_scalar_quantizer_encode.cpp b/perf_tests/bench_scalar_quantizer_encode.cpp index 40c95dabb4..8e6f8c5ec8 100644 --- a/perf_tests/bench_scalar_quantizer_encode.cpp +++ b/perf_tests/bench_scalar_quantizer_encode.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/perf_tests/utils.cpp b/perf_tests/utils.cpp index 3e6c33220d..9f505a49f9 100644 --- a/perf_tests/utils.cpp +++ b/perf_tests/utils.cpp @@ -1,3 +1,10 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + #include namespace faiss::perf_tests { std::map sq_types() { diff --git a/perf_tests/utils.h b/perf_tests/utils.h index e3065b9d4c..08cf5acb10 100644 --- a/perf_tests/utils.h +++ b/perf_tests/utils.h @@ -1,4 +1,9 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ #pragma once #include diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1e875cf41d..39876db8f1 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,6 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# All rights reserved. +# Copyright (c) Meta Platforms, Inc. and affiliates. # -# This source code is licensed under the BSD-style license found in the +# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. set(FAISS_TEST_SRC diff --git a/tests/common_faiss_tests.py b/tests/common_faiss_tests.py index a8afe344e4..b945055719 100644 --- a/tests/common_faiss_tests.py +++ b/tests/common_faiss_tests.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_NSG_compressed_graph.cpp b/tests/test_NSG_compressed_graph.cpp index ecfc856be4..36b6f5c2e9 100644 --- a/tests/test_NSG_compressed_graph.cpp +++ b/tests/test_NSG_compressed_graph.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_RCQ_cropping.cpp b/tests/test_RCQ_cropping.cpp index 4463c256ed..593fd2a873 100644 --- a/tests/test_RCQ_cropping.cpp +++ b/tests/test_RCQ_cropping.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_approx_topk.cpp b/tests/test_approx_topk.cpp index 4bdf8f6c27..e5c2c1df6a 100644 --- a/tests/test_approx_topk.cpp +++ b/tests/test_approx_topk.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_autotune.py b/tests/test_autotune.py index 623e81b28d..e32d0cb246 100644 --- a/tests/test_autotune.py +++ b/tests/test_autotune.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_binary_factory.py b/tests/test_binary_factory.py index f61403c362..437bc6e6a6 100644 --- a/tests/test_binary_factory.py +++ b/tests/test_binary_factory.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_binary_flat.cpp b/tests/test_binary_flat.cpp index 048edce200..a3a3380b67 100644 --- a/tests/test_binary_flat.cpp +++ b/tests/test_binary_flat.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_binary_hashindex.py b/tests/test_binary_hashindex.py index e9a6eaca49..652358c5d1 100644 --- a/tests/test_binary_hashindex.py +++ b/tests/test_binary_hashindex.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_binary_io.py b/tests/test_binary_io.py index a890e9368f..8ca1004433 100644 --- a/tests/test_binary_io.py +++ b/tests/test_binary_io.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_build_blocks.py b/tests/test_build_blocks.py index a63f62a8d9..d8ebf96432 100644 --- a/tests/test_build_blocks.py +++ b/tests/test_build_blocks.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_callback.cpp b/tests/test_callback.cpp index cdfadf1d39..fb0fc03723 100644 --- a/tests/test_callback.cpp +++ b/tests/test_callback.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the diff --git a/tests/test_clone.py b/tests/test_clone.py index 1cc98668bc..7ed047d54e 100644 --- a/tests/test_clone.py +++ b/tests/test_clone.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_clustering.py b/tests/test_clustering.py index b1afc8523f..b34c9cc257 100644 --- a/tests/test_clustering.py +++ b/tests/test_clustering.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_code_distance.cpp b/tests/test_code_distance.cpp index 4a2021a786..f1a3939388 100644 --- a/tests/test_code_distance.cpp +++ b/tests/test_code_distance.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_common_ivf_empty_index.cpp b/tests/test_common_ivf_empty_index.cpp index b80125c005..13f01979df 100644 --- a/tests/test_common_ivf_empty_index.cpp +++ b/tests/test_common_ivf_empty_index.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the diff --git a/tests/test_contrib.py b/tests/test_contrib.py index a2eb7046bd..33bca7a4be 100644 --- a/tests/test_contrib.py +++ b/tests/test_contrib.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_contrib_with_scipy.py b/tests/test_contrib_with_scipy.py index 618a550b73..084398db55 100644 --- a/tests/test_contrib_with_scipy.py +++ b/tests/test_contrib_with_scipy.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_cppcontrib_sa_decode.cpp b/tests/test_cppcontrib_sa_decode.cpp index cb13e8bf95..f621279606 100644 --- a/tests/test_cppcontrib_sa_decode.cpp +++ b/tests/test_cppcontrib_sa_decode.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_cppcontrib_uintreader.cpp b/tests/test_cppcontrib_uintreader.cpp index b6ecb261bf..aa17ad6520 100644 --- a/tests/test_cppcontrib_uintreader.cpp +++ b/tests/test_cppcontrib_uintreader.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_dealloc_invlists.cpp b/tests/test_dealloc_invlists.cpp index f1b69379a8..53d57cbf63 100644 --- a/tests/test_dealloc_invlists.cpp +++ b/tests/test_dealloc_invlists.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_disable_pq_sdc_tables.cpp b/tests/test_disable_pq_sdc_tables.cpp index b211a5c451..16b87ce61d 100644 --- a/tests/test_disable_pq_sdc_tables.cpp +++ b/tests/test_disable_pq_sdc_tables.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_distances_simd.cpp b/tests/test_distances_simd.cpp index b34b9b024d..d276160a70 100644 --- a/tests/test_distances_simd.cpp +++ b/tests/test_distances_simd.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_documentation.py b/tests/test_documentation.py index 2a0e189281..bf0b8ef815 100644 --- a/tests/test_documentation.py +++ b/tests/test_documentation.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_extra_distances.py b/tests/test_extra_distances.py index fcaf4d383d..f18c7e29cd 100644 --- a/tests/test_extra_distances.py +++ b/tests/test_extra_distances.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_factory.py b/tests/test_factory.py index f16a60e772..4196895540 100644 --- a/tests/test_factory.py +++ b/tests/test_factory.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_factory_tools.cpp b/tests/test_factory_tools.cpp index c8d7f21c3f..412b05fa55 100644 --- a/tests/test_factory_tools.cpp +++ b/tests/test_factory_tools.cpp @@ -1,4 +1,9 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ #include #include diff --git a/tests/test_fast_scan.py b/tests/test_fast_scan.py index cfe9636fee..a6ace41fc7 100644 --- a/tests/test_fast_scan.py +++ b/tests/test_fast_scan.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_fast_scan_ivf.py b/tests/test_fast_scan_ivf.py index f48dd2e47a..55de784ad6 100644 --- a/tests/test_fast_scan_ivf.py +++ b/tests/test_fast_scan_ivf.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_fastscan_perf.cpp b/tests/test_fastscan_perf.cpp index f7d114d738..a1e879b0e1 100644 --- a/tests/test_fastscan_perf.cpp +++ b/tests/test_fastscan_perf.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_graph_based.py b/tests/test_graph_based.py index 81786efdf7..57bf877fbb 100644 --- a/tests/test_graph_based.py +++ b/tests/test_graph_based.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_heap.cpp b/tests/test_heap.cpp index 9481003db6..b707ba8b0b 100644 --- a/tests/test_heap.cpp +++ b/tests/test_heap.cpp @@ -1,9 +1,10 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + #include #include #include diff --git a/tests/test_hnsw.cpp b/tests/test_hnsw.cpp index 43f64714ff..e3b8325c6a 100644 --- a/tests/test_hnsw.cpp +++ b/tests/test_hnsw.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_index.py b/tests/test_index.py index 2e0174d173..8cc6e346a4 100644 --- a/tests/test_index.py +++ b/tests/test_index.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_index_accuracy.py b/tests/test_index_accuracy.py index 13c0515286..a5d1d9c8f1 100644 --- a/tests/test_index_accuracy.py +++ b/tests/test_index_accuracy.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_index_binary.py b/tests/test_index_binary.py index 7820cb6627..e3f13a18ef 100644 --- a/tests/test_index_binary.py +++ b/tests/test_index_binary.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_index_binary_from_float.py b/tests/test_index_binary_from_float.py index 188bcfbd39..0429379853 100644 --- a/tests/test_index_binary_from_float.py +++ b/tests/test_index_binary_from_float.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_index_composite.py b/tests/test_index_composite.py index 8d9b441adc..b378fbd5d5 100644 --- a/tests/test_index_composite.py +++ b/tests/test_index_composite.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_io.py b/tests/test_io.py index 99dfe60847..d2871f2eee 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_ivf_index.cpp b/tests/test_ivf_index.cpp index b3786f597b..5f8d2ab0c7 100644 --- a/tests/test_ivf_index.cpp +++ b/tests/test_ivf_index.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_ivflib.py b/tests/test_ivflib.py index 0a3fb8c87e..d905f3d486 100644 --- a/tests/test_ivflib.py +++ b/tests/test_ivflib.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_ivfpq_codec.cpp b/tests/test_ivfpq_codec.cpp index 9ea5ce8534..297d6b4cf8 100644 --- a/tests/test_ivfpq_codec.cpp +++ b/tests/test_ivfpq_codec.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_ivfpq_indexing.cpp b/tests/test_ivfpq_indexing.cpp index 334256096c..4f659d09fb 100644 --- a/tests/test_ivfpq_indexing.cpp +++ b/tests/test_ivfpq_indexing.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_local_search_quantizer.py b/tests/test_local_search_quantizer.py index 7975929811..6a862e5477 100644 --- a/tests/test_local_search_quantizer.py +++ b/tests/test_local_search_quantizer.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_lowlevel_ivf.cpp b/tests/test_lowlevel_ivf.cpp index 7ce90a1d2d..fceaec442b 100644 --- a/tests/test_lowlevel_ivf.cpp +++ b/tests/test_lowlevel_ivf.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_mem_leak.cpp b/tests/test_mem_leak.cpp index b0232a85a5..bd6f7d781e 100644 --- a/tests/test_mem_leak.cpp +++ b/tests/test_mem_leak.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -14,7 +14,7 @@ using namespace faiss; -TEST(MEM_LEAK, ivfflat) { +TEST(TestMemoryLeak, ivfflat) { size_t num_tfidf_faiss_cells = 20; size_t max_tfidf_features = 500; diff --git a/tests/test_merge.cpp b/tests/test_merge.cpp index edbe2a03a6..cd13f907d4 100644 --- a/tests/test_merge.cpp +++ b/tests/test_merge.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_merge_index.py b/tests/test_merge_index.py index bdcc813f1c..0fd0c058d7 100644 --- a/tests/test_merge_index.py +++ b/tests/test_merge_index.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_meta_index.py b/tests/test_meta_index.py index d0896e8ba2..52bc01f0a0 100644 --- a/tests/test_meta_index.py +++ b/tests/test_meta_index.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_omp_threads.cpp b/tests/test_omp_threads.cpp index 0ba04eb308..1249b88356 100644 --- a/tests/test_omp_threads.cpp +++ b/tests/test_omp_threads.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_omp_threads_py.py b/tests/test_omp_threads_py.py index c96494dc1f..db0f04e48e 100644 --- a/tests/test_omp_threads_py.py +++ b/tests/test_omp_threads_py.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_ondisk_ivf.cpp b/tests/test_ondisk_ivf.cpp index 7c41e082f8..726fae0a59 100644 --- a/tests/test_ondisk_ivf.cpp +++ b/tests/test_ondisk_ivf.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_oom_exception.py b/tests/test_oom_exception.py index e53008848c..03a1682c18 100644 --- a/tests/test_oom_exception.py +++ b/tests/test_oom_exception.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_pairs_decoding.cpp b/tests/test_pairs_decoding.cpp index d21136cb73..3b36d41c10 100644 --- a/tests/test_pairs_decoding.cpp +++ b/tests/test_pairs_decoding.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_params_override.cpp b/tests/test_params_override.cpp index 8891d0e559..106bf27944 100644 --- a/tests/test_params_override.cpp +++ b/tests/test_params_override.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_partition.py b/tests/test_partition.py index fd41eabe1f..70bfd76f50 100644 --- a/tests/test_partition.py +++ b/tests/test_partition.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_partitioning.cpp b/tests/test_partitioning.cpp index b719fcfe01..14b8927c0a 100644 --- a/tests/test_partitioning.cpp +++ b/tests/test_partitioning.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_pq_encoding.cpp b/tests/test_pq_encoding.cpp index be09ba2342..ad5a089883 100644 --- a/tests/test_pq_encoding.cpp +++ b/tests/test_pq_encoding.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_product_quantizer.py b/tests/test_product_quantizer.py index f531cab2a1..97fd98d3a0 100644 --- a/tests/test_product_quantizer.py +++ b/tests/test_product_quantizer.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_referenced_objects.py b/tests/test_referenced_objects.py index 0d128628b4..a7d697a169 100644 --- a/tests/test_referenced_objects.py +++ b/tests/test_referenced_objects.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_refine.py b/tests/test_refine.py index 4e85ee11ec..f272584245 100644 --- a/tests/test_refine.py +++ b/tests/test_refine.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_residual_quantizer.py b/tests/test_residual_quantizer.py index 6079ca75e1..c9ae4090c4 100644 --- a/tests/test_residual_quantizer.py +++ b/tests/test_residual_quantizer.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_rowwise_minmax.py b/tests/test_rowwise_minmax.py index 53e6c00b15..32b79ec61a 100644 --- a/tests/test_rowwise_minmax.py +++ b/tests/test_rowwise_minmax.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_search_params.py b/tests/test_search_params.py index 886ffc0c62..18436edf4d 100644 --- a/tests/test_search_params.py +++ b/tests/test_search_params.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_simdlib.cpp b/tests/test_simdlib.cpp index 58ebc85856..7ecbbb98b8 100644 --- a/tests/test_simdlib.cpp +++ b/tests/test_simdlib.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_sliding_ivf.cpp b/tests/test_sliding_ivf.cpp index 0214dd72e8..0afe6307ea 100644 --- a/tests/test_sliding_ivf.cpp +++ b/tests/test_sliding_ivf.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_standalone_codec.py b/tests/test_standalone_codec.py index 643e769f0e..b6b3158af2 100644 --- a/tests/test_standalone_codec.py +++ b/tests/test_standalone_codec.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_swig_wrapper.py b/tests/test_swig_wrapper.py index ab3dd9ab70..ca2a3ec9ff 100644 --- a/tests/test_swig_wrapper.py +++ b/tests/test_swig_wrapper.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/test_threaded_index.cpp b/tests/test_threaded_index.cpp index 3dc2660d9e..170b58fc9c 100644 --- a/tests/test_threaded_index.cpp +++ b/tests/test_threaded_index.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_transfer_invlists.cpp b/tests/test_transfer_invlists.cpp index 309a331dda..30c0ad0d54 100644 --- a/tests/test_transfer_invlists.cpp +++ b/tests/test_transfer_invlists.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_util.h b/tests/test_util.h index 3be0e35cff..ff76ed3e9c 100644 --- a/tests/test_util.h +++ b/tests/test_util.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tests/test_utils.cpp b/tests/test_utils.cpp index 793e290711..f297c793fe 100644 --- a/tests/test_utils.cpp +++ b/tests/test_utils.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the diff --git a/tests/torch_test_contrib.py b/tests/torch_test_contrib.py index db18e0e9dc..26c381b3cc 100644 --- a/tests/torch_test_contrib.py +++ b/tests/torch_test_contrib.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tests/torch_test_neural_net.py b/tests/torch_test_neural_net.py index ef37ac6a28..0958b265fd 100644 --- a/tests/torch_test_neural_net.py +++ b/tests/torch_test_neural_net.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tutorial/cpp/1-Flat.cpp b/tutorial/cpp/1-Flat.cpp index 147fa89bc0..8bdebe22a2 100644 --- a/tutorial/cpp/1-Flat.cpp +++ b/tutorial/cpp/1-Flat.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tutorial/cpp/2-IVFFlat.cpp b/tutorial/cpp/2-IVFFlat.cpp index 86530ae985..1427f86092 100644 --- a/tutorial/cpp/2-IVFFlat.cpp +++ b/tutorial/cpp/2-IVFFlat.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tutorial/cpp/3-IVFPQ.cpp b/tutorial/cpp/3-IVFPQ.cpp index c84e52e862..0de05b0126 100644 --- a/tutorial/cpp/3-IVFPQ.cpp +++ b/tutorial/cpp/3-IVFPQ.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tutorial/cpp/4-GPU.cpp b/tutorial/cpp/4-GPU.cpp index 158aefb54f..fe623a006a 100644 --- a/tutorial/cpp/4-GPU.cpp +++ b/tutorial/cpp/4-GPU.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tutorial/cpp/5-Multiple-GPUs.cpp b/tutorial/cpp/5-Multiple-GPUs.cpp index 0872e60a87..b381ec5c76 100644 --- a/tutorial/cpp/5-Multiple-GPUs.cpp +++ b/tutorial/cpp/5-Multiple-GPUs.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tutorial/cpp/6-HNSW.cpp b/tutorial/cpp/6-HNSW.cpp index 9bd8cd3faa..115fa534c9 100644 --- a/tutorial/cpp/6-HNSW.cpp +++ b/tutorial/cpp/6-HNSW.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tutorial/cpp/7-PQFastScan.cpp b/tutorial/cpp/7-PQFastScan.cpp index 4cdfea052e..3e08948902 100644 --- a/tutorial/cpp/7-PQFastScan.cpp +++ b/tutorial/cpp/7-PQFastScan.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tutorial/cpp/8-PQFastScanRefine.cpp b/tutorial/cpp/8-PQFastScanRefine.cpp index 2435d94d2c..b90036144c 100644 --- a/tutorial/cpp/8-PQFastScanRefine.cpp +++ b/tutorial/cpp/8-PQFastScanRefine.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tutorial/cpp/9-RefineComparison.cpp b/tutorial/cpp/9-RefineComparison.cpp index d7fbc90aec..cf38b6f1f8 100644 --- a/tutorial/cpp/9-RefineComparison.cpp +++ b/tutorial/cpp/9-RefineComparison.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/tutorial/cpp/CMakeLists.txt b/tutorial/cpp/CMakeLists.txt index f964b3dda9..045c1bb092 100644 --- a/tutorial/cpp/CMakeLists.txt +++ b/tutorial/cpp/CMakeLists.txt @@ -1,7 +1,6 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# All rights reserved. +# Copyright (c) Meta Platforms, Inc. and affiliates. # -# This source code is licensed under the BSD-style license found in the +# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. add_executable(1-Flat EXCLUDE_FROM_ALL 1-Flat.cpp) diff --git a/tutorial/python/1-Flat.py b/tutorial/python/1-Flat.py index 584c7bc703..e0caaf305b 100644 --- a/tutorial/python/1-Flat.py +++ b/tutorial/python/1-Flat.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tutorial/python/2-IVFFlat.py b/tutorial/python/2-IVFFlat.py index a4ac0c4d1f..394baefdea 100644 --- a/tutorial/python/2-IVFFlat.py +++ b/tutorial/python/2-IVFFlat.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tutorial/python/3-IVFPQ.py b/tutorial/python/3-IVFPQ.py index e502239ca4..b2d83b0339 100644 --- a/tutorial/python/3-IVFPQ.py +++ b/tutorial/python/3-IVFPQ.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tutorial/python/4-GPU.py b/tutorial/python/4-GPU.py index 6f5e37e535..ebad5aba17 100644 --- a/tutorial/python/4-GPU.py +++ b/tutorial/python/4-GPU.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tutorial/python/5-Multiple-GPUs.py b/tutorial/python/5-Multiple-GPUs.py index c458587ce9..d3ce033d45 100644 --- a/tutorial/python/5-Multiple-GPUs.py +++ b/tutorial/python/5-Multiple-GPUs.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tutorial/python/7-PQFastScan.py b/tutorial/python/7-PQFastScan.py index 34d7a34ac1..c6e2fa1d99 100644 --- a/tutorial/python/7-PQFastScan.py +++ b/tutorial/python/7-PQFastScan.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tutorial/python/8-PQFastScanRefine.py b/tutorial/python/8-PQFastScanRefine.py index 115a036fa7..487c2eb5c2 100644 --- a/tutorial/python/8-PQFastScanRefine.py +++ b/tutorial/python/8-PQFastScanRefine.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. diff --git a/tutorial/python/9-RefineComparison.py b/tutorial/python/9-RefineComparison.py index 6fa69f33d9..a1c5870aba 100644 --- a/tutorial/python/9-RefineComparison.py +++ b/tutorial/python/9-RefineComparison.py @@ -1,4 +1,4 @@ -# Copyright (c) Facebook, Inc. and its affiliates. +# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. From ebe5a692f89c08b835c544a25631d29fdea0ff63 Mon Sep 17 00:00:00 2001 From: Amir Sadoughi Date: Tue, 22 Oct 2024 13:35:02 -0700 Subject: [PATCH 20/21] 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 --- .github/actions/build_cmake/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build_cmake/action.yml b/.github/actions/build_cmake/action.yml index 2e32dc1578..1ec1186484 100644 --- a/.github/actions/build_cmake/action.yml +++ b/.github/actions/build_cmake/action.yml @@ -63,7 +63,7 @@ runs: : # skip torch install via conda, we need to install via pip to get # ROCm-enabled version until it's supported in conda by PyTorch elif [ "${{ inputs.gpu }}" = "ON" ]; then - conda install -y -q pytorch pytorch-cuda=12.4 -c pytorch -c nvidia/label/cuda-12.4.0 + conda install -y -q "pytorch<2.5" pytorch-cuda=12.4 -c pytorch -c nvidia/label/cuda-12.4.0 else conda install -y -q pytorch -c pytorch fi From 9c3cd777d89ecf7bcdffb6fa37786246e24fbccd Mon Sep 17 00:00:00 2001 From: Michael Norris Date: Wed, 23 Oct 2024 07:34:38 -0700 Subject: [PATCH 21/21] Re-add example of how to build, link, and test an external SWIG module"" (#3981) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3981 prior issues: 1. Nightlies were breaking due to yaml changes. Those are reverted. 2. AIX build broke (external). Fix is to add a conditional in tests/CMakeLists.txt. 3. Build issue https://github.com/facebookresearch/faiss/issues/3944. Could not repro now. Reviewed By: mdouze Differential Revision: D64440629 fbshipit-source-id: a86b27c25ada0d07e9d3b4c6e4f00b2e6b637fbe --- faiss/python/CMakeLists.txt | 29 ++++ .../python/faiss_example_external_module.swig | 141 ++++++++++++++++++ faiss/python/setup.py | 58 ++++--- faiss/python/swigfaiss.swig | 43 +++++- tests/CMakeLists.txt | 4 + tests/external_module_test.py | 66 ++++++++ 6 files changed, 314 insertions(+), 27 deletions(-) create mode 100644 faiss/python/faiss_example_external_module.swig create mode 100644 tests/external_module_test.py diff --git a/faiss/python/CMakeLists.txt b/faiss/python/CMakeLists.txt index 76cf3f639d..4813176bb7 100644 --- a/faiss/python/CMakeLists.txt +++ b/faiss/python/CMakeLists.txt @@ -60,6 +60,7 @@ configure_swigfaiss(swigfaiss.swig) configure_swigfaiss(swigfaiss_avx2.swig) configure_swigfaiss(swigfaiss_avx512.swig) configure_swigfaiss(swigfaiss_sve.swig) +configure_swigfaiss(faiss_example_external_module.swig) if(TARGET faiss) # Manually add headers as extra dependencies of swigfaiss. @@ -73,6 +74,8 @@ if(TARGET faiss) "${faiss_SOURCE_DIR}/faiss/${h}") list(APPEND SWIG_MODULE_swigfaiss_sve_EXTRA_DEPS "${faiss_SOURCE_DIR}/faiss/${h}") + list(APPEND SWIG_MODULE_faiss_example_external_module_EXTRA_DEPS + "${faiss_SOURCE_DIR}/faiss/${h}") endforeach() if(FAISS_ENABLE_ROCM) foreach(h ${FAISS_GPU_HEADERS}) @@ -82,6 +85,8 @@ if(TARGET faiss) "${faiss_SOURCE_DIR}/faiss/gpu-rocm/${h}") list(APPEND SWIG_MODULE_swigfaiss_avx512_EXTRA_DEPS "${faiss_SOURCE_DIR}/faiss/gpu-rocm/${h}") + list(APPEND SWIG_MODULE_faiss_example_external_module_EXTRA_DEPS + "${faiss_SOURCE_DIR}/faiss/gpu-rocm/${h}") endforeach() else() foreach(h ${FAISS_GPU_HEADERS}) @@ -93,6 +98,8 @@ if(TARGET faiss) "${faiss_SOURCE_DIR}/faiss/gpu/${h}") list(APPEND SWIG_MODULE_swigfaiss_sve_EXTRA_DEPS "${faiss_SOURCE_DIR}/faiss/gpu/${h}") + list(APPEND SWIG_MODULE_faiss_example_external_module_EXTRA_DEPS + "${faiss_SOURCE_DIR}/faiss/gpu/${h}") endforeach() endif() else() @@ -151,18 +158,29 @@ if(NOT FAISS_OPT_LEVEL STREQUAL "sve") set_target_properties(swigfaiss_sve PROPERTIES EXCLUDE_FROM_ALL TRUE) endif() +set_property(SOURCE faiss_example_external_module.swig + PROPERTY SWIG_MODULE_NAME faiss_example_external_module) +swig_add_library(faiss_example_external_module + TYPE SHARED + LANGUAGE python + SOURCES faiss_example_external_module.swig +) +set_property(TARGET faiss_example_external_module PROPERTY SWIG_COMPILE_OPTIONS -doxygen) + if(NOT WIN32) # NOTE: Python does not recognize the dylib extension. set_target_properties(swigfaiss PROPERTIES SUFFIX .so) set_target_properties(swigfaiss_avx2 PROPERTIES SUFFIX .so) set_target_properties(swigfaiss_avx512 PROPERTIES SUFFIX .so) set_target_properties(swigfaiss_sve PROPERTIES SUFFIX .so) + set_target_properties(faiss_example_external_module PROPERTIES SUFFIX .so) else() # we need bigobj for the swig wrapper target_compile_options(swigfaiss PRIVATE /bigobj) target_compile_options(swigfaiss_avx2 PRIVATE /bigobj) target_compile_options(swigfaiss_avx512 PRIVATE /bigobj) target_compile_options(swigfaiss_sve PRIVATE /bigobj) + target_compile_options(faiss_example_external_module PRIVATE /bigobj) endif() if(FAISS_ENABLE_GPU) @@ -170,6 +188,7 @@ if(FAISS_ENABLE_GPU) target_link_libraries(swigfaiss PRIVATE hip::host) target_link_libraries(swigfaiss_avx2 PRIVATE hip::host) target_link_libraries(swigfaiss_avx512 PRIVATE hip::host) + target_link_libraries(faiss_example_external_module PRIVATE hip::host) else() find_package(CUDAToolkit REQUIRED) if(FAISS_ENABLE_RAFT) @@ -220,12 +239,21 @@ target_link_libraries(swigfaiss_sve PRIVATE OpenMP::OpenMP_CXX ) +target_link_libraries(faiss_example_external_module PRIVATE + Python::Module + Python::NumPy + OpenMP::OpenMP_CXX + swigfaiss + faiss +) + # Hack so that python_callbacks.h can be included as # `#include `. target_include_directories(swigfaiss PRIVATE ${PROJECT_SOURCE_DIR}/../..) target_include_directories(swigfaiss_avx2 PRIVATE ${PROJECT_SOURCE_DIR}/../..) target_include_directories(swigfaiss_avx512 PRIVATE ${PROJECT_SOURCE_DIR}/../..) target_include_directories(swigfaiss_sve PRIVATE ${PROJECT_SOURCE_DIR}/../..) +target_include_directories(faiss_example_external_module PRIVATE ${PROJECT_SOURCE_DIR}/../..) find_package(Python REQUIRED COMPONENTS Development NumPy @@ -251,6 +279,7 @@ target_link_libraries(swigfaiss PRIVATE faiss_python_callbacks) target_link_libraries(swigfaiss_avx2 PRIVATE faiss_python_callbacks) target_link_libraries(swigfaiss_avx512 PRIVATE faiss_python_callbacks) target_link_libraries(swigfaiss_sve PRIVATE faiss_python_callbacks) +target_link_libraries(faiss_example_external_module PRIVATE faiss_python_callbacks) configure_file(setup.py setup.py COPYONLY) configure_file(__init__.py __init__.py COPYONLY) diff --git a/faiss/python/faiss_example_external_module.swig b/faiss/python/faiss_example_external_module.swig new file mode 100644 index 0000000000..6a1c9fe605 --- /dev/null +++ b/faiss/python/faiss_example_external_module.swig @@ -0,0 +1,141 @@ +/** + * Copyright (c) Meta Platforms, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// This is an example of how an external module can be added via SWIG. + +%module faiss_example_external_module; + + +// Put C++ includes here +%{ + +#include +#include + +%} + +#pragma SWIG nowarn=322 + +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; + +typedef signed char int8_t; +typedef short int16_t; +typedef int int32_t; + +#ifdef SWIGWORDSIZE64 +typedef unsigned long uint64_t; +typedef long int64_t; +#else +typedef unsigned long long uint64_t; +typedef long long int64_t; +#endif + +typedef uint64_t size_t; + +// This means: assume what's declared in these .h files is provided +// by the Faiss module. +%import(module="faiss") "faiss/MetricType.h" +%import(module="faiss") "faiss/impl/IDSelector.h" + +// functions to be parsed here + +// This is important to release GIL and do Faiss exception handing +%exception { + Py_BEGIN_ALLOW_THREADS + try { + $action + } catch(faiss::FaissException & e) { + PyEval_RestoreThread(_save); + + if (PyErr_Occurred()) { + // some previous code already set the error type. + } else { + PyErr_SetString(PyExc_RuntimeError, e.what()); + } + SWIG_fail; + } catch(std::bad_alloc & ba) { + PyEval_RestoreThread(_save); + PyErr_SetString(PyExc_MemoryError, "std::bad_alloc"); + SWIG_fail; + } + Py_END_ALLOW_THREADS +} + + +// any class or function declared below will be made available +// in the module. +%inline %{ + +struct IDSelectorModulo : faiss::IDSelector { + int mod; + + IDSelectorModulo(int mod): mod(mod) {} + + bool is_member(faiss::idx_t id) const { + return id % mod == 0; + } + + ~IDSelectorModulo() override {} +}; + +faiss::idx_t sum_of_idx(size_t n, const faiss::idx_t *tab) { + faiss::idx_t sum = 0; + for(size_t i = 0; i < n; i++) { + sum += tab[i]; + } + return sum; +} + +float sum_of_float32(size_t n, const float *tab) { + float sum = 0; + for(size_t i = 0; i < n; i++) { + sum += tab[i]; + } + return sum; +} + +double sum_of_float64(size_t n, const double *tab) { + double sum = 0; + for(size_t i = 0; i < n; i++) { + sum += tab[i]; + } + return sum; +} + +%} + +/********************************************** + * To test if passing a swig_ptr on all array types works + **********************************************/ + +%define SUM_OF_TYPE(ty) + +%inline %{ + +ty##_t sum_of_##ty (size_t n, const ty##_t * tab) { + ty##_t sum = 0; + for(size_t i = 0; i < n; i++) { + sum += tab[i]; + } + return sum; +} + +%} + +%enddef + +SUM_OF_TYPE(uint8); +SUM_OF_TYPE(uint16); +SUM_OF_TYPE(uint32); +SUM_OF_TYPE(uint64); + +SUM_OF_TYPE(int8); +SUM_OF_TYPE(int16); +SUM_OF_TYPE(int32); +SUM_OF_TYPE(int64); diff --git a/faiss/python/setup.py b/faiss/python/setup.py index 167999f308..89c7671f7f 100644 --- a/faiss/python/setup.py +++ b/faiss/python/setup.py @@ -4,10 +4,12 @@ # LICENSE file in the root directory of this source tree. from __future__ import print_function -from setuptools import setup, find_packages + import os -import shutil import platform +import shutil + +from setuptools import find_packages, setup # make the faiss python package dir shutil.rmtree("faiss", ignore_errors=True) @@ -20,25 +22,32 @@ shutil.copyfile("extra_wrappers.py", "faiss/extra_wrappers.py") shutil.copyfile("array_conversions.py", "faiss/array_conversions.py") -ext = ".pyd" if platform.system() == 'Windows' else ".so" -prefix = "Release/" * (platform.system() == 'Windows') +ext = ".pyd" if platform.system() == "Windows" else ".so" +prefix = "Release/" * (platform.system() == "Windows") swigfaiss_generic_lib = f"{prefix}_swigfaiss{ext}" swigfaiss_avx2_lib = f"{prefix}_swigfaiss_avx2{ext}" swigfaiss_avx512_lib = f"{prefix}_swigfaiss_avx512{ext}" callbacks_lib = f"{prefix}libfaiss_python_callbacks{ext}" swigfaiss_sve_lib = f"{prefix}_swigfaiss_sve{ext}" +faiss_example_external_module_lib = f"_faiss_example_external_module{ext}" found_swigfaiss_generic = os.path.exists(swigfaiss_generic_lib) found_swigfaiss_avx2 = os.path.exists(swigfaiss_avx2_lib) found_swigfaiss_avx512 = os.path.exists(swigfaiss_avx512_lib) found_callbacks = os.path.exists(callbacks_lib) found_swigfaiss_sve = os.path.exists(swigfaiss_sve_lib) +found_faiss_example_external_module_lib = os.path.exists( + faiss_example_external_module_lib +) -assert (found_swigfaiss_generic or found_swigfaiss_avx2 or found_swigfaiss_avx512 or found_swigfaiss_sve), \ - f"Could not find {swigfaiss_generic_lib} or " \ - f"{swigfaiss_avx2_lib} or {swigfaiss_avx512_lib} or {swigfaiss_sve_lib}. " \ +assert ( + found_swigfaiss_generic or found_swigfaiss_avx2 or found_swigfaiss_avx512 or found_swigfaiss_sve or found_faiss_example_external_module_lib +), ( + f"Could not find {swigfaiss_generic_lib} or " + f"{swigfaiss_avx2_lib} or {swigfaiss_avx512_lib} or {swigfaiss_sve_lib} or {faiss_example_external_module_lib}. " f"Faiss may not be compiled yet." +) if found_swigfaiss_generic: print(f"Copying {swigfaiss_generic_lib}") @@ -64,7 +73,17 @@ shutil.copyfile("swigfaiss_sve.py", "faiss/swigfaiss_sve.py") shutil.copyfile(swigfaiss_sve_lib, f"faiss/_swigfaiss_sve{ext}") -long_description=""" +if found_faiss_example_external_module_lib: + print(f"Copying {faiss_example_external_module_lib}") + shutil.copyfile( + "faiss_example_external_module.py", "faiss/faiss_example_external_module.py" + ) + shutil.copyfile( + faiss_example_external_module_lib, + f"faiss/_faiss_example_external_module{ext}", + ) + +long_description = """ Faiss is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also contains supporting @@ -73,20 +92,19 @@ are implemented on the GPU. It is developed by Facebook AI Research. """ setup( - name='faiss', - version='1.9.0', - description='A library for efficient similarity search and clustering of dense vectors', + name="faiss", + version="1.9.0", + description="A library for efficient similarity search and clustering of dense vectors", long_description=long_description, - url='https://github.com/facebookresearch/faiss', - author='Matthijs Douze, Jeff Johnson, Herve Jegou, Lucas Hosseini', - author_email='matthijs@meta.com', - license='MIT', - keywords='search nearest neighbors', - - install_requires=['numpy', 'packaging'], - packages=['faiss', 'faiss.contrib', 'faiss.contrib.torch'], + url="https://github.com/facebookresearch/faiss", + author="Matthijs Douze, Jeff Johnson, Herve Jegou, Lucas Hosseini", + author_email="matthijs@meta.com", + license="MIT", + keywords="search nearest neighbors", + install_requires=["numpy", "packaging"], + packages=["faiss", "faiss.contrib", "faiss.contrib.torch"], package_data={ - 'faiss': ['*.so', '*.pyd'], + "faiss": ["*.so", "*.pyd"], }, zip_safe=False, ) diff --git a/faiss/python/swigfaiss.swig b/faiss/python/swigfaiss.swig index 4d44fb650b..b13e23963d 100644 --- a/faiss/python/swigfaiss.swig +++ b/faiss/python/swigfaiss.swig @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. + * Copyright (c) Meta Platforms, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -33,7 +33,24 @@ #pragma SWIG nowarn=512 #pragma SWIG nowarn=362 -%include +// we need explict control of these typedefs... +// %include +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; + +// char != unsigned char AND char != signed char so be explicit +typedef signed char int8_t; +typedef short int16_t; +typedef int int32_t; + +#ifdef SWIGWORDSIZE64 +typedef unsigned long uint64_t; +typedef long int64_t; +#else +typedef unsigned long long uint64_t; +typedef long long int64_t; +#endif typedef uint64_t size_t; @@ -239,10 +256,15 @@ namespace std { // primitive array types %template(Float32Vector) std::vector; %template(Float64Vector) std::vector; + +// weird interaction within C++ between char and signed char +%ignore Int8Vector::swap; + %template(Int8Vector) std::vector; %template(Int16Vector) std::vector; %template(Int32Vector) std::vector; %template(Int64Vector) std::vector; + %template(UInt8Vector) std::vector; %template(UInt16Vector) std::vector; %template(UInt32Vector) std::vector; @@ -1086,6 +1108,13 @@ void *memcpy(void *dest, const void *src, size_t n); #ifdef SWIGPYTHON +// transfer SWIG flag to C++ +#ifdef SWIGWORDSIZE64 +%{ +#define SWIGWORDSIZE64_CPP +%} +#endif + %{ PyObject *swig_ptr (PyObject *a) { @@ -1120,7 +1149,7 @@ PyObject *swig_ptr (PyObject *a) return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_char, 0); } if(PyArray_TYPE(ao) == NPY_INT8) { - return SWIG_NewPointerObj(data, SWIGTYPE_p_char, 0); + return SWIG_NewPointerObj(data, SWIGTYPE_p_signed_char, 0); } if(PyArray_TYPE(ao) == NPY_UINT16) { return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_short, 0); @@ -1141,14 +1170,14 @@ PyObject *swig_ptr (PyObject *a) // Convert npy64 either long or long long and it depends on how compiler define int64_t. // In the 64bit machine, typically the int64_t should be long but it is not hold for Apple osx. // In this case, we want to convert npy64 to long_Long in osx -#if __SIZEOF_LONG__ == 8 && !defined(__APPLE__) +#ifdef SWIGWORDSIZE64_CPP return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long, 0); #else return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long_long, 0); #endif } if(PyArray_TYPE(ao) == NPY_INT64) { -#if __SIZEOF_LONG__ == 8 && !defined(__APPLE__) +#ifdef SWIGWORDSIZE64_CPP return SWIG_NewPointerObj(data, SWIGTYPE_p_long, 0); #else return SWIG_NewPointerObj(data, SWIGTYPE_p_long_long, 0); @@ -1205,8 +1234,8 @@ PyObject * rev_swig_ptr(ctype *src, size_t size); REV_SWIG_PTR(float, NPY_FLOAT32); REV_SWIG_PTR(double, NPY_FLOAT64); -REV_SWIG_PTR(unsigned char, NPY_UINT8); -REV_SWIG_PTR(char, NPY_INT8); +REV_SWIG_PTR(uint8_t, NPY_UINT8); +REV_SWIG_PTR(int8_t, NPY_INT8); REV_SWIG_PTR(unsigned short, NPY_UINT16); REV_SWIG_PTR(short, NPY_INT16); REV_SWIG_PTR(int, NPY_INT32); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 39876db8f1..6202a2cbf9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -43,6 +43,10 @@ include(../cmake/link_to_faiss_lib.cmake) link_to_faiss_lib(faiss_test) +if (FAISS_ENABLE_PYTHON) + target_link_libraries(faiss_test PUBLIC faiss_example_external_module) +endif() + include(FetchContent) FetchContent_Declare( googletest diff --git a/tests/external_module_test.py b/tests/external_module_test.py new file mode 100644 index 0000000000..15f2809189 --- /dev/null +++ b/tests/external_module_test.py @@ -0,0 +1,66 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +import unittest + +import faiss + +import faiss.faiss_example_external_module as external_module + +import numpy as np + + +class TestCustomIDSelector(unittest.TestCase): + """test if we can construct a custom IDSelector""" + + def test_IDSelector(self): + ids = external_module.IDSelectorModulo(3) + self.assertFalse(ids.is_member(1)) + self.assertTrue(ids.is_member(3)) + + +class TestArrayConversions(unittest.TestCase): + + def test_idx_array(self): + tab = np.arange(10).astype("int64") + new_sum = external_module.sum_of_idx(len(tab), faiss.swig_ptr(tab)) + self.assertEqual(new_sum, tab.sum()) + + def do_array_test(self, ty): + tab = np.arange(10).astype(ty) + func = getattr(external_module, "sum_of_" + ty) + print("perceived type", faiss.swig_ptr(tab)) + new_sum = func(len(tab), faiss.swig_ptr(tab)) + self.assertEqual(new_sum, tab.sum()) + + def test_sum_uint8(self): + self.do_array_test("uint8") + + def test_sum_uint16(self): + self.do_array_test("uint16") + + def test_sum_uint32(self): + self.do_array_test("uint32") + + def test_sum_uint64(self): + self.do_array_test("uint64") + + def test_sum_int8(self): + self.do_array_test("int8") + + def test_sum_int16(self): + self.do_array_test("int16") + + def test_sum_int32(self): + self.do_array_test("int32") + + def test_sum_int64(self): + self.do_array_test("int64") + + def test_sum_float32(self): + self.do_array_test("float32") + + def test_sum_float64(self): + self.do_array_test("float64")