Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
[CI] Add Simple GitHub-Action Based License Checker (#20617)
Browse files Browse the repository at this point in the history
Remove ASF license headers on 3rdparty files based on discussion:

> It depends on what you mean by significant, usually changes made to 3rd party files stay under the original license. See [1] on this, note that "Do not add the standard Apache License header to the top of third-party source files.”. If the license was to change, and the headers replaced then that needs to be noted in NOTICE. Please make sure that the license is noted in LICENSE.

https://lists.apache.org/thread.html/r4010c53f976819c94f3450469db8b936f7c15cb046a61f0d488674d3%40%3Cgeneral.incubator.apache.org%3E
  • Loading branch information
barry-jin committed Sep 29, 2021
1 parent ab22211 commit f25b92e
Show file tree
Hide file tree
Showing 12 changed files with 137 additions and 78 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/license_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: license check

on: [push, pull_request]

defaults:
run:
shell: bash

jobs:
licensecheck:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Update Submodules
run: |
git submodule update --init --recursive
- name: Check License Header
uses: apache/skywalking-eyes@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74 changes: 74 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: Apache Software Foundation

paths-ignore:
- 'dist'
- 'licenses'
- '**/*.md'
- '**/*.ipynb'
- 'LICENSE'
- 'NOTICE'
- '3rdparty'
- '.gitignore'
- '.codecov.yml'
- '.gitattributes'
- '.github'
- '.gitmodules'
- '.licenserc.yaml'
- '.asf.yaml'
- 'CODEOWNERS'
- 'DISCLAIMER'
- 'KEYS'
- 'python/mxnet/_cy3/README'
- 'tools/dependencies/LICENSE.binary.dependencies'
# files not distributed in source archive (listed in tools/source-exclude-artifacts.txt)
- 'docs'
# files licensed under apache-2.0 license but do not include full license headers recognized by skywalking-eyes
- 'python/mxnet/cython/ndarray.pyx'
- 'python/mxnet/cython/symbol.pyx'
- 'src/operator/deformable_convolution-inl.h'
- 'src/operator/deformable_convolution.cc'
- 'src/operator/deformable_convolution.cu'
- 'src/operator/contrib/deformable_psroi_pooling-inl.h'
- 'src/operator/contrib/deformable_psroi_pooling.cc'
- 'src/operator/contrib/deformable_psroi_pooling.cu'
- 'src/operator/contrib/multi_proposal-inl.h'
- 'src/operator/contrib/multi_proposal.cc'
- 'src/operator/contrib/multi_proposal.cu'
- 'src/operator/contrib/psroi_pooling.cc'
- 'src/operator/contrib/psroi_pooling.cu'
- 'src/operator/nn/mkldnn/mkldnn_base-inl.h'
# files licensed under boost license
- 'cmake/Modules/FindJeMalloc.cmake'
# files licensed under bsd 3-clause
- 'cmake/upstream/FindBLAS.cmake'
- 'cmake/upstream/FindCUDAToolkit.cmake'
- 'cmake/upstream/select_compute_arch.cmake'
- 'src/operator/contrib/erfinv-inl.h'
- 'src/operator/numpy/np_einsum_op-inl.h'
- 'src/operator/numpy/np_einsum_op.cc'
- 'src/operator/numpy/np_einsum_path_op-inl.h'
# files licensed under caffe/mit license
- 'src/operator/modulated_deformable_convolution-inl.h'
- 'src/operator/modulated_deformable_convolution.cc'
- 'src/operator/modulated_deformable_convolution.cu'
- 'src/operator/contrib/nn/deformable_im2col.cuh'
- 'src/operator/contrib/nn/deformable_im2col.h'
- 'src/operator/contrib/nn/modulated_deformable_im2col.cuh'
- 'src/operator/contrib/nn/modulated_deformable_im2col.h'
- 'src/operator/nn/im2col.cuh'
- 'src/operator/nn/im2col.h'
- 'src/operator/nn/pool.cuh'
- 'src/operator/nn/pool.h'
# symlinks
- 'include/dlpack' # symlink to 3rdparty/dlpack/include/dlpack
- 'include/dmlc' # symlink to 3rdparty/dmlc-core/include/dmlc
- 'include/mshadow' # symlink to 3rdparty/mshadow/mshadow
- 'include/onednn' # symlinks to 3rdparty/onednn
# test/build data
- 'tests/python/mkl/data/test_mkldnn_test_mkldnn_model_model1.json'


comment: on-failure
37 changes: 23 additions & 14 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -220,21 +220,39 @@

3rdparty/ctc_include
3rdparty/dlpack
include/dlpack (header symlinks to 3rdparty/dlpack/include/dlpack)
3rdparty/dmlc-core
include/dmlc (header symlinks to 3rdparty/dmlc-core/include/dmlc)
3rdparty/mshadow
include/mshadow (header symlinks to 3rdparty/mshadow/mshadow)
3rdparty/tvm
3rdparty/tvm/3rdparty/dmlc-core
3rdparty/tvm/3rdparty/dlpack
include/nnvm (header symlinks to 3rdparty/tvm/nnvm/include/nnvm)
3rdparty/ps-lite
3rdparty/onednn
include/onednn (header symlinks to 3rdparty/onednn)
3rdparty/googletest/googlemock/scripts/generator
3rdparty/onnx-tensorrt/third_party/onnx/third_party/benchmark
3rdparty/onnx-tensorrt/third_party/onnx/tools/protoc-gen-mypy.py
3rdparty/onednn/tests/benchdnn (Copy of the License available at top of current file)
src/operator/special_functions-inl.h Cephes Library Functions (Copy of the License available at top of current file)
3rdparty/onednn/doc/assets/mathjax (Copy of the License available at top of current file)
docs/python_docs/themes/mx-theme/mxtheme/static/material-design-icons-3.0.1 (Copy of the License available at top of current file)
docs/python_docs/themes/mx-theme/mxtheme/static/font/Roboto (Copy of the License available at top of current file)
3rdparty/tvm/3rdparty/bfloat16/bfloat16.cc (Copy of the License available at top of current file)
src/operator/deformable_convolution-inl.h
src/operator/deformable_convolution.cc
src/operator/deformable_convolution.cu
src/operator/contrib/deformable_psroi_pooling-inl.h
src/operator/contrib/deformable_psroi_pooling.cc
src/operator/contrib/deformable_psroi_pooling.cu
src/operator/contrib/multi_proposal-inl.h
src/operator/contrib/multi_proposal.cc
src/operator/contrib/multi_proposal.cu
src/operator/contrib/psroi_pooling.cc
src/operator/contrib/psroi_pooling.cu
src/operator/nn/mkldnn/mkldnn_base-inl.h

=======================================================================================
MIT license
Expand Down Expand Up @@ -270,8 +288,12 @@
3rdparty/googletest/googlemock
3rdparty/googletest/googletest
cmake/upstream/FindCUDAToolkit.cmake
cmake/upstream/FindBLAS.cmake
cmake/upstream/select_compute_arch.cmake
src/operator/contrib/erfinv-inl.h
src/operator/numpy/np_einsum_op-inl.h
src/operator/numpy/np_einsum_path_op-inl.h
src/operator/numpy/np_einsum_op.cc

=======================================================================================
2-clause BSD license
Expand Down Expand Up @@ -314,35 +336,22 @@
python/mxnet/onnx/mx2onnx/_export_onnx.py
python/mxnet/onnx/mx2onnx/_op_translations/_op_translations_opset12.py
python/mxnet/onnx/mx2onnx/_op_translations/_op_translations_opset13.py
src/operator/numpy/np_einsum_op-inl.h
src/operator/numpy/np_einsum_path_op-inl.h
src/operator/numpy/np_einsum_op.cc

=======================================================================================
Apache-2.0 license + MIT License
=======================================================================================

src/serialization/cnpy.h (Copy of the AL2 License available at the top of this file, MIT License available at licenses/MIT)
src/serialization/cnpy.cc (Copy of the AL2 License available at the top of this file, MIT License available at licenses/MIT)
3rdparty/onnx-tensorrt/third_party/onnx/tools/protoc-gen-mypy.py (Copy of the referenced AL2 License available at top of current file)
src/operator/nn/layer_norm.cc (function LayerNormCPUKernel is adapated from MIT-licensed code)
(Source repository for below deformable conv operators - https://github.com/msracver/Deformable-ConvNets/tree/master/DCNv2_op)
src/operator/deformable_convolution-inl.h
src/operator/deformable_convolution.cc
src/operator/deformable_convolution.cu

=======================================================================================
Apache-2.0 license + Boost Software License, Version 1.0
=======================================================================================

cmake/Modules/FindJeMalloc.cmake

=======================================================================================
Boost Software License, Version 1.0
=======================================================================================

3rdparty/intgemm/test/3rd_party/catch.hpp (Copy of the License available at licenses/BOOST1_0)
3rdparty/onednn/src/common/primitive_hashing.hpp
cmake/Modules/FindJeMalloc.cmake

=======================================================================================
LLVM Release License
Expand Down
4 changes: 4 additions & 0 deletions rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ clipboard.js
# Licenses
licenses/*
LICENSE.binary.dependencies
.licenserc.yaml

# Generated files during build
.buildinfo
Expand Down Expand Up @@ -123,6 +124,9 @@ FindCUDAToolkit.cmake
FindBLAS.cmake
FindJeMalloc.cmake
select_compute_arch.cmake
np_einsum_op-inl.h
np_einsum_op.cc
np_einsum_path_op-inl.h

# Incorporated third-party source files from Microsoft that carry Apache 2.0 license, captured in licenses/
deformable_psroi_pooling.cu
Expand Down
2 changes: 1 addition & 1 deletion src/operator/contrib/krprod.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
n * with the License. You may obtain a copy of the License at
* with the License. You may obtain a copy of the License at
*
* http:https://www.apache.org/licenses/LICENSE-2.0
*
Expand Down
19 changes: 0 additions & 19 deletions src/operator/numpy/np_einsum_op-inl.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http:https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/*
* Copyright (c) 2005-2019, NumPy Developers.
*
Expand Down
19 changes: 0 additions & 19 deletions src/operator/numpy/np_einsum_op.cc
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http:https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/*
* Copyright (c) 2005-2019, NumPy Developers.
* All rights reserved.
Expand Down
19 changes: 0 additions & 19 deletions src/operator/numpy/np_einsum_path_op-inl.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http:https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/*
* Copyright (c) 2005-2019, NumPy Developers.
* All rights reserved.
Expand Down
5 changes: 3 additions & 2 deletions src/operator/subgraph/tensorrt/nnvm_to_onnx-inl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#ifndef MXNET_OPERATOR_SUBGRAPH_TENSORRT_NNVM_TO_ONNX_INL_H_
#define MXNET_OPERATOR_SUBGRAPH_TENSORRT_NNVM_TO_ONNX_INL_H_
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -25,6 +23,9 @@
* \author Marek Kolodziej, Clement Fuji Tsang
*/

#ifndef MXNET_OPERATOR_SUBGRAPH_TENSORRT_NNVM_TO_ONNX_INL_H_
#define MXNET_OPERATOR_SUBGRAPH_TENSORRT_NNVM_TO_ONNX_INL_H_

#if MXNET_USE_TENSORRT

#include <mxnet/operator.h>
Expand Down
5 changes: 3 additions & 2 deletions src/operator/subgraph/tensorrt/onnx_to_tensorrt.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#ifndef MXNET_OPERATOR_SUBGRAPH_TENSORRT_ONNX_TO_TENSORRT_H_
#define MXNET_OPERATOR_SUBGRAPH_TENSORRT_ONNX_TO_TENSORRT_H_
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -25,6 +23,9 @@
* \author Marek Kolodziej, Clement Fuji Tsang
*/

#ifndef MXNET_OPERATOR_SUBGRAPH_TENSORRT_ONNX_TO_TENSORRT_H_
#define MXNET_OPERATOR_SUBGRAPH_TENSORRT_ONNX_TO_TENSORRT_H_

#if MXNET_USE_TENSORRT

#include <onnx-tensorrt/NvOnnxParser.h>
Expand Down
5 changes: 3 additions & 2 deletions src/operator/subgraph/tensorrt/tensorrt-inl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#ifndef MXNET_OPERATOR_SUBGRAPH_TENSORRT_TENSORRT_INL_H_
#define MXNET_OPERATOR_SUBGRAPH_TENSORRT_TENSORRT_INL_H_
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -25,6 +23,9 @@
* \author Marek Kolodziej, Clement Fuji Tsang
*/

#ifndef MXNET_OPERATOR_SUBGRAPH_TENSORRT_TENSORRT_INL_H_
#define MXNET_OPERATOR_SUBGRAPH_TENSORRT_TENSORRT_INL_H_

#if MXNET_USE_TENSORRT

#include <onnx-tensorrt/NvOnnxParser.h>
Expand Down
1 change: 1 addition & 0 deletions tests/python/gpu/test_numpy_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

import sys
import numpy as onp
Expand Down

0 comments on commit f25b92e

Please sign in to comment.