faiss 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/LICENSE.txt +1 -1
  4. data/lib/faiss/version.rb +1 -1
  5. data/vendor/faiss/faiss/AutoTune.cpp +2 -2
  6. data/vendor/faiss/faiss/AutoTune.h +3 -3
  7. data/vendor/faiss/faiss/Clustering.cpp +37 -6
  8. data/vendor/faiss/faiss/Clustering.h +12 -3
  9. data/vendor/faiss/faiss/IVFlib.cpp +6 -3
  10. data/vendor/faiss/faiss/IVFlib.h +2 -2
  11. data/vendor/faiss/faiss/Index.cpp +6 -2
  12. data/vendor/faiss/faiss/Index.h +30 -8
  13. data/vendor/faiss/faiss/Index2Layer.cpp +2 -2
  14. data/vendor/faiss/faiss/Index2Layer.h +2 -2
  15. data/vendor/faiss/faiss/IndexAdditiveQuantizer.cpp +7 -7
  16. data/vendor/faiss/faiss/IndexAdditiveQuantizer.h +2 -2
  17. data/vendor/faiss/faiss/IndexAdditiveQuantizerFastScan.cpp +14 -16
  18. data/vendor/faiss/faiss/IndexAdditiveQuantizerFastScan.h +2 -2
  19. data/vendor/faiss/faiss/IndexBinary.cpp +13 -2
  20. data/vendor/faiss/faiss/IndexBinary.h +8 -2
  21. data/vendor/faiss/faiss/IndexBinaryFlat.cpp +2 -3
  22. data/vendor/faiss/faiss/IndexBinaryFlat.h +2 -2
  23. data/vendor/faiss/faiss/IndexBinaryFromFloat.cpp +2 -2
  24. data/vendor/faiss/faiss/IndexBinaryFromFloat.h +2 -2
  25. data/vendor/faiss/faiss/IndexBinaryHNSW.cpp +2 -7
  26. data/vendor/faiss/faiss/IndexBinaryHNSW.h +3 -3
  27. data/vendor/faiss/faiss/IndexBinaryHash.cpp +2 -3
  28. data/vendor/faiss/faiss/IndexBinaryHash.h +2 -2
  29. data/vendor/faiss/faiss/IndexBinaryIVF.cpp +3 -3
  30. data/vendor/faiss/faiss/IndexBinaryIVF.h +2 -2
  31. data/vendor/faiss/faiss/IndexFastScan.cpp +32 -18
  32. data/vendor/faiss/faiss/IndexFastScan.h +11 -2
  33. data/vendor/faiss/faiss/IndexFlat.cpp +13 -10
  34. data/vendor/faiss/faiss/IndexFlat.h +2 -2
  35. data/vendor/faiss/faiss/IndexFlatCodes.cpp +170 -7
  36. data/vendor/faiss/faiss/IndexFlatCodes.h +25 -5
  37. data/vendor/faiss/faiss/IndexHNSW.cpp +156 -96
  38. data/vendor/faiss/faiss/IndexHNSW.h +54 -5
  39. data/vendor/faiss/faiss/IndexIDMap.cpp +19 -3
  40. data/vendor/faiss/faiss/IndexIDMap.h +5 -2
  41. data/vendor/faiss/faiss/IndexIVF.cpp +5 -6
  42. data/vendor/faiss/faiss/IndexIVF.h +13 -4
  43. data/vendor/faiss/faiss/IndexIVFAdditiveQuantizer.cpp +21 -7
  44. data/vendor/faiss/faiss/IndexIVFAdditiveQuantizer.h +5 -2
  45. data/vendor/faiss/faiss/IndexIVFAdditiveQuantizerFastScan.cpp +3 -14
  46. data/vendor/faiss/faiss/IndexIVFAdditiveQuantizerFastScan.h +2 -4
  47. data/vendor/faiss/faiss/IndexIVFFastScan.cpp +201 -91
  48. data/vendor/faiss/faiss/IndexIVFFastScan.h +33 -9
  49. data/vendor/faiss/faiss/IndexIVFFlat.cpp +2 -2
  50. data/vendor/faiss/faiss/IndexIVFFlat.h +2 -2
  51. data/vendor/faiss/faiss/IndexIVFIndependentQuantizer.cpp +2 -2
  52. data/vendor/faiss/faiss/IndexIVFIndependentQuantizer.h +2 -2
  53. data/vendor/faiss/faiss/IndexIVFPQ.cpp +3 -6
  54. data/vendor/faiss/faiss/IndexIVFPQ.h +2 -2
  55. data/vendor/faiss/faiss/IndexIVFPQFastScan.cpp +7 -14
  56. data/vendor/faiss/faiss/IndexIVFPQFastScan.h +2 -4
  57. data/vendor/faiss/faiss/IndexIVFPQR.cpp +2 -2
  58. data/vendor/faiss/faiss/IndexIVFPQR.h +2 -2
  59. data/vendor/faiss/faiss/IndexIVFSpectralHash.cpp +2 -3
  60. data/vendor/faiss/faiss/IndexIVFSpectralHash.h +2 -2
  61. data/vendor/faiss/faiss/IndexLSH.cpp +2 -3
  62. data/vendor/faiss/faiss/IndexLSH.h +2 -2
  63. data/vendor/faiss/faiss/IndexLattice.cpp +3 -21
  64. data/vendor/faiss/faiss/IndexLattice.h +5 -24
  65. data/vendor/faiss/faiss/IndexNNDescent.cpp +2 -31
  66. data/vendor/faiss/faiss/IndexNNDescent.h +3 -3
  67. data/vendor/faiss/faiss/IndexNSG.cpp +2 -5
  68. data/vendor/faiss/faiss/IndexNSG.h +3 -3
  69. data/vendor/faiss/faiss/IndexNeuralNetCodec.cpp +56 -0
  70. data/vendor/faiss/faiss/IndexNeuralNetCodec.h +49 -0
  71. data/vendor/faiss/faiss/IndexPQ.cpp +26 -26
  72. data/vendor/faiss/faiss/IndexPQ.h +2 -2
  73. data/vendor/faiss/faiss/IndexPQFastScan.cpp +2 -5
  74. data/vendor/faiss/faiss/IndexPQFastScan.h +2 -11
  75. data/vendor/faiss/faiss/IndexPreTransform.cpp +2 -2
  76. data/vendor/faiss/faiss/IndexPreTransform.h +3 -3
  77. data/vendor/faiss/faiss/IndexRefine.cpp +46 -9
  78. data/vendor/faiss/faiss/IndexRefine.h +9 -2
  79. data/vendor/faiss/faiss/IndexReplicas.cpp +2 -2
  80. data/vendor/faiss/faiss/IndexReplicas.h +2 -2
  81. data/vendor/faiss/faiss/IndexRowwiseMinMax.cpp +2 -2
  82. data/vendor/faiss/faiss/IndexRowwiseMinMax.h +2 -2
  83. data/vendor/faiss/faiss/IndexScalarQuantizer.cpp +5 -4
  84. data/vendor/faiss/faiss/IndexScalarQuantizer.h +2 -2
  85. data/vendor/faiss/faiss/IndexShards.cpp +2 -2
  86. data/vendor/faiss/faiss/IndexShards.h +2 -2
  87. data/vendor/faiss/faiss/IndexShardsIVF.cpp +2 -2
  88. data/vendor/faiss/faiss/IndexShardsIVF.h +2 -2
  89. data/vendor/faiss/faiss/MatrixStats.cpp +2 -2
  90. data/vendor/faiss/faiss/MatrixStats.h +2 -2
  91. data/vendor/faiss/faiss/MetaIndexes.cpp +2 -3
  92. data/vendor/faiss/faiss/MetaIndexes.h +2 -2
  93. data/vendor/faiss/faiss/MetricType.h +9 -4
  94. data/vendor/faiss/faiss/VectorTransform.cpp +2 -2
  95. data/vendor/faiss/faiss/VectorTransform.h +2 -2
  96. data/vendor/faiss/faiss/clone_index.cpp +2 -2
  97. data/vendor/faiss/faiss/clone_index.h +2 -2
  98. data/vendor/faiss/faiss/cppcontrib/SaDecodeKernels.h +2 -2
  99. data/vendor/faiss/faiss/cppcontrib/detail/CoarseBitType.h +2 -2
  100. data/vendor/faiss/faiss/cppcontrib/detail/UintReader.h +97 -19
  101. data/vendor/faiss/faiss/cppcontrib/factory_tools.cpp +192 -0
  102. data/vendor/faiss/faiss/cppcontrib/factory_tools.h +29 -0
  103. data/vendor/faiss/faiss/cppcontrib/sa_decode/Level2-avx2-inl.h +2 -2
  104. data/vendor/faiss/faiss/cppcontrib/sa_decode/Level2-inl.h +85 -32
  105. data/vendor/faiss/faiss/cppcontrib/sa_decode/Level2-neon-inl.h +2 -2
  106. data/vendor/faiss/faiss/cppcontrib/sa_decode/MinMax-inl.h +2 -2
  107. data/vendor/faiss/faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h +2 -2
  108. data/vendor/faiss/faiss/cppcontrib/sa_decode/PQ-avx2-inl.h +2 -2
  109. data/vendor/faiss/faiss/cppcontrib/sa_decode/PQ-inl.h +2 -2
  110. data/vendor/faiss/faiss/cppcontrib/sa_decode/PQ-neon-inl.h +2 -2
  111. data/vendor/faiss/faiss/gpu/GpuAutoTune.cpp +2 -5
  112. data/vendor/faiss/faiss/gpu/GpuAutoTune.h +2 -2
  113. data/vendor/faiss/faiss/gpu/GpuCloner.cpp +45 -13
  114. data/vendor/faiss/faiss/gpu/GpuCloner.h +2 -2
  115. data/vendor/faiss/faiss/gpu/GpuClonerOptions.h +12 -6
  116. data/vendor/faiss/faiss/gpu/GpuDistance.h +11 -7
  117. data/vendor/faiss/faiss/gpu/GpuFaissAssert.h +3 -3
  118. data/vendor/faiss/faiss/gpu/GpuIcmEncoder.h +2 -2
  119. data/vendor/faiss/faiss/gpu/GpuIndex.h +10 -15
  120. data/vendor/faiss/faiss/gpu/GpuIndexBinaryFlat.h +2 -2
  121. data/vendor/faiss/faiss/gpu/GpuIndexCagra.h +285 -0
  122. data/vendor/faiss/faiss/gpu/GpuIndexFlat.h +2 -2
  123. data/vendor/faiss/faiss/gpu/GpuIndexIVF.h +8 -2
  124. data/vendor/faiss/faiss/gpu/GpuIndexIVFFlat.h +4 -2
  125. data/vendor/faiss/faiss/gpu/GpuIndexIVFPQ.h +3 -3
  126. data/vendor/faiss/faiss/gpu/GpuIndexIVFScalarQuantizer.h +2 -2
  127. data/vendor/faiss/faiss/gpu/GpuIndicesOptions.h +2 -2
  128. data/vendor/faiss/faiss/gpu/GpuResources.cpp +7 -2
  129. data/vendor/faiss/faiss/gpu/GpuResources.h +11 -4
  130. data/vendor/faiss/faiss/gpu/StandardGpuResources.cpp +66 -11
  131. data/vendor/faiss/faiss/gpu/StandardGpuResources.h +15 -5
  132. data/vendor/faiss/faiss/gpu/impl/IndexUtils.h +2 -2
  133. data/vendor/faiss/faiss/gpu/impl/InterleavedCodes.cpp +28 -23
  134. data/vendor/faiss/faiss/gpu/impl/InterleavedCodes.h +2 -2
  135. data/vendor/faiss/faiss/gpu/impl/RemapIndices.cpp +2 -2
  136. data/vendor/faiss/faiss/gpu/impl/RemapIndices.h +2 -2
  137. data/vendor/faiss/faiss/gpu/perf/IndexWrapper-inl.h +2 -2
  138. data/vendor/faiss/faiss/gpu/perf/IndexWrapper.h +2 -2
  139. data/vendor/faiss/faiss/gpu/perf/PerfClustering.cpp +8 -2
  140. data/vendor/faiss/faiss/gpu/perf/PerfIVFPQAdd.cpp +2 -3
  141. data/vendor/faiss/faiss/gpu/perf/WriteIndex.cpp +2 -2
  142. data/vendor/faiss/faiss/gpu/test/TestCodePacking.cpp +10 -7
  143. data/vendor/faiss/faiss/gpu/test/TestGpuIndexBinaryFlat.cpp +2 -2
  144. data/vendor/faiss/faiss/gpu/test/TestGpuIndexFlat.cpp +54 -54
  145. data/vendor/faiss/faiss/gpu/test/TestGpuIndexIVFFlat.cpp +144 -77
  146. data/vendor/faiss/faiss/gpu/test/TestGpuIndexIVFPQ.cpp +51 -51
  147. data/vendor/faiss/faiss/gpu/test/TestGpuIndexIVFScalarQuantizer.cpp +2 -2
  148. data/vendor/faiss/faiss/gpu/test/TestGpuMemoryException.cpp +3 -3
  149. data/vendor/faiss/faiss/gpu/test/TestGpuResidualQuantizer.cpp +70 -0
  150. data/vendor/faiss/faiss/gpu/test/TestUtils.cpp +74 -4
  151. data/vendor/faiss/faiss/gpu/test/TestUtils.h +2 -2
  152. data/vendor/faiss/faiss/gpu/test/demo_ivfpq_indexing_gpu.cpp +3 -3
  153. data/vendor/faiss/faiss/gpu/utils/{RaftUtils.h → CuvsUtils.h} +12 -11
  154. data/vendor/faiss/faiss/gpu/utils/DeviceUtils.h +8 -2
  155. data/vendor/faiss/faiss/gpu/utils/StackDeviceMemory.cpp +2 -2
  156. data/vendor/faiss/faiss/gpu/utils/StackDeviceMemory.h +2 -2
  157. data/vendor/faiss/faiss/gpu/utils/StaticUtils.h +2 -2
  158. data/vendor/faiss/faiss/gpu/utils/Timer.cpp +6 -3
  159. data/vendor/faiss/faiss/gpu/utils/Timer.h +3 -3
  160. data/vendor/faiss/faiss/impl/AdditiveQuantizer.cpp +79 -11
  161. data/vendor/faiss/faiss/impl/AdditiveQuantizer.h +17 -5
  162. data/vendor/faiss/faiss/impl/AuxIndexStructures.cpp +27 -2
  163. data/vendor/faiss/faiss/impl/AuxIndexStructures.h +11 -3
  164. data/vendor/faiss/faiss/impl/CodePacker.cpp +2 -2
  165. data/vendor/faiss/faiss/impl/CodePacker.h +2 -2
  166. data/vendor/faiss/faiss/impl/DistanceComputer.h +48 -2
  167. data/vendor/faiss/faiss/impl/FaissAssert.h +6 -4
  168. data/vendor/faiss/faiss/impl/FaissException.cpp +2 -2
  169. data/vendor/faiss/faiss/impl/FaissException.h +2 -3
  170. data/vendor/faiss/faiss/impl/HNSW.cpp +378 -205
  171. data/vendor/faiss/faiss/impl/HNSW.h +55 -24
  172. data/vendor/faiss/faiss/impl/IDSelector.cpp +2 -2
  173. data/vendor/faiss/faiss/impl/IDSelector.h +2 -2
  174. data/vendor/faiss/faiss/impl/LocalSearchQuantizer.cpp +10 -10
  175. data/vendor/faiss/faiss/impl/LocalSearchQuantizer.h +2 -2
  176. data/vendor/faiss/faiss/impl/LookupTableScaler.h +36 -2
  177. data/vendor/faiss/faiss/impl/NNDescent.cpp +15 -10
  178. data/vendor/faiss/faiss/impl/NNDescent.h +2 -2
  179. data/vendor/faiss/faiss/impl/NSG.cpp +26 -49
  180. data/vendor/faiss/faiss/impl/NSG.h +20 -8
  181. data/vendor/faiss/faiss/impl/PolysemousTraining.cpp +2 -2
  182. data/vendor/faiss/faiss/impl/PolysemousTraining.h +2 -2
  183. data/vendor/faiss/faiss/impl/ProductAdditiveQuantizer.cpp +2 -4
  184. data/vendor/faiss/faiss/impl/ProductAdditiveQuantizer.h +2 -2
  185. data/vendor/faiss/faiss/impl/ProductQuantizer-inl.h +2 -2
  186. data/vendor/faiss/faiss/impl/ProductQuantizer.cpp +3 -2
  187. data/vendor/faiss/faiss/impl/ProductQuantizer.h +7 -3
  188. data/vendor/faiss/faiss/impl/Quantizer.h +2 -2
  189. data/vendor/faiss/faiss/impl/ResidualQuantizer.cpp +2 -36
  190. data/vendor/faiss/faiss/impl/ResidualQuantizer.h +3 -13
  191. data/vendor/faiss/faiss/impl/ResultHandler.h +153 -34
  192. data/vendor/faiss/faiss/impl/ScalarQuantizer.cpp +721 -104
  193. data/vendor/faiss/faiss/impl/ScalarQuantizer.h +5 -2
  194. data/vendor/faiss/faiss/impl/ThreadedIndex-inl.h +2 -2
  195. data/vendor/faiss/faiss/impl/ThreadedIndex.h +2 -2
  196. data/vendor/faiss/faiss/impl/code_distance/code_distance-avx2.h +7 -2
  197. data/vendor/faiss/faiss/impl/code_distance/code_distance-avx512.h +248 -0
  198. data/vendor/faiss/faiss/impl/code_distance/code_distance-generic.h +2 -2
  199. data/vendor/faiss/faiss/impl/code_distance/code_distance-sve.h +440 -0
  200. data/vendor/faiss/faiss/impl/code_distance/code_distance.h +55 -2
  201. data/vendor/faiss/faiss/impl/index_read.cpp +31 -20
  202. data/vendor/faiss/faiss/impl/index_read_utils.h +37 -0
  203. data/vendor/faiss/faiss/impl/index_write.cpp +30 -16
  204. data/vendor/faiss/faiss/impl/io.cpp +15 -7
  205. data/vendor/faiss/faiss/impl/io.h +6 -6
  206. data/vendor/faiss/faiss/impl/io_macros.h +8 -9
  207. data/vendor/faiss/faiss/impl/kmeans1d.cpp +2 -3
  208. data/vendor/faiss/faiss/impl/kmeans1d.h +2 -2
  209. data/vendor/faiss/faiss/impl/lattice_Zn.cpp +2 -3
  210. data/vendor/faiss/faiss/impl/lattice_Zn.h +2 -2
  211. data/vendor/faiss/faiss/impl/platform_macros.h +34 -2
  212. data/vendor/faiss/faiss/impl/pq4_fast_scan.cpp +13 -2
  213. data/vendor/faiss/faiss/impl/pq4_fast_scan.h +20 -2
  214. data/vendor/faiss/faiss/impl/pq4_fast_scan_search_1.cpp +3 -3
  215. data/vendor/faiss/faiss/impl/pq4_fast_scan_search_qbs.cpp +450 -3
  216. data/vendor/faiss/faiss/impl/residual_quantizer_encode_steps.cpp +8 -8
  217. data/vendor/faiss/faiss/impl/residual_quantizer_encode_steps.h +3 -3
  218. data/vendor/faiss/faiss/impl/simd_result_handlers.h +151 -67
  219. data/vendor/faiss/faiss/index_factory.cpp +51 -34
  220. data/vendor/faiss/faiss/index_factory.h +2 -2
  221. data/vendor/faiss/faiss/index_io.h +14 -7
  222. data/vendor/faiss/faiss/invlists/BlockInvertedLists.cpp +30 -10
  223. data/vendor/faiss/faiss/invlists/BlockInvertedLists.h +5 -2
  224. data/vendor/faiss/faiss/invlists/DirectMap.cpp +11 -3
  225. data/vendor/faiss/faiss/invlists/DirectMap.h +2 -2
  226. data/vendor/faiss/faiss/invlists/InvertedLists.cpp +57 -19
  227. data/vendor/faiss/faiss/invlists/InvertedLists.h +20 -11
  228. data/vendor/faiss/faiss/invlists/InvertedListsIOHook.cpp +2 -2
  229. data/vendor/faiss/faiss/invlists/InvertedListsIOHook.h +2 -2
  230. data/vendor/faiss/faiss/invlists/OnDiskInvertedLists.cpp +23 -9
  231. data/vendor/faiss/faiss/invlists/OnDiskInvertedLists.h +4 -3
  232. data/vendor/faiss/faiss/python/python_callbacks.cpp +5 -5
  233. data/vendor/faiss/faiss/python/python_callbacks.h +2 -2
  234. data/vendor/faiss/faiss/utils/AlignedTable.h +5 -3
  235. data/vendor/faiss/faiss/utils/Heap.cpp +2 -2
  236. data/vendor/faiss/faiss/utils/Heap.h +107 -2
  237. data/vendor/faiss/faiss/utils/NeuralNet.cpp +346 -0
  238. data/vendor/faiss/faiss/utils/NeuralNet.h +147 -0
  239. data/vendor/faiss/faiss/utils/WorkerThread.cpp +2 -2
  240. data/vendor/faiss/faiss/utils/WorkerThread.h +2 -2
  241. data/vendor/faiss/faiss/utils/approx_topk/approx_topk.h +2 -2
  242. data/vendor/faiss/faiss/utils/approx_topk/avx2-inl.h +2 -2
  243. data/vendor/faiss/faiss/utils/approx_topk/generic.h +2 -2
  244. data/vendor/faiss/faiss/utils/approx_topk/mode.h +2 -2
  245. data/vendor/faiss/faiss/utils/approx_topk_hamming/approx_topk_hamming.h +2 -2
  246. data/vendor/faiss/faiss/utils/bf16.h +36 -0
  247. data/vendor/faiss/faiss/utils/distances.cpp +249 -90
  248. data/vendor/faiss/faiss/utils/distances.h +8 -8
  249. data/vendor/faiss/faiss/utils/distances_fused/avx512.cpp +2 -2
  250. data/vendor/faiss/faiss/utils/distances_fused/avx512.h +2 -2
  251. data/vendor/faiss/faiss/utils/distances_fused/distances_fused.cpp +2 -2
  252. data/vendor/faiss/faiss/utils/distances_fused/distances_fused.h +2 -2
  253. data/vendor/faiss/faiss/utils/distances_fused/simdlib_based.cpp +2 -2
  254. data/vendor/faiss/faiss/utils/distances_fused/simdlib_based.h +2 -2
  255. data/vendor/faiss/faiss/utils/distances_simd.cpp +1543 -56
  256. data/vendor/faiss/faiss/utils/extra_distances-inl.h +72 -2
  257. data/vendor/faiss/faiss/utils/extra_distances.cpp +87 -140
  258. data/vendor/faiss/faiss/utils/extra_distances.h +5 -4
  259. data/vendor/faiss/faiss/utils/fp16-arm.h +2 -2
  260. data/vendor/faiss/faiss/utils/fp16-fp16c.h +2 -2
  261. data/vendor/faiss/faiss/utils/fp16-inl.h +2 -2
  262. data/vendor/faiss/faiss/utils/fp16.h +2 -2
  263. data/vendor/faiss/faiss/utils/hamming-inl.h +2 -2
  264. data/vendor/faiss/faiss/utils/hamming.cpp +3 -4
  265. data/vendor/faiss/faiss/utils/hamming.h +2 -2
  266. data/vendor/faiss/faiss/utils/hamming_distance/avx2-inl.h +2 -2
  267. data/vendor/faiss/faiss/utils/hamming_distance/avx512-inl.h +490 -0
  268. data/vendor/faiss/faiss/utils/hamming_distance/common.h +2 -2
  269. data/vendor/faiss/faiss/utils/hamming_distance/generic-inl.h +6 -3
  270. data/vendor/faiss/faiss/utils/hamming_distance/hamdis-inl.h +7 -3
  271. data/vendor/faiss/faiss/utils/hamming_distance/neon-inl.h +5 -5
  272. data/vendor/faiss/faiss/utils/ordered_key_value.h +2 -2
  273. data/vendor/faiss/faiss/utils/partitioning.cpp +2 -2
  274. data/vendor/faiss/faiss/utils/partitioning.h +2 -2
  275. data/vendor/faiss/faiss/utils/prefetch.h +2 -2
  276. data/vendor/faiss/faiss/utils/quantize_lut.cpp +2 -2
  277. data/vendor/faiss/faiss/utils/quantize_lut.h +2 -2
  278. data/vendor/faiss/faiss/utils/random.cpp +45 -2
  279. data/vendor/faiss/faiss/utils/random.h +27 -2
  280. data/vendor/faiss/faiss/utils/simdlib.h +12 -3
  281. data/vendor/faiss/faiss/utils/simdlib_avx2.h +2 -2
  282. data/vendor/faiss/faiss/utils/simdlib_avx512.h +296 -0
  283. data/vendor/faiss/faiss/utils/simdlib_emulated.h +2 -2
  284. data/vendor/faiss/faiss/utils/simdlib_neon.h +7 -4
  285. data/vendor/faiss/faiss/utils/simdlib_ppc64.h +1084 -0
  286. data/vendor/faiss/faiss/utils/sorting.cpp +2 -2
  287. data/vendor/faiss/faiss/utils/sorting.h +2 -2
  288. data/vendor/faiss/faiss/utils/transpose/transpose-avx2-inl.h +2 -2
  289. data/vendor/faiss/faiss/utils/transpose/transpose-avx512-inl.h +176 -0
  290. data/vendor/faiss/faiss/utils/utils.cpp +17 -10
  291. data/vendor/faiss/faiss/utils/utils.h +7 -3
  292. metadata +22 -11
  293. data/vendor/faiss/faiss/impl/code_distance/code_distance_avx512.h +0 -102
