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

Commit f25b92e

Browse files
authored
[CI] Add Simple GitHub-Action Based License Checker (#20617)
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
1 parent ab22211 commit f25b92e

File tree

12 files changed

+137
-78
lines changed

12 files changed

+137
-78
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: license check
2+
3+
on: [push, pull_request]
4+
5+
defaults:
6+
run:
7+
shell: bash
8+
9+
jobs:
10+
licensecheck:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
18+
- name: Update Submodules
19+
run: |
20+
git submodule update --init --recursive
21+
22+
- name: Check License Header
23+
uses: apache/skywalking-eyes@main
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.licenserc.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
header:
2+
license:
3+
spdx-id: Apache-2.0
4+
copyright-owner: Apache Software Foundation
5+
6+
paths-ignore:
7+
- 'dist'
8+
- 'licenses'
9+
- '**/*.md'
10+
- '**/*.ipynb'
11+
- 'LICENSE'
12+
- 'NOTICE'
13+
- '3rdparty'
14+
- '.gitignore'
15+
- '.codecov.yml'
16+
- '.gitattributes'
17+
- '.github'
18+
- '.gitmodules'
19+
- '.licenserc.yaml'
20+
- '.asf.yaml'
21+
- 'CODEOWNERS'
22+
- 'DISCLAIMER'
23+
- 'KEYS'
24+
- 'python/mxnet/_cy3/README'
25+
- 'tools/dependencies/LICENSE.binary.dependencies'
26+
# files not distributed in source archive (listed in tools/source-exclude-artifacts.txt)
27+
- 'docs'
28+
# files licensed under apache-2.0 license but do not include full license headers recognized by skywalking-eyes
29+
- 'python/mxnet/cython/ndarray.pyx'
30+
- 'python/mxnet/cython/symbol.pyx'
31+
- 'src/operator/deformable_convolution-inl.h'
32+
- 'src/operator/deformable_convolution.cc'
33+
- 'src/operator/deformable_convolution.cu'
34+
- 'src/operator/contrib/deformable_psroi_pooling-inl.h'
35+
- 'src/operator/contrib/deformable_psroi_pooling.cc'
36+
- 'src/operator/contrib/deformable_psroi_pooling.cu'
37+
- 'src/operator/contrib/multi_proposal-inl.h'
38+
- 'src/operator/contrib/multi_proposal.cc'
39+
- 'src/operator/contrib/multi_proposal.cu'
40+
- 'src/operator/contrib/psroi_pooling.cc'
41+
- 'src/operator/contrib/psroi_pooling.cu'
42+
- 'src/operator/nn/mkldnn/mkldnn_base-inl.h'
43+
# files licensed under boost license
44+
- 'cmake/Modules/FindJeMalloc.cmake'
45+
# files licensed under bsd 3-clause
46+
- 'cmake/upstream/FindBLAS.cmake'
47+
- 'cmake/upstream/FindCUDAToolkit.cmake'
48+
- 'cmake/upstream/select_compute_arch.cmake'
49+
- 'src/operator/contrib/erfinv-inl.h'
50+
- 'src/operator/numpy/np_einsum_op-inl.h'
51+
- 'src/operator/numpy/np_einsum_op.cc'
52+
- 'src/operator/numpy/np_einsum_path_op-inl.h'
53+
# files licensed under caffe/mit license
54+
- 'src/operator/modulated_deformable_convolution-inl.h'
55+
- 'src/operator/modulated_deformable_convolution.cc'
56+
- 'src/operator/modulated_deformable_convolution.cu'
57+
- 'src/operator/contrib/nn/deformable_im2col.cuh'
58+
- 'src/operator/contrib/nn/deformable_im2col.h'
59+
- 'src/operator/contrib/nn/modulated_deformable_im2col.cuh'
60+
- 'src/operator/contrib/nn/modulated_deformable_im2col.h'
61+
- 'src/operator/nn/im2col.cuh'
62+
- 'src/operator/nn/im2col.h'
63+
- 'src/operator/nn/pool.cuh'
64+
- 'src/operator/nn/pool.h'
65+
# symlinks
66+
- 'include/dlpack' # symlink to 3rdparty/dlpack/include/dlpack
67+
- 'include/dmlc' # symlink to 3rdparty/dmlc-core/include/dmlc
68+
- 'include/mshadow' # symlink to 3rdparty/mshadow/mshadow
69+
- 'include/onednn' # symlinks to 3rdparty/onednn
70+
# test/build data
71+
- 'tests/python/mkl/data/test_mkldnn_test_mkldnn_model_model1.json'
72+
73+
74+
comment: on-failure

LICENSE

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -220,21 +220,39 @@
220220

221221
3rdparty/ctc_include
222222
3rdparty/dlpack
223+
include/dlpack (header symlinks to 3rdparty/dlpack/include/dlpack)
223224
3rdparty/dmlc-core
225+
include/dmlc (header symlinks to 3rdparty/dmlc-core/include/dmlc)
224226
3rdparty/mshadow
227+
include/mshadow (header symlinks to 3rdparty/mshadow/mshadow)
225228
3rdparty/tvm
226229
3rdparty/tvm/3rdparty/dmlc-core
227230
3rdparty/tvm/3rdparty/dlpack
231+
include/nnvm (header symlinks to 3rdparty/tvm/nnvm/include/nnvm)
228232
3rdparty/ps-lite
229233
3rdparty/onednn
234+
include/onednn (header symlinks to 3rdparty/onednn)
230235
3rdparty/googletest/googlemock/scripts/generator
231236
3rdparty/onnx-tensorrt/third_party/onnx/third_party/benchmark
237+
3rdparty/onnx-tensorrt/third_party/onnx/tools/protoc-gen-mypy.py
232238
3rdparty/onednn/tests/benchdnn (Copy of the License available at top of current file)
233239
src/operator/special_functions-inl.h Cephes Library Functions (Copy of the License available at top of current file)
234240
3rdparty/onednn/doc/assets/mathjax (Copy of the License available at top of current file)
235241
docs/python_docs/themes/mx-theme/mxtheme/static/material-design-icons-3.0.1 (Copy of the License available at top of current file)
236242
docs/python_docs/themes/mx-theme/mxtheme/static/font/Roboto (Copy of the License available at top of current file)
237243
3rdparty/tvm/3rdparty/bfloat16/bfloat16.cc (Copy of the License available at top of current file)
244+
src/operator/deformable_convolution-inl.h
245+
src/operator/deformable_convolution.cc
246+
src/operator/deformable_convolution.cu
247+
src/operator/contrib/deformable_psroi_pooling-inl.h
248+
src/operator/contrib/deformable_psroi_pooling.cc
249+
src/operator/contrib/deformable_psroi_pooling.cu
250+
src/operator/contrib/multi_proposal-inl.h
251+
src/operator/contrib/multi_proposal.cc
252+
src/operator/contrib/multi_proposal.cu
253+
src/operator/contrib/psroi_pooling.cc
254+
src/operator/contrib/psroi_pooling.cu
255+
src/operator/nn/mkldnn/mkldnn_base-inl.h
238256

239257
=======================================================================================
240258
MIT license
@@ -270,8 +288,12 @@
270288
3rdparty/googletest/googlemock
271289
3rdparty/googletest/googletest
272290
cmake/upstream/FindCUDAToolkit.cmake
291+
cmake/upstream/FindBLAS.cmake
273292
cmake/upstream/select_compute_arch.cmake
274293
src/operator/contrib/erfinv-inl.h
294+
src/operator/numpy/np_einsum_op-inl.h
295+
src/operator/numpy/np_einsum_path_op-inl.h
296+
src/operator/numpy/np_einsum_op.cc
275297

276298
=======================================================================================
277299
2-clause BSD license
@@ -314,35 +336,22 @@
314336
python/mxnet/onnx/mx2onnx/_export_onnx.py
315337
python/mxnet/onnx/mx2onnx/_op_translations/_op_translations_opset12.py
316338
python/mxnet/onnx/mx2onnx/_op_translations/_op_translations_opset13.py
317-
src/operator/numpy/np_einsum_op-inl.h
318-
src/operator/numpy/np_einsum_path_op-inl.h
319-
src/operator/numpy/np_einsum_op.cc
320339

321340
=======================================================================================
322341
Apache-2.0 license + MIT License
323342
=======================================================================================
324343

325344
src/serialization/cnpy.h (Copy of the AL2 License available at the top of this file, MIT License available at licenses/MIT)
326345
src/serialization/cnpy.cc (Copy of the AL2 License available at the top of this file, MIT License available at licenses/MIT)
327-
3rdparty/onnx-tensorrt/third_party/onnx/tools/protoc-gen-mypy.py (Copy of the referenced AL2 License available at top of current file)
328346
src/operator/nn/layer_norm.cc (function LayerNormCPUKernel is adapated from MIT-licensed code)
329-
(Source repository for below deformable conv operators - https://github.com/msracver/Deformable-ConvNets/tree/master/DCNv2_op)
330-
src/operator/deformable_convolution-inl.h
331-
src/operator/deformable_convolution.cc
332-
src/operator/deformable_convolution.cu
333-
334-
=======================================================================================
335-
Apache-2.0 license + Boost Software License, Version 1.0
336-
=======================================================================================
337-
338-
cmake/Modules/FindJeMalloc.cmake
339347

340348
=======================================================================================
341349
Boost Software License, Version 1.0
342350
=======================================================================================
343351

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

347356
=======================================================================================
348357
LLVM Release License

rat-excludes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ clipboard.js
5353
# Licenses
5454
licenses/*
5555
LICENSE.binary.dependencies
56+
.licenserc.yaml
5657

5758
# Generated files during build
5859
.buildinfo
@@ -123,6 +124,9 @@ FindCUDAToolkit.cmake
123124
FindBLAS.cmake
124125
FindJeMalloc.cmake
125126
select_compute_arch.cmake
127+
np_einsum_op-inl.h
128+
np_einsum_op.cc
129+
np_einsum_path_op-inl.h
126130

127131
# Incorporated third-party source files from Microsoft that carry Apache 2.0 license, captured in licenses/
128132
deformable_psroi_pooling.cu

src/operator/contrib/krprod.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* regarding copyright ownership. The ASF licenses this file
66
* to you under the Apache License, Version 2.0 (the
77
* "License"); you may not use this file except in compliance
8-
n * with the License. You may obtain a copy of the License at
8+
* with the License. You may obtain a copy of the License at
99
*
1010
* http://www.apache.org/licenses/LICENSE-2.0
1111
*

src/operator/numpy/np_einsum_op-inl.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
/*
2-
* Licensed to the Apache Software Foundation (ASF) under one
3-
* or more contributor license agreements. See the NOTICE file
4-
* distributed with this work for additional information
5-
* regarding copyright ownership. The ASF licenses this file
6-
* to you under the Apache License, Version 2.0 (the
7-
* "License"); you may not use this file except in compliance
8-
* with the License. You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
18-
*/
19-
201
/*
212
* Copyright (c) 2005-2019, NumPy Developers.
223
*

src/operator/numpy/np_einsum_op.cc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
/*
2-
* Licensed to the Apache Software Foundation (ASF) under one
3-
* or more contributor license agreements. See the NOTICE file
4-
* distributed with this work for additional information
5-
* regarding copyright ownership. The ASF licenses this file
6-
* to you under the Apache License, Version 2.0 (the
7-
* "License"); you may not use this file except in compliance
8-
* with the License. You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
18-
*/
19-
201
/*
212
* Copyright (c) 2005-2019, NumPy Developers.
223
* All rights reserved.

src/operator/numpy/np_einsum_path_op-inl.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
/*
2-
* Licensed to the Apache Software Foundation (ASF) under one
3-
* or more contributor license agreements. See the NOTICE file
4-
* distributed with this work for additional information
5-
* regarding copyright ownership. The ASF licenses this file
6-
* to you under the Apache License, Version 2.0 (the
7-
* "License"); you may not use this file except in compliance
8-
* with the License. You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
18-
*/
19-
201
/*
212
* Copyright (c) 2005-2019, NumPy Developers.
223
* All rights reserved.

src/operator/subgraph/tensorrt/nnvm_to_onnx-inl.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#ifndef MXNET_OPERATOR_SUBGRAPH_TENSORRT_NNVM_TO_ONNX_INL_H_
2-
#define MXNET_OPERATOR_SUBGRAPH_TENSORRT_NNVM_TO_ONNX_INL_H_
31
/*
42
* Licensed to the Apache Software Foundation (ASF) under one
53
* or more contributor license agreements. See the NOTICE file
@@ -25,6 +23,9 @@
2523
* \author Marek Kolodziej, Clement Fuji Tsang
2624
*/
2725

26+
#ifndef MXNET_OPERATOR_SUBGRAPH_TENSORRT_NNVM_TO_ONNX_INL_H_
27+
#define MXNET_OPERATOR_SUBGRAPH_TENSORRT_NNVM_TO_ONNX_INL_H_
28+
2829
#if MXNET_USE_TENSORRT
2930

3031
#include <mxnet/operator.h>

src/operator/subgraph/tensorrt/onnx_to_tensorrt.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#ifndef MXNET_OPERATOR_SUBGRAPH_TENSORRT_ONNX_TO_TENSORRT_H_
2-
#define MXNET_OPERATOR_SUBGRAPH_TENSORRT_ONNX_TO_TENSORRT_H_
31
/*
42
* Licensed to the Apache Software Foundation (ASF) under one
53
* or more contributor license agreements. See the NOTICE file
@@ -25,6 +23,9 @@
2523
* \author Marek Kolodziej, Clement Fuji Tsang
2624
*/
2725

26+
#ifndef MXNET_OPERATOR_SUBGRAPH_TENSORRT_ONNX_TO_TENSORRT_H_
27+
#define MXNET_OPERATOR_SUBGRAPH_TENSORRT_ONNX_TO_TENSORRT_H_
28+
2829
#if MXNET_USE_TENSORRT
2930

3031
#include <onnx-tensorrt/NvOnnxParser.h>

0 commit comments

Comments
 (0)