From 868e17f29493075742170885f1f57c7b9e61d9ea Mon Sep 17 00:00:00 2001 From: Alexandr Guzhva Date: Tue, 7 Feb 2023 14:32:56 -0800 Subject: [PATCH] OSS legal requirements (#2698) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2698 Add headers about copyright. Reviewed By: algoriddle Differential Revision: D43085637 fbshipit-source-id: 5a57876b7047097ffe01cd79322674625d9bca34 --- benchs/bench_cppcontrib_sa_decode.cpp | 7 +++++++ benchs/bench_pq_transposed_centroid_table.py | 7 +++++++ demos/demo_residual_quantizer.cpp | 7 ++++++- faiss/IndexRowwiseMinMax.cpp | 7 +++++++ faiss/IndexRowwiseMinMax.h | 7 +++++++ faiss/cppcontrib/SaDecodeKernels.h | 7 ++++++- faiss/cppcontrib/detail/CoarseBitType.h | 7 +++++++ faiss/cppcontrib/detail/UintReader.h | 7 +++++++ faiss/cppcontrib/sa_decode/Level2-avx2-inl.h | 8 +++++++- faiss/cppcontrib/sa_decode/Level2-inl.h | 8 +++++++- faiss/cppcontrib/sa_decode/Level2-neon-inl.h | 8 +++++++- faiss/cppcontrib/sa_decode/MinMax-inl.h | 7 +++++++ faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h | 7 +++++++ faiss/cppcontrib/sa_decode/PQ-avx2-inl.h | 7 ++++++- faiss/cppcontrib/sa_decode/PQ-inl.h | 8 +++++++- faiss/cppcontrib/sa_decode/PQ-neon-inl.h | 8 +++++++- faiss/impl/Quantizer.h | 7 ++++++- faiss/utils/approx_topk/approx_topk.h | 7 +++++++ faiss/utils/approx_topk/avx2-inl.h | 7 +++++++ faiss/utils/approx_topk/generic.h | 7 +++++++ faiss/utils/distances_fused/distances_fused.cpp | 7 +++++++ faiss/utils/fp16-fp16c.h | 7 +++++++ faiss/utils/fp16-inl.h | 7 +++++++ faiss/utils/fp16.h | 7 +++++++ tests/test_approx_topk.cpp | 7 +++++++ tests/test_clone.py | 2 +- tests/test_cppcontrib_sa_decode.cpp | 7 ++++++- tests/test_cppcontrib_uintreader.cpp | 7 +++++++ tests/test_merge_index.py | 5 +++++ tests/test_simdlib.cpp | 7 +++++++ 30 files changed, 197 insertions(+), 11 deletions(-) diff --git a/benchs/bench_cppcontrib_sa_decode.cpp b/benchs/bench_cppcontrib_sa_decode.cpp index 2ff605cdab..c5c6b0bf18 100644 --- a/benchs/bench_cppcontrib_sa_decode.cpp +++ b/benchs/bench_cppcontrib_sa_decode.cpp @@ -1,3 +1,10 @@ +/** + * 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 diff --git a/benchs/bench_pq_transposed_centroid_table.py b/benchs/bench_pq_transposed_centroid_table.py index bb75b92c30..7aed6bffb7 100644 --- a/benchs/bench_pq_transposed_centroid_table.py +++ b/benchs/bench_pq_transposed_centroid_table.py @@ -1,3 +1,10 @@ +#!/usr/bin/env python3 + +# 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. + import faiss import time import random diff --git a/demos/demo_residual_quantizer.cpp b/demos/demo_residual_quantizer.cpp index 6166fc1084..6a0fe4e7fb 100644 --- a/demos/demo_residual_quantizer.cpp +++ b/demos/demo_residual_quantizer.cpp @@ -1,4 +1,9 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/** + * 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 diff --git a/faiss/IndexRowwiseMinMax.cpp b/faiss/IndexRowwiseMinMax.cpp index a82063c0e4..045bc3061a 100644 --- a/faiss/IndexRowwiseMinMax.cpp +++ b/faiss/IndexRowwiseMinMax.cpp @@ -1,3 +1,10 @@ +/** + * 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 diff --git a/faiss/IndexRowwiseMinMax.h b/faiss/IndexRowwiseMinMax.h index 020ae9f6bd..5e16da4b42 100644 --- a/faiss/IndexRowwiseMinMax.h +++ b/faiss/IndexRowwiseMinMax.h @@ -1,3 +1,10 @@ +/** + * 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 #include diff --git a/faiss/cppcontrib/SaDecodeKernels.h b/faiss/cppcontrib/SaDecodeKernels.h index 3c73af7b48..1652e66ff0 100644 --- a/faiss/cppcontrib/SaDecodeKernels.h +++ b/faiss/cppcontrib/SaDecodeKernels.h @@ -1,4 +1,9 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/** + * 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 diff --git a/faiss/cppcontrib/detail/CoarseBitType.h b/faiss/cppcontrib/detail/CoarseBitType.h index 44e4bcf5f1..7b438fedae 100644 --- a/faiss/cppcontrib/detail/CoarseBitType.h +++ b/faiss/cppcontrib/detail/CoarseBitType.h @@ -1,3 +1,10 @@ +/** + * 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 #include diff --git a/faiss/cppcontrib/detail/UintReader.h b/faiss/cppcontrib/detail/UintReader.h index b3c0cae7cb..51fbe1f1f2 100644 --- a/faiss/cppcontrib/detail/UintReader.h +++ b/faiss/cppcontrib/detail/UintReader.h @@ -1,3 +1,10 @@ +/** + * 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 #include diff --git a/faiss/cppcontrib/sa_decode/Level2-avx2-inl.h b/faiss/cppcontrib/sa_decode/Level2-avx2-inl.h index 97d3a13b53..f4671779d0 100644 --- a/faiss/cppcontrib/sa_decode/Level2-avx2-inl.h +++ b/faiss/cppcontrib/sa_decode/Level2-avx2-inl.h @@ -1,4 +1,10 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/** + * 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. + */ + #ifndef LEVEL2_AVX2_INL_H #define LEVEL2_AVX2_INL_H diff --git a/faiss/cppcontrib/sa_decode/Level2-inl.h b/faiss/cppcontrib/sa_decode/Level2-inl.h index 8f0e7e6bef..36355af001 100644 --- a/faiss/cppcontrib/sa_decode/Level2-inl.h +++ b/faiss/cppcontrib/sa_decode/Level2-inl.h @@ -1,4 +1,10 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/** + * 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. + */ + #ifndef LEVEL2_INL_H #define LEVEL2_INL_H diff --git a/faiss/cppcontrib/sa_decode/Level2-neon-inl.h b/faiss/cppcontrib/sa_decode/Level2-neon-inl.h index 54c39916af..e5f41c7dc9 100644 --- a/faiss/cppcontrib/sa_decode/Level2-neon-inl.h +++ b/faiss/cppcontrib/sa_decode/Level2-neon-inl.h @@ -1,4 +1,10 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/** + * 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. + */ + #ifndef LEVEL2_NEON_INL_H #define LEVEL2_NEON_INL_H diff --git a/faiss/cppcontrib/sa_decode/MinMax-inl.h b/faiss/cppcontrib/sa_decode/MinMax-inl.h index ea8abcccf4..a310bebfce 100644 --- a/faiss/cppcontrib/sa_decode/MinMax-inl.h +++ b/faiss/cppcontrib/sa_decode/MinMax-inl.h @@ -1,3 +1,10 @@ +/** + * 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 #include diff --git a/faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h b/faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h index b61b79c57f..b7375fb9c4 100644 --- a/faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h +++ b/faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h @@ -1,3 +1,10 @@ +/** + * 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 #include diff --git a/faiss/cppcontrib/sa_decode/PQ-avx2-inl.h b/faiss/cppcontrib/sa_decode/PQ-avx2-inl.h index 2779ad4c44..e1abec8a67 100644 --- a/faiss/cppcontrib/sa_decode/PQ-avx2-inl.h +++ b/faiss/cppcontrib/sa_decode/PQ-avx2-inl.h @@ -1,4 +1,9 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/** + * 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. + */ #ifndef PQ_AVX2_INL_H #define PQ_AVX2_INL_H diff --git a/faiss/cppcontrib/sa_decode/PQ-inl.h b/faiss/cppcontrib/sa_decode/PQ-inl.h index 290ca1ef21..de6622de49 100644 --- a/faiss/cppcontrib/sa_decode/PQ-inl.h +++ b/faiss/cppcontrib/sa_decode/PQ-inl.h @@ -1,4 +1,10 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/** + * 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. + */ + #ifndef PQ_INL_H #define PQ_INL_H diff --git a/faiss/cppcontrib/sa_decode/PQ-neon-inl.h b/faiss/cppcontrib/sa_decode/PQ-neon-inl.h index 13ce3ac1e3..69d3b9a201 100644 --- a/faiss/cppcontrib/sa_decode/PQ-neon-inl.h +++ b/faiss/cppcontrib/sa_decode/PQ-neon-inl.h @@ -1,4 +1,10 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/** + * 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. + */ + #ifndef PQ_NEON_INL_H #define PQ_NEON_INL_H diff --git a/faiss/impl/Quantizer.h b/faiss/impl/Quantizer.h index 9ee86c00a6..34673211d7 100644 --- a/faiss/impl/Quantizer.h +++ b/faiss/impl/Quantizer.h @@ -1,4 +1,9 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/** + * 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 diff --git a/faiss/utils/approx_topk/approx_topk.h b/faiss/utils/approx_topk/approx_topk.h index 1417263f1a..8ce3517607 100644 --- a/faiss/utils/approx_topk/approx_topk.h +++ b/faiss/utils/approx_topk/approx_topk.h @@ -1,3 +1,10 @@ +/** + * 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 file contains an implementation of approximate top-k search // using heap. It was initially created for a beam search. // diff --git a/faiss/utils/approx_topk/avx2-inl.h b/faiss/utils/approx_topk/avx2-inl.h index 6542bdcf38..09bae6965b 100644 --- a/faiss/utils/approx_topk/avx2-inl.h +++ b/faiss/utils/approx_topk/avx2-inl.h @@ -1,3 +1,10 @@ +/** + * 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 #include diff --git a/faiss/utils/approx_topk/generic.h b/faiss/utils/approx_topk/generic.h index c0bfbbdeed..59a8dc8dcf 100644 --- a/faiss/utils/approx_topk/generic.h +++ b/faiss/utils/approx_topk/generic.h @@ -1,3 +1,10 @@ +/** + * 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 #include diff --git a/faiss/utils/distances_fused/distances_fused.cpp b/faiss/utils/distances_fused/distances_fused.cpp index a676e17144..650e24810d 100644 --- a/faiss/utils/distances_fused/distances_fused.cpp +++ b/faiss/utils/distances_fused/distances_fused.cpp @@ -1,3 +1,10 @@ +/** + * 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 diff --git a/faiss/utils/fp16-fp16c.h b/faiss/utils/fp16-fp16c.h index 165150ae4d..571d52752f 100644 --- a/faiss/utils/fp16-fp16c.h +++ b/faiss/utils/fp16-fp16c.h @@ -1,3 +1,10 @@ +/** + * 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 #include diff --git a/faiss/utils/fp16-inl.h b/faiss/utils/fp16-inl.h index 397d4c894d..c07d36f5e3 100644 --- a/faiss/utils/fp16-inl.h +++ b/faiss/utils/fp16-inl.h @@ -1,3 +1,10 @@ +/** + * 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 #include diff --git a/faiss/utils/fp16.h b/faiss/utils/fp16.h index c7b28731fc..90691d8ffe 100644 --- a/faiss/utils/fp16.h +++ b/faiss/utils/fp16.h @@ -1,3 +1,10 @@ +/** + * 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 #include diff --git a/tests/test_approx_topk.cpp b/tests/test_approx_topk.cpp index 079aae20cf..a617232278 100644 --- a/tests/test_approx_topk.cpp +++ b/tests/test_approx_topk.cpp @@ -1,3 +1,10 @@ +/** + * 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 diff --git a/tests/test_clone.py b/tests/test_clone.py index 80220e97f1..1cc98668bc 100644 --- a/tests/test_clone.py +++ b/tests/test_clone.py @@ -1,4 +1,4 @@ -# (c) Meta Platforms, Inc. and affiliates. +# 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. diff --git a/tests/test_cppcontrib_sa_decode.cpp b/tests/test_cppcontrib_sa_decode.cpp index e35706e073..49be5c552a 100644 --- a/tests/test_cppcontrib_sa_decode.cpp +++ b/tests/test_cppcontrib_sa_decode.cpp @@ -1,4 +1,9 @@ -// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +/** + * 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 diff --git a/tests/test_cppcontrib_uintreader.cpp b/tests/test_cppcontrib_uintreader.cpp index 3a5e558009..6001824d16 100644 --- a/tests/test_cppcontrib_uintreader.cpp +++ b/tests/test_cppcontrib_uintreader.cpp @@ -1,3 +1,10 @@ +/** + * 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 test was designed to be run using valgrind or ASAN to test the // correctness of memory accesses. diff --git a/tests/test_merge_index.py b/tests/test_merge_index.py index d4cb1d9970..8c4c1f0912 100644 --- a/tests/test_merge_index.py +++ b/tests/test_merge_index.py @@ -1,3 +1,8 @@ +# 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. + import unittest import faiss import numpy as np diff --git a/tests/test_simdlib.cpp b/tests/test_simdlib.cpp index 3ba8caccd2..170a2ae6d5 100644 --- a/tests/test_simdlib.cpp +++ b/tests/test_simdlib.cpp @@ -1,3 +1,10 @@ +/** + * 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