Skip to content

Commit

Permalink
Enable LICENSELINT in FBGEMM, pt. 3 (pytorch#1763)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#1763

- Run license-lint on remaining fbgemm source files and parts of fbgemm_gpu

Reviewed By: sryap

Differential Revision: D45806184

fbshipit-source-id: 451a58baf6914bb3a2c106d30b22be71156b0b09
  • Loading branch information
q10 authored and facebook-github-bot committed May 13, 2023
1 parent 520d1ea commit b7ba5d5
Show file tree
Hide file tree
Showing 118 changed files with 226 additions and 1 deletion.
6 changes: 6 additions & 0 deletions fbgemm_gpu/cmake/Hip.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and 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.

set(FBGEMM_HAVE_HIP FALSE)

IF(NOT DEFINED ENV{ROCM_PATH})
Expand Down
1 change: 1 addition & 0 deletions fbgemm_gpu/docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and 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.

Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/bench_utils.cuh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once
#include <cuda.h>
#include <curand.h>
Expand Down
3 changes: 3 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/cpu_utils.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
// @lint-ignore-every LICENSELINT
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* Copyright (c) Intel Corporation.
* 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.
*/

#pragma once

#include <ATen/ATen.h>
Expand Down
1 change: 1 addition & 0 deletions fbgemm_gpu/include/fbgemm_gpu/cub_namespace_postfix.cuh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
1 change: 1 addition & 0 deletions fbgemm_gpu/include/fbgemm_gpu/cub_namespace_prefix.cuh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/cuda_utils.cuh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once
#include <cuda.h>
#include <cassert>
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/dispatch_macros.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#define PRIVATE_CASE_TYPE_CACHE(enum_type, type, ...) \
case enum_type: { \
using cache_t = type; \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once

#include <ATen/ATen.h>
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/embedding_common.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once
#include <ATen/ATen.h>
#include <c10/macros/Macros.h>
Expand Down
1 change: 1 addition & 0 deletions fbgemm_gpu/include/fbgemm_gpu/embedding_inplace_update.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
1 change: 1 addition & 0 deletions fbgemm_gpu/include/fbgemm_gpu/enum_utils.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/fbgemm_cuda_utils.cuh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once

#include <ATen/ATen.h>
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/fbgemm_tensor_accessor.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once

#include <c10/macros/Macros.h>
Expand Down
1 change: 1 addition & 0 deletions fbgemm_gpu/include/fbgemm_gpu/input_combine.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/layout_transform_ops.cuh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once

#include <cuda.h>
Expand Down
1 change: 1 addition & 0 deletions fbgemm_gpu/include/fbgemm_gpu/merge_pooled_embeddings.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/quantize_ops.cuh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once

namespace fbgemm_gpu {
Expand Down
1 change: 1 addition & 0 deletions fbgemm_gpu/include/fbgemm_gpu/quantize_ops_utils.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/sparse_ops.cuh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once

#ifdef __HIP_PLATFORM_HCC__
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/sparse_ops.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once

#include <ATen/ATen.h>
Expand Down
1 change: 1 addition & 0 deletions fbgemm_gpu/include/fbgemm_gpu/sparse_ops_utils.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/split_embeddings_cache_cuda.cuh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once

#include <ATen/ATen.h>
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/include/fbgemm_gpu/split_embeddings_utils.cuh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once

#include <ATen/ATen.h>
Expand Down
1 change: 1 addition & 0 deletions fbgemm_gpu/include/fbgemm_gpu/topology_utils.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
2 changes: 2 additions & 0 deletions fbgemm_gpu/test/tensor_assert_test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// @lint-ignore-every LICENSELINT
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* Copyright (c) Intel Corporation.
* 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.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/CodeCache.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once
#include <condition_variable>
#include <future>
Expand Down
2 changes: 2 additions & 0 deletions src/CodeGenHelpers.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once
#include <asmjit/asmjit.h>
#include "fbgemm/SimdUtils.h"
Expand Down
2 changes: 2 additions & 0 deletions src/DirectConv.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#pragma once
#include <asmjit/asmjit.h>
#include <cpuinfo.h>
Expand Down
2 changes: 2 additions & 0 deletions src/EmbeddingSpMDM.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#define FBGEMM_EXPORTS

#include "fbgemm/FbgemmEmbedding.h"
Expand Down
2 changes: 2 additions & 0 deletions src/EmbeddingSpMDMAvx2.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#include <cassert>
#include <cmath>
#include "RefImplementations.h"
Expand Down
2 changes: 2 additions & 0 deletions src/EmbeddingSpMDMAvx512.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#define FBGEMM_EXPORTS
#include "fbgemm/FbgemmEmbedding.h"

Expand Down
2 changes: 2 additions & 0 deletions src/EmbeddingSpMDMNBit.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/

#define FBGEMM_EXPORTS

#include "fbgemm/FbgemmEmbedding.h"
Expand Down
1 change: 1 addition & 0 deletions src/ExecuteKernel.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Meta Platforms, Inc. and 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.
*/
Expand Down
Loading

0 comments on commit b7ba5d5

Please sign in to comment.