@@ -1,5 +1,5 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -18,6 +18,8 @@
18
18
 
19
19
  #ifdef __AVX2__
20
20
  #include <immintrin.h>
21
+ #elif defined(__ARM_FEATURE_SVE)
22
+ #include <arm_sve.h>
21
23
  #endif
22
24
 
23
25
  #include <faiss/impl/AuxIndexStructures.h>
@@ -130,20 +132,17 @@ void fvec_renorm_L2(size_t d, size_t nx, float* __restrict x) {
130
132
  namespace {
131
133
 
132
134
  /* Find the nearest neighbors for nx queries in a set of ny vectors */
133
- template <class BlockResultHandler, bool use_sel = false>
135
+ template <class BlockResultHandler>
134
136
  void exhaustive_inner_product_seq(
135
137
  const float* x,
136
138
  const float* y,
137
139
  size_t d,
138
140
  size_t nx,
139
141
  size_t ny,
140
- BlockResultHandler& res,
141
- const IDSelector* sel = nullptr) {
142
+ BlockResultHandler& res) {
142
143
  using SingleResultHandler =
143
144
  typename BlockResultHandler::SingleResultHandler;
144
- int nt = std::min(int(nx), omp_get_max_threads());
145
-
146
- FAISS_ASSERT(use_sel == (sel != nullptr));
145
+ [[maybe_unused]] int nt = std::min(int(nx), omp_get_max_threads());
147
146
 
148
147
  #pragma omp parallel num_threads(nt)
149
148
  {
@@ -156,7 +155,7 @@ void exhaustive_inner_product_seq(
156
155
  resi.begin(i);
157
156
 
158
157
  for (size_t j = 0; j < ny; j++, y_j += d) {
159
- if (use_sel && !sel->is_member(j)) {
158
+ if (!res.is_in_selection(j)) {
160
159
  continue;
161
160
  }
162
161
  float ip = fvec_inner_product(x_i, y_j, d);
@@ -167,20 +166,17 @@ void exhaustive_inner_product_seq(
167
166
  }
168
167
  }
169
168
 
170
- template <class BlockResultHandler, bool use_sel = false>
169
+ template <class BlockResultHandler>
171
170
  void exhaustive_L2sqr_seq(
172
171
  const float* x,
173
172
  const float* y,
174
173
  size_t d,
175
174
  size_t nx,
176
175
  size_t ny,
177
- BlockResultHandler& res,
178
- const IDSelector* sel = nullptr) {
176
+ BlockResultHandler& res) {
179
177
  using SingleResultHandler =
180
178
  typename BlockResultHandler::SingleResultHandler;
181
- int nt = std::min(int(nx), omp_get_max_threads());
182
-
183
- FAISS_ASSERT(use_sel == (sel != nullptr));
179
+ [[maybe_unused]] int nt = std::min(int(nx), omp_get_max_threads());
184
180
 
185
181
  #pragma omp parallel num_threads(nt)
186
182
  {
@@ -191,7 +187,7 @@ void exhaustive_L2sqr_seq(
191
187
  const float* y_j = y;
192
188
  resi.begin(i);
193
189
  for (size_t j = 0; j < ny; j++, y_j += d) {
194
- if (use_sel && !sel->is_member(j)) {
190
+ if (!res.is_in_selection(j)) {
195
191
  continue;
196
192
  }
197
193
  float disij = fvec_L2sqr(x_i, y_j, d);
@@ -326,6 +322,9 @@ void exhaustive_L2sqr_blas_default_impl(
326
322
  float ip = *ip_line;
327
323
  float dis = x_norms[i] + y_norms[j] - 2 * ip;
328
324
 
325
+ if (!res.is_in_selection(j)) {
326
+ dis = HUGE_VALF;
327
+ }
329
328
  // negative values can occur for identical vectors
330
329
  // due to roundoff errors
331
330
  if (dis < 0)
@@ -560,6 +559,183 @@ void exhaustive_L2sqr_blas_cmax_avx2(
560
559
  InterruptCallback::check();
561
560
  }
562
561
  }
562
+ #elif defined(__ARM_FEATURE_SVE)
563
+ void exhaustive_L2sqr_blas_cmax_sve(
564
+ const float* x,
565
+ const float* y,
566
+ size_t d,
567
+ size_t nx,
568
+ size_t ny,
569
+ Top1BlockResultHandler<CMax<float, int64_t>>& res,
570
+ const float* y_norms) {
571
+ // BLAS does not like empty matrices
572
+ if (nx == 0 || ny == 0)
573
+ return;
574
+
575
+ /* block sizes */
576
+ const size_t bs_x = distance_compute_blas_query_bs;
577
+ const size_t bs_y = distance_compute_blas_database_bs;
578
+ // const size_t bs_x = 16, bs_y = 16;
579
+ std::unique_ptr<float[]> ip_block(new float[bs_x * bs_y]);
580
+ std::unique_ptr<float[]> x_norms(new float[nx]);
581
+ std::unique_ptr<float[]> del2;
582
+
583
+ fvec_norms_L2sqr(x_norms.get(), x, d, nx);
584
+
585
+ const size_t lanes = svcntw();
586
+
587
+ if (!y_norms) {
588
+ float* y_norms2 = new float[ny];
589
+ del2.reset(y_norms2);
590
+ fvec_norms_L2sqr(y_norms2, y, d, ny);
591
+ y_norms = y_norms2;
592
+ }
593
+
594
+ for (size_t i0 = 0; i0 < nx; i0 += bs_x) {
595
+ size_t i1 = i0 + bs_x;
596
+ if (i1 > nx)
597
+ i1 = nx;
598
+
599
+ res.begin_multiple(i0, i1);
600
+
601
+ for (size_t j0 = 0; j0 < ny; j0 += bs_y) {
602
+ size_t j1 = j0 + bs_y;
603
+ if (j1 > ny)
604
+ j1 = ny;
605
+ /* compute the actual dot products */
606
+ {
607
+ float one = 1, zero = 0;
608
+ FINTEGER nyi = j1 - j0, nxi = i1 - i0, di = d;
609
+ sgemm_("Transpose",
610
+ "Not transpose",
611
+ &nyi,
612
+ &nxi,
613
+ &di,
614
+ &one,
615
+ y + j0 * d,
616
+ &di,
617
+ x + i0 * d,
618
+ &di,
619
+ &zero,
620
+ ip_block.get(),
621
+ &nyi);
622
+ }
623
+ #pragma omp parallel for
624
+ for (int64_t i = i0; i < i1; i++) {
625
+ const size_t count = j1 - j0;
626
+ float* ip_line = ip_block.get() + (i - i0) * count;
627
+
628
+ svprfw(svwhilelt_b32_u64(0, count), ip_line, SV_PLDL1KEEP);
629
+ svprfw(svwhilelt_b32_u64(lanes, count),
630
+ ip_line + lanes,
631
+ SV_PLDL1KEEP);
632
+
633
+ // Track lanes min distances + lanes min indices.
634
+ // All the distances tracked do not take x_norms[i]
635
+ // into account in order to get rid of extra
636
+ // vaddq_f32(x_norms[i], ...) instructions
637
+ // is distance computations.
638
+ auto min_distances = svdup_n_f32(res.dis_tab[i] - x_norms[i]);
639
+
640
+ // these indices are local and are relative to j0.
641
+ // so, value 0 means j0.
642
+ auto min_indices = svdup_n_u32(0u);
643
+
644
+ auto current_indices = svindex_u32(0u, 1u);
645
+
646
+ // process lanes * 2 elements per loop
647
+ for (size_t idx_j = 0; idx_j < count;
648
+ idx_j += lanes * 2, ip_line += lanes * 2) {
649
+ svprfw(svwhilelt_b32_u64(idx_j + lanes * 2, count),
650
+ ip_line + lanes * 2,
651
+ SV_PLDL1KEEP);
652
+ svprfw(svwhilelt_b32_u64(idx_j + lanes * 3, count),
653
+ ip_line + lanes * 3,
654
+ SV_PLDL1KEEP);
655
+
656
+ // mask
657
+ const auto mask_0 = svwhilelt_b32_u64(idx_j, count);
658
+ const auto mask_1 = svwhilelt_b32_u64(idx_j + lanes, count);
659
+
660
+ // load values for norms
661
+ const auto y_norm_0 =
662
+ svld1_f32(mask_0, y_norms + idx_j + j0 + 0);
663
+ const auto y_norm_1 =
664
+ svld1_f32(mask_1, y_norms + idx_j + j0 + lanes);
665
+
666
+ // load values for dot products
667
+ const auto ip_0 = svld1_f32(mask_0, ip_line + 0);
668
+ const auto ip_1 = svld1_f32(mask_1, ip_line + lanes);
669
+
670
+ // compute dis = y_norm[j] - 2 * dot(x_norm[i], y_norm[j]).
671
+ // x_norm[i] was dropped off because it is a constant for a
672
+ // given i. We'll deal with it later.
673
+ const auto distances_0 =
674
+ svmla_n_f32_z(mask_0, y_norm_0, ip_0, -2.f);
675
+ const auto distances_1 =
676
+ svmla_n_f32_z(mask_1, y_norm_1, ip_1, -2.f);
677
+
678
+ // compare the new distances to the min distances
679
+ // for each of the first group of 4 ARM SIMD components.
680
+ auto comparison =
681
+ svcmpgt_f32(mask_0, min_distances, distances_0);
682
+
683
+ // update min distances and indices with closest vectors if
684
+ // needed.
685
+ min_distances =
686
+ svsel_f32(comparison, distances_0, min_distances);
687
+ min_indices =
688
+ svsel_u32(comparison, current_indices, min_indices);
689
+ current_indices = svadd_n_u32_x(
690
+ mask_0,
691
+ current_indices,
692
+ static_cast<uint32_t>(lanes));
693
+
694
+ // compare the new distances to the min distances
695
+ // for each of the second group of 4 ARM SIMD components.
696
+ comparison =
697
+ svcmpgt_f32(mask_1, min_distances, distances_1);
698
+
699
+ // update min distances and indices with closest vectors if
700
+ // needed.
701
+ min_distances =
702
+ svsel_f32(comparison, distances_1, min_distances);
703
+ min_indices =
704
+ svsel_u32(comparison, current_indices, min_indices);
705
+ current_indices = svadd_n_u32_x(
706
+ mask_1,
707
+ current_indices,
708
+ static_cast<uint32_t>(lanes));
709
+ }
710
+
711
+ // add missing x_norms[i]
712
+ // negative values can occur for identical vectors
713
+ // due to roundoff errors.
714
+ auto mask = svwhilelt_b32_u64(0, count);
715
+ min_distances = svadd_n_f32_z(
716
+ svcmpge_n_f32(mask, min_distances, -x_norms[i]),
717
+ min_distances,
718
+ x_norms[i]);
719
+ min_indices = svadd_n_u32_x(
720
+ mask, min_indices, static_cast<uint32_t>(j0));
721
+ mask = svcmple_n_f32(mask, min_distances, res.dis_tab[i]);
722
+ if (svcntp_b32(svptrue_b32(), mask) == 0)
723
+ res.add_result(i, res.dis_tab[i], res.ids_tab[i]);
724
+ else {
725
+ const auto min_distance = svminv_f32(mask, min_distances);
726
+ const auto min_index = svminv_u32(
727
+ svcmpeq_n_f32(mask, min_distances, min_distance),
728
+ min_indices);
729
+ res.add_result(i, min_distance, min_index);
730
+ }
731
+ }
732
+ }
733
+ // Does nothing for SingleBestResultHandler, but
734
+ // keeping the call for the consistency.
735
+ res.end_multiple();
736
+ InterruptCallback::check();
737
+ }
738
+ }
563
739
  #endif
564
740
 
565
741
  // an override if only a single closest point is needed
@@ -582,6 +758,16 @@ void exhaustive_L2sqr_blas<Top1BlockResultHandler<CMax<float, int64_t>>>(
582
758
  // run the specialized AVX2 implementation
583
759
  exhaustive_L2sqr_blas_cmax_avx2(x, y, d, nx, ny, res, y_norms);
584
760
 
761
+ #elif defined(__ARM_FEATURE_SVE)
762
+ // use a faster fused kernel if available
763
+ if (exhaustive_L2sqr_fused_cmax(x, y, d, nx, ny, res, y_norms)) {
764
+ // the kernel is available and it is complete, we're done.
765
+ return;
766
+ }
767
+
768
+ // run the specialized SVE implementation
769
+ exhaustive_L2sqr_blas_cmax_sve(x, y, d, nx, ny, res, y_norms);
770
+
585
771
  #elif defined(__aarch64__)
586
772
  // use a faster fused kernel if available
587
773
  if (exhaustive_L2sqr_fused_cmax(x, y, d, nx, ny, res, y_norms)) {
@@ -601,44 +787,40 @@ void exhaustive_L2sqr_blas<Top1BlockResultHandler<CMax<float, int64_t>>>(
601
787
  #endif
602
788
  }
603
789
 
604
- template <class BlockResultHandler>
605
- void knn_L2sqr_select(
606
- const float* x,
607
- const float* y,
608
- size_t d,
609
- size_t nx,
610
- size_t ny,
611
- BlockResultHandler& res,
612
- const float* y_norm2,
613
- const IDSelector* sel) {
614
- if (sel) {
615
- exhaustive_L2sqr_seq<BlockResultHandler, true>(
616
- x, y, d, nx, ny, res, sel);
617
- } else if (nx < distance_compute_blas_threshold) {
618
- exhaustive_L2sqr_seq(x, y, d, nx, ny, res);
619
- } else {
620
- exhaustive_L2sqr_blas(x, y, d, nx, ny, res, y_norm2);
790
+ struct Run_search_inner_product {
791
+ using T = void;
792
+ template <class BlockResultHandler>
793
+ void f(BlockResultHandler& res,
794
+ const float* x,
795
+ const float* y,
796
+ size_t d,
797
+ size_t nx,
798
+ size_t ny) {
799
+ if (res.sel || nx < distance_compute_blas_threshold) {
800
+ exhaustive_inner_product_seq(x, y, d, nx, ny, res);
801
+ } else {
802
+ exhaustive_inner_product_blas(x, y, d, nx, ny, res);
803
+ }
621
804
  }
622
- }
623
-
624
- template <class BlockResultHandler>
625
- void knn_inner_product_select(
626
- const float* x,
627
- const float* y,
628
- size_t d,
629
- size_t nx,
630
- size_t ny,
631
- BlockResultHandler& res,
632
- const IDSelector* sel) {
633
- if (sel) {
634
- exhaustive_inner_product_seq<BlockResultHandler, true>(
635
- x, y, d, nx, ny, res, sel);
636
- } else if (nx < distance_compute_blas_threshold) {
637
- exhaustive_inner_product_seq(x, y, d, nx, ny, res);
638
- } else {
639
- exhaustive_inner_product_blas(x, y, d, nx, ny, res);
805
+ };
806
+
807
+ struct Run_search_L2sqr {
808
+ using T = void;
809
+ template <class BlockResultHandler>
810
+ void f(BlockResultHandler& res,
811
+ const float* x,
812
+ const float* y,
813
+ size_t d,
814
+ size_t nx,
815
+ size_t ny,
816
+ const float* y_norm2) {
817
+ if (res.sel || nx < distance_compute_blas_threshold) {
818
+ exhaustive_L2sqr_seq(x, y, d, nx, ny, res);
819
+ } else {
820
+ exhaustive_L2sqr_blas(x, y, d, nx, ny, res, y_norm2);
821
+ }
640
822
  }
641
- }
823
+ };
642
824
 
643
825
  } // anonymous namespace
644
826
 
@@ -675,16 +857,9 @@ void knn_inner_product(
675
857
  return;
676
858
  }
677
859
 
678
- if (k == 1) {
679
- Top1BlockResultHandler<CMin<float, int64_t>> res(nx, vals, ids);
680
- knn_inner_product_select(x, y, d, nx, ny, res, sel);
681
- } else if (k < distance_compute_min_k_reservoir) {
682
- HeapBlockResultHandler<CMin<float, int64_t>> res(nx, vals, ids, k);
683
- knn_inner_product_select(x, y, d, nx, ny, res, sel);
684
- } else {
685
- ReservoirBlockResultHandler<CMin<float, int64_t>> res(nx, vals, ids, k);
686
- knn_inner_product_select(x, y, d, nx, ny, res, sel);
687
- }
860
+ Run_search_inner_product r;
861
+ dispatch_knn_ResultHandler(
862
+ nx, vals, ids, k, METRIC_INNER_PRODUCT, sel, r, x, y, d, nx, ny);
688
863
 
689
864
  if (imin != 0) {
690
865
  for (size_t i = 0; i < nx * k; i++) {
@@ -730,16 +905,11 @@ void knn_L2sqr(
730
905
  knn_L2sqr_by_idx(x, y, sela->ids, d, nx, ny, sela->n, k, vals, ids, 0);
731
906
  return;
732
907
  }
733
- if (k == 1) {
734
- Top1BlockResultHandler<CMax<float, int64_t>> res(nx, vals, ids);
735
- knn_L2sqr_select(x, y, d, nx, ny, res, y_norm2, sel);
736
- } else if (k < distance_compute_min_k_reservoir) {
737
- HeapBlockResultHandler<CMax<float, int64_t>> res(nx, vals, ids, k);
738
- knn_L2sqr_select(x, y, d, nx, ny, res, y_norm2, sel);
739
- } else {
740
- ReservoirBlockResultHandler<CMax<float, int64_t>> res(nx, vals, ids, k);
741
- knn_L2sqr_select(x, y, d, nx, ny, res, y_norm2, sel);
742
- }
908
+
909
+ Run_search_L2sqr r;
910
+ dispatch_knn_ResultHandler(
911
+ nx, vals, ids, k, METRIC_L2, sel, r, x, y, d, nx, ny, y_norm2);
912
+
743
913
  if (imin != 0) {
744
914
  for (size_t i = 0; i < nx * k; i++) {
745
915
  if (ids[i] >= 0) {
@@ -766,6 +936,7 @@ void knn_L2sqr(
766
936
  * Range search
767
937
  ***************************************************************************/
768
938
 
939
+ // TODO accept a y_norm2 as well
769
940
  void range_search_L2sqr(
770
941
  const float* x,
771
942
  const float* y,
@@ -775,15 +946,9 @@ void range_search_L2sqr(
775
946
  float radius,
776
947
  RangeSearchResult* res,
777
948
  const IDSelector* sel) {
778
- using RH = RangeSearchBlockResultHandler<CMax<float, int64_t>>;
779
- RH resh(res, radius);
780
- if (sel) {
781
- exhaustive_L2sqr_seq<RH, true>(x, y, d, nx, ny, resh, sel);
782
- } else if (nx < distance_compute_blas_threshold) {
783
- exhaustive_L2sqr_seq(x, y, d, nx, ny, resh, sel);
784
- } else {
785
- exhaustive_L2sqr_blas(x, y, d, nx, ny, resh);
786
- }
949
+ Run_search_L2sqr r;
950
+ dispatch_range_ResultHandler(
951
+ res, radius, METRIC_L2, sel, r, x, y, d, nx, ny, nullptr);
787
952
  }
788
953
 
789
954
  void range_search_inner_product(
@@ -795,15 +960,9 @@ void range_search_inner_product(
795
960
  float radius,
796
961
  RangeSearchResult* res,
797
962
  const IDSelector* sel) {
798
- using RH = RangeSearchBlockResultHandler<CMin<float, int64_t>>;
799
- RH resh(res, radius);
800
- if (sel) {
801
- exhaustive_inner_product_seq<RH, true>(x, y, d, nx, ny, resh, sel);
802
- } else if (nx < distance_compute_blas_threshold) {
803
- exhaustive_inner_product_seq(x, y, d, nx, ny, resh);
804
- } else {
805
- exhaustive_inner_product_blas(x, y, d, nx, ny, resh);
806
- }
963
+ Run_search_inner_product r;
964
+ dispatch_range_ResultHandler(
965
+ res, radius, METRIC_INNER_PRODUCT, sel, r, x, y, d, nx, ny);
807
966
  }
808
967
 
809
968
  /***************************************************************************
@@ -1,5 +1,5 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -285,7 +285,7 @@ FAISS_API extern int distance_compute_blas_database_bs;
285
285
  // rather than a heap
286
286
  FAISS_API extern int distance_compute_min_k_reservoir;
287
287
 
288
- /** Return the k nearest neighors of each of the nx vectors x among the ny
288
+ /** Return the k nearest neighbors of each of the nx vectors x among the ny
289
289
  * vector y, w.r.t to max inner product.
290
290
  *
291
291
  * @param x query vectors, size nx * d
@@ -301,7 +301,7 @@ void knn_inner_product(
301
301
  float_minheap_array_t* res,
302
302
  const IDSelector* sel = nullptr);
303
303
 
304
- /** Return the k nearest neighors of each of the nx vectors x among the ny
304
+ /** Return the k nearest neighbors of each of the nx vectors x among the ny
305
305
  * vector y, for the inner product metric.
306
306
  *
307
307
  * @param x query vectors, size nx * d
@@ -320,7 +320,7 @@ void knn_inner_product(
320
320
  int64_t* indexes,
321
321
  const IDSelector* sel = nullptr);
322
322
 
323
- /** Return the k nearest neighors of each of the nx vectors x among the ny
323
+ /** Return the k nearest neighbors of each of the nx vectors x among the ny
324
324
  * vector y, for the L2 distance
325
325
  * @param x query vectors, size nx * d
326
326
  * @param y database vectors, size ny * d
@@ -338,7 +338,7 @@ void knn_L2sqr(
338
338
  const float* y_norm2 = nullptr,
339
339
  const IDSelector* sel = nullptr);
340
340
 
341
- /** Return the k nearest neighors of each of the nx vectors x among the ny
341
+ /** Return the k nearest neighbors of each of the nx vectors x among the ny
342
342
  * vector y, for the L2 distance
343
343
  *
344
344
  * @param x query vectors, size nx * d
@@ -413,7 +413,7 @@ void knn_L2sqr_by_idx(
413
413
  /// Forward declaration, see AuxIndexStructures.h
414
414
  struct RangeSearchResult;
415
415
 
416
- /** Return the k nearest neighors of each of the nx vectors x among the ny
416
+ /** Return the k nearest neighbors of each of the nx vectors x among the ny
417
417
  * vector y, w.r.t to max inner product
418
418
  *
419
419
  * @param x query vectors, size nx * d
@@ -469,7 +469,7 @@ void compute_PQ_dis_tables_dsub2(
469
469
  * @param n size of the tables
470
470
  * @param a size n
471
471
  * @param b size n
472
- * @param c restult table, size n
472
+ * @param c result table, size n
473
473
  */
474
474
  void fvec_madd(size_t n, const float* a, float bf, const float* b, float* c);
475
475
 
@@ -1,5 +1,5 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.