Repository: alibaba/BladeDISC (language: python)

Issue:
Add pre-commit tool in CI 
Add a [pre-commit](https://pre-commit.com/) to check the code before `git commit`.



Discussion / hints:

Fix patch:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 59d306d8964..dd8d0d9f16d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -22,6 +22,10 @@ jobs:
     # Runs a single command using the runners shell
     - name: Checkout
       uses: actions/checkout@v2.4.0
+    - name: pre-commit
+      shell: bash
+      run: |
+        pre-commit run -a --show-diff-on-failure
     - name: Build Dev Docker
       shell: bash
       run: |
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 00000000000..c7262f4fe95
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,8 @@
+repos:
+- repo: local
+  hooks:
+  - id: copyright_checker
+    name: copyright_checker
+    entry: python ./scripts/pre-commit/copyright.py
+    language: system
+    files: \.(cc|cpp|h|py|sh)$
\ No newline at end of file
diff --git a/docker/scripts/install-bazel.sh b/docker/scripts/install-bazel.sh
index 2e8aaa60e15..bb4410e5383 100644
--- a/docker/scripts/install-bazel.sh
+++ b/docker/scripts/install-bazel.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 set -ex
 apt-get install -y apt-transport-https curl gnupg
 curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
diff --git a/docker/scripts/install-cmake.sh b/docker/scripts/install-cmake.sh
index 5e058326b08..b3e64f2e840 100644
--- a/docker/scripts/install-cmake.sh
+++ b/docker/scripts/install-cmake.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 set -ex
 wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-linux-x86_64.sh \
   -q -O /tmp/cmake-install.sh && \
diff --git a/docker/scripts/install-python.sh b/docker/scripts/install-python.sh
index 813c569b4ed..5b60211268a 100644
--- a/docker/scripts/install-python.sh
+++ b/docker/scripts/install-python.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 set -ex
 python3 -m pip install virtualenv numpy
 DISC_VENV=/opt/venv_disc
diff --git a/mhlo_builder/mlir/mhlo/builder/activation.cpp b/mhlo_builder/mlir/mhlo/builder/activation.cpp
index e31ef1f7fa5..df5fedf3566 100644
--- a/mhlo_builder/mlir/mhlo/builder/activation.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/activation.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/activation.h"
 
 #include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/activation.h b/mhlo_builder/mlir/mhlo/builder/activation.h
index 23bda24852b..3d8bc569de5 100644
--- a/mhlo_builder/mlir/mhlo/builder/activation.h
+++ b/mhlo_builder/mlir/mhlo/builder/activation.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/mlir_type_utils.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/algebra_statistics.cpp b/mhlo_builder/mlir/mhlo/builder/algebra_statistics.cpp
index 5d24de18c3c..5b4dc50eaac 100644
--- a/mhlo_builder/mlir/mhlo/builder/algebra_statistics.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/algebra_statistics.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/algebra_statistics.h"
 
 #include <mlir/mhlo/builder/broadcast.h>
diff --git a/mhlo_builder/mlir/mhlo/builder/algebra_statistics.h b/mhlo_builder/mlir/mhlo/builder/algebra_statistics.h
index bcccdeaa920..1e62caf1691 100644
--- a/mhlo_builder/mlir/mhlo/builder/algebra_statistics.h
+++ b/mhlo_builder/mlir/mhlo/builder/algebra_statistics.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/mlir_type_utils.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/batch_norm.cpp b/mhlo_builder/mlir/mhlo/builder/batch_norm.cpp
index 13353eceef5..9cc87b9935d 100644
--- a/mhlo_builder/mlir/mhlo/builder/batch_norm.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/batch_norm.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/batch_norm.h"
 
 #include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/batch_norm.h b/mhlo_builder/mlir/mhlo/builder/batch_norm.h
index 864027038b3..e8ead12eba8 100644
--- a/mhlo_builder/mlir/mhlo/builder/batch_norm.h
+++ b/mhlo_builder/mlir/mhlo/builder/batch_norm.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/mlir_type_utils.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/broadcast.cpp b/mhlo_builder/mlir/mhlo/builder/broadcast.cpp
index 63bdd5a461e..40337fe2f36 100644
--- a/mhlo_builder/mlir/mhlo/builder/broadcast.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/broadcast.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/broadcast.h"
 
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/broadcast.h b/mhlo_builder/mlir/mhlo/builder/broadcast.h
index feee935c804..193cf1f4b45 100644
--- a/mhlo_builder/mlir/mhlo/builder/broadcast.h
+++ b/mhlo_builder/mlir/mhlo/builder/broadcast.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/mlir_type_utils.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/constant.cpp b/mhlo_builder/mlir/mhlo/builder/constant.cpp
index 94a0ad4f0a5..7ef272c39bf 100644
--- a/mhlo_builder/mlir/mhlo/builder/constant.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/constant.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/constant.h"
 
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/constant.h b/mhlo_builder/mlir/mhlo/builder/constant.h
index 093a31e508a..7f847360fa8 100644
--- a/mhlo_builder/mlir/mhlo/builder/constant.h
+++ b/mhlo_builder/mlir/mhlo/builder/constant.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/convolution.cpp b/mhlo_builder/mlir/mhlo/builder/convolution.cpp
index 0b8ae6199f0..5f5448a4b8f 100644
--- a/mhlo_builder/mlir/mhlo/builder/convolution.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/convolution.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/convolution.h"
 
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/convolution.h b/mhlo_builder/mlir/mhlo/builder/convolution.h
index c0eba7cfdeb..aa65402ab72 100644
--- a/mhlo_builder/mlir/mhlo/builder/convolution.h
+++ b/mhlo_builder/mlir/mhlo/builder/convolution.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/mlir_type_utils.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/element_wise_binary.h b/mhlo_builder/mlir/mhlo/builder/element_wise_binary.h
index b532afc8612..dd7d1e8dfd7 100644
--- a/mhlo_builder/mlir/mhlo/builder/element_wise_binary.h
+++ b/mhlo_builder/mlir/mhlo/builder/element_wise_binary.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include <mlir/mhlo/builder/broadcast.h>
 #include <mlir/mhlo/builder/mlir_attr_utils.h>
diff --git a/mhlo_builder/mlir/mhlo/builder/gather.cpp b/mhlo_builder/mlir/mhlo/builder/gather.cpp
index 66cc3278f11..c85567919ac 100644
--- a/mhlo_builder/mlir/mhlo/builder/gather.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/gather.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/gather.h"
 
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/gather.h b/mhlo_builder/mlir/mhlo/builder/gather.h
index 46443c99a21..fca3cb2c98d 100644
--- a/mhlo_builder/mlir/mhlo/builder/gather.h
+++ b/mhlo_builder/mlir/mhlo/builder/gather.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 
 #include "mlir/mhlo/builder/mlir_type_utils.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/gru_cell.cpp b/mhlo_builder/mlir/mhlo/builder/gru_cell.cpp
index a10ec9fe3d0..5015eb5651c 100644
--- a/mhlo_builder/mlir/mhlo/builder/gru_cell.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/gru_cell.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/gru_cell.h"
 
 #include "mlir/mhlo/builder/activation.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/gru_cell.h b/mhlo_builder/mlir/mhlo/builder/gru_cell.h
index 96c2f63ac8d..ad15c9af401 100644
--- a/mhlo_builder/mlir/mhlo/builder/gru_cell.h
+++ b/mhlo_builder/mlir/mhlo/builder/gru_cell.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/mlir_type_utils.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/macros.h b/mhlo_builder/mlir/mhlo/builder/macros.h
index 2de5c4d5fdf..9158a593ca0 100644
--- a/mhlo_builder/mlir/mhlo/builder/macros.h
+++ b/mhlo_builder/mlir/mhlo/builder/macros.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include <sstream>
 #include <stdexcept>
diff --git a/mhlo_builder/mlir/mhlo/builder/matmul.cpp b/mhlo_builder/mlir/mhlo/builder/matmul.cpp
index 4d5a71f1963..bfc5ccc04e0 100644
--- a/mhlo_builder/mlir/mhlo/builder/matmul.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/matmul.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/matmul.h"
 
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/matmul.h b/mhlo_builder/mlir/mhlo/builder/matmul.h
index 3ee81920240..a2da349669c 100644
--- a/mhlo_builder/mlir/mhlo/builder/matmul.h
+++ b/mhlo_builder/mlir/mhlo/builder/matmul.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/mlir_type_utils.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/mlir_attr_utils.cpp b/mhlo_builder/mlir/mhlo/builder/mlir_attr_utils.cpp
index 3b97a6c6bad..0be056f3be3 100644
--- a/mhlo_builder/mlir/mhlo/builder/mlir_attr_utils.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/mlir_attr_utils.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/mlir_attr_utils.h"
 
 namespace mlir {
diff --git a/mhlo_builder/mlir/mhlo/builder/mlir_attr_utils.h b/mhlo_builder/mlir/mhlo/builder/mlir_attr_utils.h
index 8faea410d2b..b06d047ff62 100644
--- a/mhlo_builder/mlir/mhlo/builder/mlir_attr_utils.h
+++ b/mhlo_builder/mlir/mhlo/builder/mlir_attr_utils.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/macros.h"
 #include "mlir/mhlo/builder/mlir_type_utils.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/mlir_shape_builder.cpp b/mhlo_builder/mlir/mhlo/builder/mlir_shape_builder.cpp
index 593d56d1861..10cfe3f0b21 100644
--- a/mhlo_builder/mlir/mhlo/builder/mlir_shape_builder.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/mlir_shape_builder.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include "mlir/mhlo/builder/mlir_shape_builder.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/mlir_shape_builder.h b/mhlo_builder/mlir/mhlo/builder/mlir_shape_builder.h
index 07dd668b541..19a6756b080 100644
--- a/mhlo_builder/mlir/mhlo/builder/mlir_shape_builder.h
+++ b/mhlo_builder/mlir/mhlo/builder/mlir_shape_builder.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 
 #include "mlir/mhlo/builder/mlir_type_utils.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/mlir_type_utils.cpp b/mhlo_builder/mlir/mhlo/builder/mlir_type_utils.cpp
index 1ce968b67d2..42219a31cd1 100644
--- a/mhlo_builder/mlir/mhlo/builder/mlir_type_utils.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/mlir_type_utils.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include "mlir/mhlo/builder/mlir_type_utils.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/mlir_type_utils.h b/mhlo_builder/mlir/mhlo/builder/mlir_type_utils.h
index b6477a4800c..9f438896901 100644
--- a/mhlo_builder/mlir/mhlo/builder/mlir_type_utils.h
+++ b/mhlo_builder/mlir/mhlo/builder/mlir_type_utils.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 
 #include <llvm/ADT/SmallVector.h>
diff --git a/mhlo_builder/mlir/mhlo/builder/mlir_utils.cpp b/mhlo_builder/mlir/mhlo/builder/mlir_utils.cpp
index 1f359a4b2b7..eac98a64e54 100644
--- a/mhlo_builder/mlir/mhlo/builder/mlir_utils.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/mlir_utils.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/mlir_utils.h"
 
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/mlir_utils.h b/mhlo_builder/mlir/mhlo/builder/mlir_utils.h
index 261c0b59e72..a0d0a97bbcd 100644
--- a/mhlo_builder/mlir/mhlo/builder/mlir_utils.h
+++ b/mhlo_builder/mlir/mhlo/builder/mlir_utils.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/macros.h"
 #include "mlir/mhlo/builder/mlir_type_utils.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/reduction.cpp b/mhlo_builder/mlir/mhlo/builder/reduction.cpp
index f2ad52da52a..654b3f4e438 100644
--- a/mhlo_builder/mlir/mhlo/builder/reduction.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/reduction.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/reduction.h"
 
 #include "mlir/mhlo/builder/element_wise_binary.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/reduction.h b/mhlo_builder/mlir/mhlo/builder/reduction.h
index 039f2913377..a77fc9f37c1 100644
--- a/mhlo_builder/mlir/mhlo/builder/reduction.h
+++ b/mhlo_builder/mlir/mhlo/builder/reduction.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
 #include "mlir/mhlo/builder/mlir_attr_utils.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/slice.cpp b/mhlo_builder/mlir/mhlo/builder/slice.cpp
index 14a1a8122a9..bceea516a83 100644
--- a/mhlo_builder/mlir/mhlo/builder/slice.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/slice.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
 #include "mlir/Dialect/StandardOps/IR/Ops.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/slice.h b/mhlo_builder/mlir/mhlo/builder/slice.h
index 1bec5e25a79..23c629b5697 100644
--- a/mhlo_builder/mlir/mhlo/builder/slice.h
+++ b/mhlo_builder/mlir/mhlo/builder/slice.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/mlir_type_utils.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/softmax.cpp b/mhlo_builder/mlir/mhlo/builder/softmax.cpp
index 19c45358746..6ea2b235c65 100644
--- a/mhlo_builder/mlir/mhlo/builder/softmax.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/softmax.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/mhlo/builder/softmax.h"
 
 #include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h"
diff --git a/mhlo_builder/mlir/mhlo/builder/softmax.h b/mhlo_builder/mlir/mhlo/builder/softmax.h
index 1c83d2b7800..59d52e676c7 100644
--- a/mhlo_builder/mlir/mhlo/builder/softmax.h
+++ b/mhlo_builder/mlir/mhlo/builder/softmax.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/mlir_type_utils.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/standard.cpp b/mhlo_builder/mlir/mhlo/builder/standard.cpp
index a360c3a8080..fc9a83cdd43 100644
--- a/mhlo_builder/mlir/mhlo/builder/standard.cpp
+++ b/mhlo_builder/mlir/mhlo/builder/standard.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include "mlir/mhlo/builder/standard.h"
 
diff --git a/mhlo_builder/mlir/mhlo/builder/standard.h b/mhlo_builder/mlir/mhlo/builder/standard.h
index c244aa42c3d..0a217515a67 100644
--- a/mhlo_builder/mlir/mhlo/builder/standard.h
+++ b/mhlo_builder/mlir/mhlo/builder/standard.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "mlir/mhlo/builder/mlir_type_utils.h"
 
diff --git a/pytorch_blade/ci_build/build_aicompiler.sh b/pytorch_blade/ci_build/build_aicompiler.sh
index c16ea824cf0..9b6a7949491 100755
--- a/pytorch_blade/ci_build/build_aicompiler.sh
+++ b/pytorch_blade/ci_build/build_aicompiler.sh
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 set -ex
 function help {
     echo "Usage: $0 --py_ver PYTHON_VERSION [--ral_cxx11_abi] [--cpu_only] [--dcu]"
diff --git a/pytorch_blade/ci_build/build_pytorch_blade.sh b/pytorch_blade/ci_build/build_pytorch_blade.sh
index 955a0286a44..4f61523b5d3 100755
--- a/pytorch_blade/ci_build/build_pytorch_blade.sh
+++ b/pytorch_blade/ci_build/build_pytorch_blade.sh
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 # !/bin/bash
 set -o pipefail
 set -e
diff --git a/pytorch_blade/cmake_build.py b/pytorch_blade/cmake_build.py
index 223459a9944..2c22eba35bc 100644
--- a/pytorch_blade/cmake_build.py
+++ b/pytorch_blade/cmake_build.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import argparse
 import os
 import sys
diff --git a/pytorch_blade/release_version.py b/pytorch_blade/release_version.py
index c57bfd58fc8..48e782e2d24 100644
--- a/pytorch_blade/release_version.py
+++ b/pytorch_blade/release_version.py
@@ -1,1 +1,12 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 __version__ = '0.0.0'
diff --git a/pytorch_blade/setup.py b/pytorch_blade/setup.py
index 49f66a717aa..8c50da7fce7 100644
--- a/pytorch_blade/setup.py
+++ b/pytorch_blade/setup.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 # Welcome to the PyTorch blade setup.py
 #
 # Environment variables that is optional:
diff --git a/pytorch_blade/src/common_utils/logging.h b/pytorch_blade/src/common_utils/logging.h
index d251e5e3a0e..6d932026f33 100644
--- a/pytorch_blade/src/common_utils/logging.h
+++ b/pytorch_blade/src/common_utils/logging.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef __COMMON_LOGGING_H__
 #define __COMMON_LOGGING_H__
 
diff --git a/pytorch_blade/src/common_utils/macros.h b/pytorch_blade/src/common_utils/macros.h
index 1015138e71a..b4ddf0c1f8d 100644
--- a/pytorch_blade/src/common_utils/macros.h
+++ b/pytorch_blade/src/common_utils/macros.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef __COMMON_MACROS_H__
 #define __COMMON_MACROS_H__
 
diff --git a/pytorch_blade/src/common_utils/tempfs.cpp b/pytorch_blade/src/common_utils/tempfs.cpp
index eb7ee7efa1d..e796cec1980 100644
--- a/pytorch_blade/src/common_utils/tempfs.cpp
+++ b/pytorch_blade/src/common_utils/tempfs.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "common_utils/tempfs.h"
 
 #include <iostream>
diff --git a/pytorch_blade/src/common_utils/tempfs.h b/pytorch_blade/src/common_utils/tempfs.h
index 002badb6f57..32f1bc29859 100644
--- a/pytorch_blade/src/common_utils/tempfs.h
+++ b/pytorch_blade/src/common_utils/tempfs.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef __COMPILER_MLIR_RUNTIME_TEMPFS_H__
 #define __COMPILER_MLIR_RUNTIME_TEMPFS_H__
 
diff --git a/pytorch_blade/src/common_utils/utils.cpp b/pytorch_blade/src/common_utils/utils.cpp
index 9e99842625f..eaa74bf0506 100644
--- a/pytorch_blade/src/common_utils/utils.cpp
+++ b/pytorch_blade/src/common_utils/utils.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "common_utils/utils.h"
 
 namespace torch {
diff --git a/pytorch_blade/src/common_utils/utils.h b/pytorch_blade/src/common_utils/utils.h
index 0242d56df3d..678d9a31362 100644
--- a/pytorch_blade/src/common_utils/utils.h
+++ b/pytorch_blade/src/common_utils/utils.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 
 #include <string>
diff --git a/pytorch_blade/src/compiler/jit/fusion.cpp b/pytorch_blade/src/compiler/jit/fusion.cpp
index 0b2bf7fa62c..2284c347b5c 100644
--- a/pytorch_blade/src/compiler/jit/fusion.cpp
+++ b/pytorch_blade/src/compiler/jit/fusion.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "fusion.h"
 
 #include <torch/csrc/jit/passes/utils/subgraph_utils.h>
diff --git a/pytorch_blade/src/compiler/jit/fusion.h b/pytorch_blade/src/compiler/jit/fusion.h
index ff09ed2a6f1..245c48e5272 100644
--- a/pytorch_blade/src/compiler/jit/fusion.h
+++ b/pytorch_blade/src/compiler/jit/fusion.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef __FUSION_H__
 #define __FUSION_H__
 
diff --git a/pytorch_blade/src/compiler/jit/licm.cpp b/pytorch_blade/src/compiler/jit/licm.cpp
index af886455105..8cae0f740a7 100644
--- a/pytorch_blade/src/compiler/jit/licm.cpp
+++ b/pytorch_blade/src/compiler/jit/licm.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <torch/csrc/jit/api/module.h>
 #include <torch/csrc/jit/ir/alias_analysis.h>
 #include <torch/csrc/jit/ir/ir.h>
diff --git a/pytorch_blade/src/compiler/jit/licm.h b/pytorch_blade/src/compiler/jit/licm.h
index 4ec71440a74..35fb8623420 100644
--- a/pytorch_blade/src/compiler/jit/licm.h
+++ b/pytorch_blade/src/compiler/jit/licm.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 namespace torch {
 namespace blade {
 void licm(const std::shared_ptr<torch::jit::Graph>& graph);
diff --git a/pytorch_blade/src/compiler/jit/onnx_funcs.cpp b/pytorch_blade/src/compiler/jit/onnx_funcs.cpp
index f9008225155..44249103705 100644
--- a/pytorch_blade/src/compiler/jit/onnx_funcs.cpp
+++ b/pytorch_blade/src/compiler/jit/onnx_funcs.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "onnx_funcs.h"
 #include "common_utils/logging.h"
 
diff --git a/pytorch_blade/src/compiler/jit/onnx_funcs.h b/pytorch_blade/src/compiler/jit/onnx_funcs.h
index 58655722f8d..2293e4ba040 100644
--- a/pytorch_blade/src/compiler/jit/onnx_funcs.h
+++ b/pytorch_blade/src/compiler/jit/onnx_funcs.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef __JIT_ONNX_H__
 #define __JIT_ONNX_H__
 #include <torch/script.h>
diff --git a/pytorch_blade/src/compiler/jit/pybind_functions.cpp b/pytorch_blade/src/compiler/jit/pybind_functions.cpp
index 39045e04553..884d921c25d 100644
--- a/pytorch_blade/src/compiler/jit/pybind_functions.cpp
+++ b/pytorch_blade/src/compiler/jit/pybind_functions.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "pybind_functions.h"
 
 #include <torch/csrc/jit/passes/lower_tuples.h>
diff --git a/pytorch_blade/src/compiler/jit/pybind_functions.h b/pytorch_blade/src/compiler/jit/pybind_functions.h
index ebd76c2a623..4a5810ff6ed 100644
--- a/pytorch_blade/src/compiler/jit/pybind_functions.h
+++ b/pytorch_blade/src/compiler/jit/pybind_functions.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef __JIT_PYBIND_FUNCS_H__
 #define __JIT_PYBIND_FUNCS_H__
 
diff --git a/pytorch_blade/src/compiler/jit/shape_type_spec.cpp b/pytorch_blade/src/compiler/jit/shape_type_spec.cpp
index 939024a33ee..8d237d3691d 100644
--- a/pytorch_blade/src/compiler/jit/shape_type_spec.cpp
+++ b/pytorch_blade/src/compiler/jit/shape_type_spec.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "compiler/jit/shape_type_spec.h"
 
 #include <iterator>
diff --git a/pytorch_blade/src/compiler/jit/shape_type_spec.h b/pytorch_blade/src/compiler/jit/shape_type_spec.h
index 35f4f3cde82..6d34126c857 100644
--- a/pytorch_blade/src/compiler/jit/shape_type_spec.h
+++ b/pytorch_blade/src/compiler/jit/shape_type_spec.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef __COMPILTER_TENSORRT_SHPAE_TYPE_SPEC_H__
 #define __COMPILTER_TENSORRT_SHPAE_TYPE_SPEC_H__
 #include <torch/script.h>
diff --git a/pytorch_blade/src/compiler/jit/tool_funcs.cpp b/pytorch_blade/src/compiler/jit/tool_funcs.cpp
index f9adbf4680c..ef656dffc2a 100644
--- a/pytorch_blade/src/compiler/jit/tool_funcs.cpp
+++ b/pytorch_blade/src/compiler/jit/tool_funcs.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 /*
  ____________________________
 < RAM wasn't built in a day. >
diff --git a/pytorch_blade/src/compiler/jit/tool_funcs.h b/pytorch_blade/src/compiler/jit/tool_funcs.h
index 3a3099c20aa..1d395e81dca 100644
--- a/pytorch_blade/src/compiler/jit/tool_funcs.h
+++ b/pytorch_blade/src/compiler/jit/tool_funcs.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef __JIT_TOOL_FUNCS_H__
 #define __JIT_TOOL_FUNCS_H__
 #include <torch/script.h>
diff --git a/pytorch_blade/src/compiler/jit/torch/alias_analysis.cpp b/pytorch_blade/src/compiler/jit/torch/alias_analysis.cpp
index 3606e517092..4c05f0099c8 100644
--- a/pytorch_blade/src/compiler/jit/torch/alias_analysis.cpp
+++ b/pytorch_blade/src/compiler/jit/torch/alias_analysis.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include "alias_analysis.h"
 
diff --git a/pytorch_blade/src/compiler/jit/torch/alias_analysis.h b/pytorch_blade/src/compiler/jit/torch/alias_analysis.h
index aab3167c076..b3033723418 100644
--- a/pytorch_blade/src/compiler/jit/torch/alias_analysis.h
+++ b/pytorch_blade/src/compiler/jit/torch/alias_analysis.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef __COMPILER_ALIAS_ANALYSIS_H__
 #define __COMPILER_ALIAS_ANALYSIS_H__
 #include <torch/script.h>
diff --git a/pytorch_blade/src/compiler/jit/torch/const_loop_unroll.cpp b/pytorch_blade/src/compiler/jit/torch/const_loop_unroll.cpp
index 800f5f9411d..3bf97e0227c 100644
--- a/pytorch_blade/src/compiler/jit/torch/const_loop_unroll.cpp
+++ b/pytorch_blade/src/compiler/jit/torch/const_loop_unroll.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "const_loop_unroll.h"
 #include <ATen/core/interned_strings.h>
 #include <c10/util/Exception.h>
diff --git a/pytorch_blade/src/compiler/jit/torch/const_loop_unroll.h b/pytorch_blade/src/compiler/jit/torch/const_loop_unroll.h
index 9f0e9e2134e..b80aef67bbb 100644
--- a/pytorch_blade/src/compiler/jit/torch/const_loop_unroll.h
+++ b/pytorch_blade/src/compiler/jit/torch/const_loop_unroll.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include <torch/csrc/jit/ir/ir.h>
 namespace torch {
diff --git a/pytorch_blade/src/compiler/jit/torch/eliminate_redundant_permutations.cpp b/pytorch_blade/src/compiler/jit/torch/eliminate_redundant_permutations.cpp
index 60e191aa366..9c7f31065bc 100644
--- a/pytorch_blade/src/compiler/jit/torch/eliminate_redundant_permutations.cpp
+++ b/pytorch_blade/src/compiler/jit/torch/eliminate_redundant_permutations.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <torch/csrc/jit/api/module.h>
 #include <torch/csrc/jit/ir/alias_analysis.h>
 #include <torch/csrc/jit/ir/ir.h>
diff --git a/pytorch_blade/src/compiler/jit/torch/eliminate_redundant_permutations.h b/pytorch_blade/src/compiler/jit/torch/eliminate_redundant_permutations.h
index 7641c313384..04798d40e2c 100644
--- a/pytorch_blade/src/compiler/jit/torch/eliminate_redundant_permutations.h
+++ b/pytorch_blade/src/compiler/jit/torch/eliminate_redundant_permutations.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 namespace torch {
 namespace blade {
 void eliminate_redundant_permutations(
diff --git a/pytorch_blade/src/compiler/jit/torch/freeze_module.cpp b/pytorch_blade/src/compiler/jit/torch/freeze_module.cpp
index 47fc804118c..14e4daad263 100644
--- a/pytorch_blade/src/compiler/jit/torch/freeze_module.cpp
+++ b/pytorch_blade/src/compiler/jit/torch/freeze_module.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <torch/csrc/jit/jit_log.h>
 #include <torch/csrc/jit/passes/freeze_module.h>
 
diff --git a/pytorch_blade/src/compiler/jit/torch/freeze_module.h b/pytorch_blade/src/compiler/jit/torch/freeze_module.h
index 5956a943023..721340cd05f 100644
--- a/pytorch_blade/src/compiler/jit/torch/freeze_module.h
+++ b/pytorch_blade/src/compiler/jit/torch/freeze_module.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 /** \brief This file defines freezing Torchscript module API.
  *
  * This API has python-binding and can be invoked directly or as a part of
diff --git a/pytorch_blade/src/compiler/jit/torch/onnx.cpp b/pytorch_blade/src/compiler/jit/torch/onnx.cpp
index f5d35604a99..4c2c8f52af3 100644
--- a/pytorch_blade/src/compiler/jit/torch/onnx.cpp
+++ b/pytorch_blade/src/compiler/jit/torch/onnx.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 /*
 This file is derived from PyTorch, and the following modifications are made to
 meet our requirements:
diff --git a/pytorch_blade/src/compiler/jit/torch/onnx.h b/pytorch_blade/src/compiler/jit/torch/onnx.h
index f0a6ea0373d..d9d470ddcc7 100644
--- a/pytorch_blade/src/compiler/jit/torch/onnx.h
+++ b/pytorch_blade/src/compiler/jit/torch/onnx.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 /*
 This file is derived from PyTorch, and the following modifications are made to
 meet our requirements:
diff --git a/pytorch_blade/src/compiler/jit/torch/pybind_utils.cpp b/pytorch_blade/src/compiler/jit/torch/pybind_utils.cpp
index 8e9091d2c6d..037014a6910 100644
--- a/pytorch_blade/src/compiler/jit/torch/pybind_utils.cpp
+++ b/pytorch_blade/src/compiler/jit/torch/pybind_utils.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "common_utils/version.h"
 #if PYTORCH_MAJOR_VERSION == 1 && PYTORCH_MINOR_VERSION >= 8
 
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/activation.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/activation.cpp
index 22d2d029e5e..3c044013ee3 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/activation.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/activation.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir-hlo/Dialect/mhlo/IR/hlo_ops.h> // from tf repo
 #include <mlir/mhlo/builder/activation.h>
 #include <mlir/mhlo/builder/element_wise_binary.h>
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/batchnorm.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/batchnorm.cpp
index 730216d108f..4c452c73645 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/batchnorm.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/batchnorm.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir/mhlo/builder/algebra_statistics.h>
 #include <mlir/mhlo/builder/mlir_utils.h>
 
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/broadcast.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/broadcast.cpp
index 64eae4599e8..02c0ccdefe5 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/broadcast.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/broadcast.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include <mlir-hlo/Dialect/mhlo/IR/hlo_ops.h> // from tf repo
 #include <mlir/Dialect/StandardOps/IR/Ops.h> // from tf repo
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/convolution.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/convolution.cpp
index ae2ad5ff3bb..9dc16c574ea 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/convolution.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/convolution.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir/mhlo/builder/broadcast.h>
 #include <mlir/mhlo/builder/convolution.h>
 #include <mlir/mhlo/builder/element_wise_binary.h>
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/element_wise_binary.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/element_wise_binary.cpp
index 4c08a5296a2..446a28c2f5a 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/element_wise_binary.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/element_wise_binary.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir-hlo/Dialect/mhlo/IR/chlo_ops.h> // from tf repo
 #include <mlir-hlo/Dialect/mhlo/IR/hlo_ops.h> // from tf repo
 #include <mlir/Dialect/StandardOps/IR/Ops.h> // from tf repo
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/element_wise_unary.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/element_wise_unary.cpp
index 74b71f53849..946b7d6e581 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/element_wise_unary.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/element_wise_unary.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir-hlo/Dialect/mhlo/IR/chlo_ops.h>
 #include "compiler/mlir/converters/mhlo_converter_register.h"
 #include "compiler/mlir/converters/mlir_type_utils.h"
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/embedding.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/embedding.cpp
index 3320966717b..4657487b622 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/embedding.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/embedding.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir/mhlo/builder/gather.h>
 
 #include "compiler/mlir/converters/impl/utils.h"
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/gru_cell.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/gru_cell.cpp
index 3dd9db56d5f..287176c1868 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/gru_cell.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/gru_cell.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir/mhlo/builder/gru_cell.h>
 #include <mlir/mhlo/builder/matmul.h>
 
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/layernorm.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/layernorm.cpp
index 881fcb27a34..1a0e9d7cbe0 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/layernorm.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/layernorm.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir/mhlo/builder/algebra_statistics.h>
 #include <mlir/mhlo/builder/mlir_shape_builder.h>
 #include <mlir/mhlo/builder/mlir_utils.h>
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/list_construct.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/list_construct.cpp
index feb07e17cf9..550a4423d82 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/list_construct.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/list_construct.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir/mhlo/builder/mlir_type_utils.h>
 
 #include "common_utils/logging.h"
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/matmul.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/matmul.cpp
index 2d8ad504c66..ad8607ccfd1 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/matmul.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/matmul.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir-hlo/Dialect/mhlo/IR/chlo_ops.h> // from tf repo
 #include <mlir-hlo/Dialect/mhlo/IR/hlo_ops.h> // from tf repo
 #include <mlir/mhlo/builder/element_wise_binary.h>
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/prim_constant.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/prim_constant.cpp
index 08308358575..15a40e44cfb 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/prim_constant.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/prim_constant.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "compiler/mlir/converters/impl/prim_constant.h"
 
 #include <mlir/Dialect/StandardOps/IR/Ops.h> // from tf repo
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/prim_constant.h b/pytorch_blade/src/compiler/mlir/converters/impl/prim_constant.h
index 759f59ea8c0..586d370eb91 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/prim_constant.h
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/prim_constant.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include <mlir-hlo/Dialect/mhlo/IR/hlo_ops.h> // from tf repo
 #include <mlir/mhlo/builder/constant.h>
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/reduction.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/reduction.cpp
index d08b97bd701..0d061022189 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/reduction.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/reduction.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir/mhlo/builder/reduction.h>
 
 #include "common_utils/logging.h"
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/reshapes.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/reshapes.cpp
index 73f0187a4eb..b9b294c9fee 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/reshapes.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/reshapes.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir/mhlo/builder/mlir_attr_utils.h>
 #include <mlir/mhlo/builder/mlir_shape_builder.h>
 #include <mlir/mhlo/builder/mlir_utils.h>
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/softmax.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/softmax.cpp
index 6c6e6e300af..7053cd01a1d 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/softmax.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/softmax.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir/mhlo/builder/softmax.h>
 
 #include "common_utils/logging.h"
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/tensor.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/tensor.cpp
index acdaeb04064..042ea5d61ca 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/tensor.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/tensor.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <mlir-hlo/Dialect/mhlo/IR/hlo_ops.h> // from tf repo
 #include <mlir/Dialect/StandardOps/IR/Ops.h>
 #include <mlir/mhlo/builder/mlir_type_utils.h>
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/utils.cpp b/pytorch_blade/src/compiler/mlir/converters/impl/utils.cpp
index 93712868cda..9bdf0f348e0 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/utils.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/utils.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include "compiler/mlir/converters/impl/utils.h"
 
diff --git a/pytorch_blade/src/compiler/mlir/converters/impl/utils.h b/pytorch_blade/src/compiler/mlir/converters/impl/utils.h
index f5b2657ac4f..bdbd64fb67a 100644
--- a/pytorch_blade/src/compiler/mlir/converters/impl/utils.h
+++ b/pytorch_blade/src/compiler/mlir/converters/impl/utils.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 
 #include <string>
diff --git a/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion.cpp b/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion.cpp
index 8ed84d4a293..7cdbc714be5 100644
--- a/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "compiler/mlir/converters/mhlo_conversion.h"
 
 #include <mlir-hlo/Dialect/mhlo/IR/chlo_ops.h>
diff --git a/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion.h b/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion.h
index c880873fa15..2af69d24663 100644
--- a/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion.h
+++ b/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <memory>
 #include <tuple>
 
diff --git a/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion_context.cpp b/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion_context.cpp
index a41a6447ba5..57377639f6b 100644
--- a/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion_context.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion_context.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "compiler/mlir/converters/mhlo_conversion_context.h"
 
 #include <mlir-hlo/Dialect/mhlo/IR/hlo_ops.h> // from tf repo
diff --git a/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion_context.h b/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion_context.h
index 67e0a3e5671..e915b5a72fe 100644
--- a/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion_context.h
+++ b/pytorch_blade/src/compiler/mlir/converters/mhlo_conversion_context.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include <llvm/ADT/Optional.h>
 #include <unordered_map>
diff --git a/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register.cpp b/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register.cpp
index 7e2a6978919..df0a35724d5 100644
--- a/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "compiler/mlir/converters/mhlo_converter_register.h"
 
 #include <torch/script.h>
diff --git a/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register.h b/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register.h
index 2859fc39b7e..c9581a9b94f 100644
--- a/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register.h
+++ b/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 
 #include <ATen/core/operator_name.h>
diff --git a/pytorch_blade/src/compiler/mlir/converters/mlir_type_utils.cpp b/pytorch_blade/src/compiler/mlir/converters/mlir_type_utils.cpp
index 2a93184871e..af69077d2ab 100644
--- a/pytorch_blade/src/compiler/mlir/converters/mlir_type_utils.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/mlir_type_utils.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "compiler/mlir/converters/mlir_type_utils.h"
 
 #include <mlir-hlo/Dialect/mhlo/IR/hlo_ops.h> // from tf repo
diff --git a/pytorch_blade/src/compiler/mlir/converters/mlir_type_utils.h b/pytorch_blade/src/compiler/mlir/converters/mlir_type_utils.h
index c6ecc265ec8..ddcaa638aa0 100644
--- a/pytorch_blade/src/compiler/mlir/converters/mlir_type_utils.h
+++ b/pytorch_blade/src/compiler/mlir/converters/mlir_type_utils.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include <c10/core/ScalarType.h>
 #include <mlir/IR/Builders.h>
diff --git a/pytorch_blade/src/compiler/mlir/pybind_functions.cpp b/pytorch_blade/src/compiler/mlir/pybind_functions.cpp
index b0fe9582ccd..1e7f252b6bd 100644
--- a/pytorch_blade/src/compiler/mlir/pybind_functions.cpp
+++ b/pytorch_blade/src/compiler/mlir/pybind_functions.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "pybind.h"
 
 #include "compiler/mlir/converters/mhlo_conversion.h"
diff --git a/pytorch_blade/src/compiler/mlir/pybind_functions.h b/pytorch_blade/src/compiler/mlir/pybind_functions.h
index 60a34dc2aeb..230a0252464 100644
--- a/pytorch_blade/src/compiler/mlir/pybind_functions.h
+++ b/pytorch_blade/src/compiler/mlir/pybind_functions.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef __COMPILER_MLIR_PYBIND_H__
 #define __COMPILER_MLIR_PYBIND_H__
 
diff --git a/pytorch_blade/src/compiler/mlir/runtime/disc_engine_class.cpp b/pytorch_blade/src/compiler/mlir/runtime/disc_engine_class.cpp
index 22fc897fcaf..a63aee9b651 100644
--- a/pytorch_blade/src/compiler/mlir/runtime/disc_engine_class.cpp
+++ b/pytorch_blade/src/compiler/mlir/runtime/disc_engine_class.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "compiler/mlir/runtime/disc_engine_class.h"
 
 #include "common_utils/logging.h"
diff --git a/pytorch_blade/src/compiler/mlir/runtime/disc_engine_class.h b/pytorch_blade/src/compiler/mlir/runtime/disc_engine_class.h
index b4409b27391..7d609e6af3e 100644
--- a/pytorch_blade/src/compiler/mlir/runtime/disc_engine_class.h
+++ b/pytorch_blade/src/compiler/mlir/runtime/disc_engine_class.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include <torch/script.h>
 
diff --git a/pytorch_blade/src/compiler/mlir/runtime/ral_context.cpp b/pytorch_blade/src/compiler/mlir/runtime/ral_context.cpp
index bca3e764707..ddbe9e15e28 100644
--- a/pytorch_blade/src/compiler/mlir/runtime/ral_context.cpp
+++ b/pytorch_blade/src/compiler/mlir/runtime/ral_context.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "compiler/mlir/runtime/ral_context.h"
 
 #include <dlfcn.h>
diff --git a/pytorch_blade/src/compiler/mlir/runtime/ral_context.h b/pytorch_blade/src/compiler/mlir/runtime/ral_context.h
index afe0379d872..a770b0663b6 100644
--- a/pytorch_blade/src/compiler/mlir/runtime/ral_context.h
+++ b/pytorch_blade/src/compiler/mlir/runtime/ral_context.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef __COMPILER_MLIR_RUNTIME_RAL_CONTEXT_H__
 #define __COMPILER_MLIR_RUNTIME_RAL_CONTEXT_H__
 
diff --git a/pytorch_blade/src/pybind.cpp b/pytorch_blade/src/pybind.cpp
index c9c545963cd..6ac327669c4 100644
--- a/pytorch_blade/src/pybind.cpp
+++ b/pytorch_blade/src/pybind.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include "pybind.h"
 
diff --git a/pytorch_blade/src/pybind.h b/pytorch_blade/src/pybind.h
index f589d324138..2694b34cf11 100644
--- a/pytorch_blade/src/pybind.h
+++ b/pytorch_blade/src/pybind.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 
 #include <pybind11/pybind11.h>
diff --git a/pytorch_blade/torch_blade/__init__.py b/pytorch_blade/torch_blade/__init__.py
index 1e9704b3cc2..ad1b4526761 100644
--- a/pytorch_blade/torch_blade/__init__.py
+++ b/pytorch_blade/torch_blade/__init__.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 try:
     import torchvision
diff --git a/pytorch_blade/torch_blade/algorithm/__init__.py b/pytorch_blade/torch_blade/algorithm/__init__.py
index 29bf06dc6e8..b4e672a3837 100644
--- a/pytorch_blade/torch_blade/algorithm/__init__.py
+++ b/pytorch_blade/torch_blade/algorithm/__init__.py
@@ -1,2 +1,13 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 from .union_set import UnionSet
 from .directed_graph import AdjGraph, NxGraph
diff --git a/pytorch_blade/torch_blade/algorithm/directed_graph.py b/pytorch_blade/torch_blade/algorithm/directed_graph.py
index 54ca0c0b295..a5e71ce9e04 100644
--- a/pytorch_blade/torch_blade/algorithm/directed_graph.py
+++ b/pytorch_blade/torch_blade/algorithm/directed_graph.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import heapq
 import networkx as nx
 import networkx.algorithms.shortest_paths.generic as nx_path
diff --git a/pytorch_blade/torch_blade/algorithm/union_set.py b/pytorch_blade/torch_blade/algorithm/union_set.py
index b057d31a1ef..05a2846f1ad 100644
--- a/pytorch_blade/torch_blade/algorithm/union_set.py
+++ b/pytorch_blade/torch_blade/algorithm/union_set.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 class UnionSet:
     def __init__(self, num_elems: int):
         self._num_elems = num_elems
diff --git a/pytorch_blade/torch_blade/clustering/__init__.py b/pytorch_blade/torch_blade/clustering/__init__.py
index e69de29bb2d..57249d7142e 100644
--- a/pytorch_blade/torch_blade/clustering/__init__.py
+++ b/pytorch_blade/torch_blade/clustering/__init__.py
@@ -0,0 +1,11 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
diff --git a/pytorch_blade/torch_blade/clustering/support_fusion_algorithm.py b/pytorch_blade/torch_blade/clustering/support_fusion_algorithm.py
index 1b0fb203774..c018bebd531 100644
--- a/pytorch_blade/torch_blade/clustering/support_fusion_algorithm.py
+++ b/pytorch_blade/torch_blade/clustering/support_fusion_algorithm.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 from torch_blade.logging import logger
 from torch_blade.algorithm import UnionSet, NxGraph
diff --git a/pytorch_blade/torch_blade/clustering/support_fusion_group.py b/pytorch_blade/torch_blade/clustering/support_fusion_group.py
index 7a092d23ebf..0ea89f40485 100644
--- a/pytorch_blade/torch_blade/clustering/support_fusion_group.py
+++ b/pytorch_blade/torch_blade/clustering/support_fusion_group.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import contextlib
 import torch_blade
 from torch_blade import utils
diff --git a/pytorch_blade/torch_blade/clustering/support_group_conversion.py b/pytorch_blade/torch_blade/clustering/support_group_conversion.py
index cd14e16edda..81ea826356c 100644
--- a/pytorch_blade/torch_blade/clustering/support_group_conversion.py
+++ b/pytorch_blade/torch_blade/clustering/support_group_conversion.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import torch_blade
 
diff --git a/pytorch_blade/torch_blade/config.py b/pytorch_blade/torch_blade/config.py
index b81688d93ee..37d7eb7acca 100644
--- a/pytorch_blade/torch_blade/config.py
+++ b/pytorch_blade/torch_blade/config.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 from contextlib import ContextDecorator
 from collections import defaultdict
 import copy
diff --git a/pytorch_blade/torch_blade/export.py b/pytorch_blade/torch_blade/export.py
index d2217249035..4e174e5b3f4 100644
--- a/pytorch_blade/torch_blade/export.py
+++ b/pytorch_blade/torch_blade/export.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import copy
 import types
 import io
diff --git a/pytorch_blade/torch_blade/logging.py b/pytorch_blade/torch_blade/logging.py
index 923cd90cf04..c76ab1f8393 100644
--- a/pytorch_blade/torch_blade/logging.py
+++ b/pytorch_blade/torch_blade/logging.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import os
 import contextlib
 import logging
diff --git a/pytorch_blade/torch_blade/mlir/__init__.py b/pytorch_blade/torch_blade/mlir/__init__.py
index f799daff3d0..780b7b26053 100644
--- a/pytorch_blade/torch_blade/mlir/__init__.py
+++ b/pytorch_blade/torch_blade/mlir/__init__.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 try:
     from .._torch_blade._mlir import *
     _is_available = True
diff --git a/pytorch_blade/torch_blade/mlir/disc_engine_conversion.py b/pytorch_blade/torch_blade/mlir/disc_engine_conversion.py
index 313e6a2b7c8..e22e3c4a106 100644
--- a/pytorch_blade/torch_blade/mlir/disc_engine_conversion.py
+++ b/pytorch_blade/torch_blade/mlir/disc_engine_conversion.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import os
 import subprocess
 import shutil
diff --git a/pytorch_blade/torch_blade/optimize.py b/pytorch_blade/torch_blade/optimize.py
index 4650c0fda5b..0032751546f 100644
--- a/pytorch_blade/torch_blade/optimize.py
+++ b/pytorch_blade/torch_blade/optimize.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 from torch_blade.config import Config, OptPipelines
 from torch_blade.export import export
diff --git a/pytorch_blade/torch_blade/pass_manager.py b/pytorch_blade/torch_blade/pass_manager.py
index da9b0616595..8013462dd2b 100644
--- a/pytorch_blade/torch_blade/pass_manager.py
+++ b/pytorch_blade/torch_blade/pass_manager.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 from torch.onnx.symbolic_helper import _default_onnx_opset_version, _set_opset_version
 from torch.onnx import OperatorExportTypes
diff --git a/pytorch_blade/torch_blade/python_ir_analysis.py b/pytorch_blade/torch_blade/python_ir_analysis.py
index 5974034a8d3..8d009d65b5c 100644
--- a/pytorch_blade/torch_blade/python_ir_analysis.py
+++ b/pytorch_blade/torch_blade/python_ir_analysis.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 from collections import namedtuple
 
 import torch
diff --git a/pytorch_blade/torch_blade/tools/__init__.py b/pytorch_blade/torch_blade/tools/__init__.py
index 24c3b799e44..8876aa96175 100644
--- a/pytorch_blade/torch_blade/tools/__init__.py
+++ b/pytorch_blade/torch_blade/tools/__init__.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import contextlib
 import torch
 from .._torch_blade._tools import *
diff --git a/pytorch_blade/torch_blade/tools/low_precision_analysis.py b/pytorch_blade/torch_blade/tools/low_precision_analysis.py
index 9a8a70ca204..92854cada38 100644
--- a/pytorch_blade/torch_blade/tools/low_precision_analysis.py
+++ b/pytorch_blade/torch_blade/tools/low_precision_analysis.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 from contextlib import contextmanager
 
 import torch
diff --git a/pytorch_blade/torch_blade/tools/onnx_lower_guard.py b/pytorch_blade/torch_blade/tools/onnx_lower_guard.py
index d17deb3f0d0..9bb38bc6c9f 100644
--- a/pytorch_blade/torch_blade/tools/onnx_lower_guard.py
+++ b/pytorch_blade/torch_blade/tools/onnx_lower_guard.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import itertools
 import torch
 
diff --git a/pytorch_blade/torch_blade/tools/shape_inference.py b/pytorch_blade/torch_blade/tools/shape_inference.py
index 00a712c7c66..ca6386f0385 100644
--- a/pytorch_blade/torch_blade/tools/shape_inference.py
+++ b/pytorch_blade/torch_blade/tools/shape_inference.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import torch_blade
 
diff --git a/pytorch_blade/torch_blade/utils.py b/pytorch_blade/torch_blade/utils.py
index 1939f7bcb83..abfac35aa57 100644
--- a/pytorch_blade/torch_blade/utils.py
+++ b/pytorch_blade/torch_blade/utils.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import os
 import collections
 import contextlib
diff --git a/scripts/ci/deploy_docker.sh b/scripts/ci/deploy_docker.sh
index 131302567de..92109b33719 100644
--- a/scripts/ci/deploy_docker.sh
+++ b/scripts/ci/deploy_docker.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 set -e
 
 ALIYUN_DOCKER_ORG=bladedisc
diff --git a/scripts/ci/deploy_pytorch_blade.sh b/scripts/ci/deploy_pytorch_blade.sh
index 1776ce078ae..4a84b511d36 100644
--- a/scripts/ci/deploy_pytorch_blade.sh
+++ b/scripts/ci/deploy_pytorch_blade.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
 
diff --git a/scripts/ci/deploy_tf_wrapper.sh b/scripts/ci/deploy_tf_wrapper.sh
index ad4c420e5f8..c00339b9792 100644
--- a/scripts/ci/deploy_tf_wrapper.sh
+++ b/scripts/ci/deploy_tf_wrapper.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
 
diff --git a/scripts/ci/parse_args.sh b/scripts/ci/parse_args.sh
index 744b4363c3d..890e2ca2128 100644
--- a/scripts/ci/parse_args.sh
+++ b/scripts/ci/parse_args.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 function help() {
   echo "disc.sh --cpu-only --venv /opt/venv_py3_tf115"
diff --git a/scripts/pre-commit/copyright.py b/scripts/pre-commit/copyright.py
new file mode 100644
index 00000000000..3f0b5df0f2b
--- /dev/null
+++ b/scripts/pre-commit/copyright.py
@@ -0,0 +1,140 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+import argparse
+import io
+import re
+import subprocess
+
+COPYRIGHT = '''
+Copyright 2021 The BladeDISC Authors. All rights reserved.
+Licensed 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://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.
+'''
+
+LANG_COMMENT_MARK = None
+
+NEW_LINE_MARK = None
+
+COPYRIGHT_HEADER = None
+
+NEW_LINE_MARK = '\n'
+COPYRIGHT_HEADER = COPYRIGHT.split(NEW_LINE_MARK)[1]
+p = re.search('(\d{4})', COPYRIGHT_HEADER).group(0)  # noqa: W605
+process = subprocess.Popen(["date", "+%Y"], stdout=subprocess.PIPE)
+date, err = process.communicate()
+date = date.decode("utf-8").rstrip("\n")
+COPYRIGHT_HEADER = COPYRIGHT_HEADER.replace(p, date)
+
+
+def generate_copyright(template, lang='go'):
+    if lang in ['Python', 'shell']:
+        LANG_COMMENT_MARK = '#'
+    else:
+        LANG_COMMENT_MARK = "//"
+
+    lines = template.split(NEW_LINE_MARK)
+    BLANK = " "
+    ans = LANG_COMMENT_MARK + BLANK + COPYRIGHT_HEADER + NEW_LINE_MARK
+    for lino, line in enumerate(lines):
+        if lino == 0 or lino == 1 or lino == len(lines) - 1:
+            continue
+        if len(line) == 0:
+            BLANK = ""
+        else:
+            BLANK = " "
+        ans += LANG_COMMENT_MARK + BLANK + line + NEW_LINE_MARK
+
+    return ans + "\n"
+
+
+def lang_type(filename):
+    if filename.endswith(".py"):
+        return "Python"
+    elif filename.endswith(".go"):
+        return "go"
+    elif filename.endswith(".proto"):
+        return "go"
+    elif filename.endswith(".sh"):
+        return "shell"
+    elif filename.endswith(".cpp") or filename.endswith(".h") \
+            or filename.endswith(".cc"):
+        return "cpp"
+    else:
+        print("Unsupported filetype %s", filename)
+        exit(0)
+
+
+PYTHON_ENCODE = re.compile("^[ \t\v]*#.*?coding[:=][ \t]*([-_.a-zA-Z0-9]+)")
+
+
+def main(argv=None):
+    parser = argparse.ArgumentParser(
+        description='Checker for copyright declaration.')
+    parser.add_argument('filenames', nargs='*', help='Filenames to check')
+    args = parser.parse_args(argv)
+
+    retv = 0
+    for filename in args.filenames:
+        fd = io.open(filename, encoding="utf-8")
+        first_line = fd.readline()
+        second_line = fd.readline()
+        third_line = fd.readline()
+        # check for 3 head lines
+        if "COPYRIGHT " in first_line.upper():
+            continue
+        if "COPYRIGHT " in second_line.upper():
+            continue
+        if "COPYRIGHT " in third_line.upper():
+            continue
+        skip_one = False
+        skip_two = False
+        if first_line.startswith("#!"):
+            skip_one = True
+        if PYTHON_ENCODE.match(second_line) is not None:
+            skip_two = True
+        if PYTHON_ENCODE.match(first_line) is not None:
+            skip_one = True
+
+        original_content_lines = io.open(filename,
+                                         encoding="utf-8").read().split("\n")
+        copyright_string = generate_copyright(COPYRIGHT, lang_type(filename))
+        if skip_one:
+            new_contents = "\n".join(
+                [original_content_lines[0], copyright_string] +
+                original_content_lines[1:])
+        elif skip_two:
+            new_contents = "\n".join([
+                original_content_lines[0], original_content_lines[1],
+                copyright_string
+            ] + original_content_lines[2:])
+        else:
+            new_contents = generate_copyright(
+                COPYRIGHT,
+                lang_type(filename)) + "\n".join(original_content_lines)
+        print('Auto Insert Copyright Header {}'.format(filename))
+        with io.open(filename, 'w', encoding='utf8') as output_file:
+            output_file.write(new_contents)
+
+    return retv
+
+
+if __name__ == '__main__':
+    exit(main())
\ No newline at end of file
diff --git a/scripts/python/bazel_snapshot_client.py b/scripts/python/bazel_snapshot_client.py
index 56d464a754f..3487529eb70 100755
--- a/scripts/python/bazel_snapshot_client.py
+++ b/scripts/python/bazel_snapshot_client.py
@@ -1,4 +1,16 @@
 #!/usr/bin/env python3
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 # required packages in update mode
 # pip3 install oss2
diff --git a/scripts/python/tao_build.py b/scripts/python/tao_build.py
index ddce9da183d..ff8a5a48cbd 100755
--- a/scripts/python/tao_build.py
+++ b/scripts/python/tao_build.py
@@ -1,4 +1,16 @@
 #!/usr/bin/env python
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 # E501: max line length checking
 # flake8: noqa: E501
diff --git a/scripts/python/tao_common.py b/scripts/python/tao_common.py
index df03e07c407..31758be4851 100644
--- a/scripts/python/tao_common.py
+++ b/scripts/python/tao_common.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import subprocess
 import logging
 import sys
diff --git a/tao/docker/install_cuda10_toolkit.sh b/tao/docker/install_cuda10_toolkit.sh
index ca3c7d856fb..5f45afa74f1 100755
--- a/tao/docker/install_cuda10_toolkit.sh
+++ b/tao/docker/install_cuda10_toolkit.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 set -ex
 CUDA_RUN=/install/cuda_10.0.130_410.48_linux.run
diff --git a/tao/python/blade_disc_tf/__init__.py b/tao/python/blade_disc_tf/__init__.py
index 8d4e3aa68b2..d0421ba1e3c 100644
--- a/tao/python/blade_disc_tf/__init__.py
+++ b/tao/python/blade_disc_tf/__init__.py
@@ -1,1 +1,12 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 from .disc import enable
diff --git a/tao/python/blade_disc_tf/_version.py b/tao/python/blade_disc_tf/_version.py
index b794fd409a5..04b39e1ee6c 100644
--- a/tao/python/blade_disc_tf/_version.py
+++ b/tao/python/blade_disc_tf/_version.py
@@ -1,1 +1,12 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 __version__ = '0.1.0'
diff --git a/tao/python/blade_disc_tf/disc.py b/tao/python/blade_disc_tf/disc.py
index 92ea8149a22..a78745d6fe3 100644
--- a/tao/python/blade_disc_tf/disc.py
+++ b/tao/python/blade_disc_tf/disc.py
@@ -1,4 +1,16 @@
 #!/bin/env python
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 import os
 import tensorflow as tf
diff --git a/tao/setup.py b/tao/setup.py
index 1623b75018f..6008c5d9c44 100644
--- a/tao/setup.py
+++ b/tao/setup.py
@@ -1,4 +1,16 @@
 #!/usr/bin/env python
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 # -*- coding: utf-8 -*-
 
 import io
diff --git a/tao/tao_bridge/common.cc b/tao/tao_bridge/common.cc
index 63d60d81cd4..b0d4e11e294 100644
--- a/tao/tao_bridge/common.cc
+++ b/tao/tao_bridge/common.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/common.h"
 
 #include <climits>
diff --git a/tao/tao_bridge/common.h b/tao/tao_bridge/common.h
index 7b9bd181cdb..53aaefd1a07 100644
--- a/tao/tao_bridge/common.h
+++ b/tao/tao_bridge/common.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_COMMON_H_
 #define TAO_TAO_BRIDGE_COMMON_H_
 
diff --git a/tao/tao_bridge/cuda_utils.cc b/tao/tao_bridge/cuda_utils.cc
index 40acce7e557..da45632d180 100644
--- a/tao/tao_bridge/cuda_utils.cc
+++ b/tao/tao_bridge/cuda_utils.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/cuda_utils.h"
 
 #include <dlfcn.h>
diff --git a/tao/tao_bridge/cuda_utils.h b/tao/tao_bridge/cuda_utils.h
index d8a8e3be218..1a4c5ccff3a 100644
--- a/tao/tao_bridge/cuda_utils.h
+++ b/tao/tao_bridge/cuda_utils.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_CUDA_UTILS_H_
 #define TAO_CUDA_UTILS_H_
 
diff --git a/tao/tao_bridge/dumper_common.cc b/tao/tao_bridge/dumper_common.cc
index 7223905880c..5a20515ee9a 100644
--- a/tao/tao_bridge/dumper_common.cc
+++ b/tao/tao_bridge/dumper_common.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/dumper_common.h"
 
 #include <climits>
diff --git a/tao/tao_bridge/dumper_common.h b/tao/tao_bridge/dumper_common.h
index 092889fb0d0..ed16e9a82b6 100644
--- a/tao/tao_bridge/dumper_common.h
+++ b/tao/tao_bridge/dumper_common.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_DUMPER_COMMON_H
 #define TAO_TAO_BRIDGE_DUMPER_COMMON_H
 
diff --git a/tao/tao_bridge/errors.cc b/tao/tao_bridge/errors.cc
index 542aa97ffaa..26b2646a367 100644
--- a/tao/tao_bridge/errors.cc
+++ b/tao/tao_bridge/errors.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/errors.h"
 
 #include "absl/strings/str_cat.h"
diff --git a/tao/tao_bridge/errors.h b/tao/tao_bridge/errors.h
index a2c68b3bbc2..943ca5d5979 100644
--- a/tao/tao_bridge/errors.h
+++ b/tao/tao_bridge/errors.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_ERRORS_H_
 #define TAO_TAO_BRIDGE_ERRORS_H_
 
diff --git a/tao/tao_bridge/executable.cc b/tao/tao_bridge/executable.cc
index 39af1f30bb0..b9e5aba5d85 100644
--- a/tao/tao_bridge/executable.cc
+++ b/tao/tao_bridge/executable.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/executable.h"
 
 #include "absl/strings/str_cat.h"
diff --git a/tao/tao_bridge/executable.h b/tao/tao_bridge/executable.h
index e4fd5d45411..a1e140914bf 100644
--- a/tao/tao_bridge/executable.h
+++ b/tao/tao_bridge/executable.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_EXECUTABLE_H_
 #define TAO_TAO_BRIDGE_EXECUTABLE_H_
 
diff --git a/tao/tao_bridge/kernels/disc_launch.cc b/tao/tao_bridge/kernels/disc_launch.cc
index 727cca78108..fb46fb26ca4 100644
--- a/tao/tao_bridge/kernels/disc_launch.cc
+++ b/tao/tao_bridge/kernels/disc_launch.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/kernels/disc_launch.h"
 
 #include "tao_bridge/kernels/tao_compilation_cache.h"
diff --git a/tao/tao_bridge/kernels/disc_launch.h b/tao/tao_bridge/kernels/disc_launch.h
index 92c9b49d95d..779752ad35e 100644
--- a/tao/tao_bridge/kernels/disc_launch.h
+++ b/tao/tao_bridge/kernels/disc_launch.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_KERNELS_DISC_LAUNCH_H_
 #define TAO_TAO_BRIDGE_KERNELS_DISC_LAUNCH_H_
 
diff --git a/tao/tao_bridge/kernels/launch_base.cc b/tao/tao_bridge/kernels/launch_base.cc
index ff324e9b81a..27b97ce3a3d 100644
--- a/tao/tao_bridge/kernels/launch_base.cc
+++ b/tao/tao_bridge/kernels/launch_base.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/kernels/launch_base.h"
 
 namespace tensorflow {
diff --git a/tao/tao_bridge/kernels/launch_base.h b/tao/tao_bridge/kernels/launch_base.h
index 0fe911d7257..13d00cd4446 100644
--- a/tao/tao_bridge/kernels/launch_base.h
+++ b/tao/tao_bridge/kernels/launch_base.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_KERNELS_LAUNCH_BASE_H_
 #define TAO_TAO_BRIDGE_KERNELS_LAUNCH_BASE_H_
 
diff --git a/tao/tao_bridge/kernels/platform_info.cc b/tao/tao_bridge/kernels/platform_info.cc
index 7d30df7fa80..1a6bff73f8a 100644
--- a/tao/tao_bridge/kernels/platform_info.cc
+++ b/tao/tao_bridge/kernels/platform_info.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/kernels/platform_info.h"
 
 namespace tensorflow {
diff --git a/tao/tao_bridge/kernels/platform_info.h b/tao/tao_bridge/kernels/platform_info.h
index 04e7ed14fc1..5c6b0e7cb06 100644
--- a/tao/tao_bridge/kernels/platform_info.h
+++ b/tao/tao_bridge/kernels/platform_info.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_KERNELS_PLATFORM_INFO_H_
 #define TAO_TAO_BRIDGE_KERNELS_PLATFORM_INFO_H_
 
diff --git a/tao/tao_bridge/kernels/process.cc b/tao/tao_bridge/kernels/process.cc
index a70da0155d1..6a53ef0d1cd 100644
--- a/tao/tao_bridge/kernels/process.cc
+++ b/tao/tao_bridge/kernels/process.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/kernels/process.h"
 
 namespace tensorflow {
diff --git a/tao/tao_bridge/kernels/process.h b/tao/tao_bridge/kernels/process.h
index 997775e8bdb..10a36f7f795 100644
--- a/tao/tao_bridge/kernels/process.h
+++ b/tao/tao_bridge/kernels/process.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_KERNELS_TAO_PROCESS_H_
 #define TAO_TAO_BRIDGE_KERNELS_TAO_PROCESS_H_
 
diff --git a/tao/tao_bridge/kernels/profiling.cc b/tao/tao_bridge/kernels/profiling.cc
index a25e027d52c..cc0080f9407 100644
--- a/tao/tao_bridge/kernels/profiling.cc
+++ b/tao/tao_bridge/kernels/profiling.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/kernels/profiling.h"
 
 #include "tao_bridge/errors.h"
diff --git a/tao/tao_bridge/kernels/profiling.h b/tao/tao_bridge/kernels/profiling.h
index 6afe4568788..33711cf02b8 100644
--- a/tao/tao_bridge/kernels/profiling.h
+++ b/tao/tao_bridge/kernels/profiling.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_KERNELS_PROFILING_H_
 #define TAO_TAO_BRIDGE_KERNELS_PROFILING_H_
 
diff --git a/tao/tao_bridge/kernels/tao_compilation_cache.cc b/tao/tao_bridge/kernels/tao_compilation_cache.cc
index 92b3f43f8d9..64dcabf032c 100644
--- a/tao/tao_bridge/kernels/tao_compilation_cache.cc
+++ b/tao/tao_bridge/kernels/tao_compilation_cache.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/kernels/tao_compilation_cache.h"
 
 #include <dlfcn.h>
diff --git a/tao/tao_bridge/kernels/tao_compilation_cache.h b/tao/tao_bridge/kernels/tao_compilation_cache.h
index 92cb1ddd494..da2d610ef12 100644
--- a/tao/tao_bridge/kernels/tao_compilation_cache.h
+++ b/tao/tao_bridge/kernels/tao_compilation_cache.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_TAO_COMPILATION_CACHE_H_
 #define TAO_TAO_BRIDGE_TAO_COMPILATION_CACHE_H_
 
diff --git a/tao/tao_bridge/kernels/tao_compilation_info_collector.cc b/tao/tao_bridge/kernels/tao_compilation_info_collector.cc
index a2a09c729e4..283de9787de 100644
--- a/tao/tao_bridge/kernels/tao_compilation_info_collector.cc
+++ b/tao/tao_bridge/kernels/tao_compilation_info_collector.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/kernels/tao_compilation_info_collector.h"
 
 #include <dlfcn.h>
diff --git a/tao/tao_bridge/kernels/tao_compilation_info_collector.h b/tao/tao_bridge/kernels/tao_compilation_info_collector.h
index 40967350778..4be7f588e17 100644
--- a/tao/tao_bridge/kernels/tao_compilation_info_collector.h
+++ b/tao/tao_bridge/kernels/tao_compilation_info_collector.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 
 #include <sys/stat.h>
diff --git a/tao/tao_bridge/kernels/tao_profiling_guided_compilation.cc b/tao/tao_bridge/kernels/tao_profiling_guided_compilation.cc
index d1db2f9e709..78f10c79984 100644
--- a/tao/tao_bridge/kernels/tao_profiling_guided_compilation.cc
+++ b/tao/tao_bridge/kernels/tao_profiling_guided_compilation.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/kernels/tao_profiling_guided_compilation.h"
 
 #include <sys/time.h>
diff --git a/tao/tao_bridge/kernels/tao_profiling_guided_compilation.h b/tao/tao_bridge/kernels/tao_profiling_guided_compilation.h
index 49910e8d156..b8e18cd2009 100644
--- a/tao/tao_bridge/kernels/tao_profiling_guided_compilation.h
+++ b/tao/tao_bridge/kernels/tao_profiling_guided_compilation.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 
 #include <unordered_map>
diff --git a/tao/tao_bridge/mlir/mlir_executable.cc b/tao/tao_bridge/mlir/mlir_executable.cc
index 796c5b98d7d..a95b4ff3cc5 100644
--- a/tao/tao_bridge/mlir/mlir_executable.cc
+++ b/tao/tao_bridge/mlir/mlir_executable.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/mlir/mlir_executable.h"
 
 #include <dlfcn.h>
diff --git a/tao/tao_bridge/mlir/mlir_executable.h b/tao/tao_bridge/mlir/mlir_executable.h
index afaf71257d3..0213234bb21 100644
--- a/tao/tao_bridge/mlir/mlir_executable.h
+++ b/tao/tao_bridge/mlir/mlir_executable.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_MLIR_EXECUTABLE_H_
 #define TAO_TAO_BRIDGE_MLIR_EXECUTABLE_H_
 
diff --git a/tao/tao_bridge/ops/tao_ops.cc b/tao/tao_bridge/ops/tao_ops.cc
index e87891bb88a..34004c24dae 100644
--- a/tao/tao_bridge/ops/tao_ops.cc
+++ b/tao/tao_bridge/ops/tao_ops.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/core/framework/op.h"
 
 namespace tensorflow {
diff --git a/tao/tao_bridge/passes/defunctionalize_control_flow.cc b/tao/tao_bridge/passes/defunctionalize_control_flow.cc
index 9610218264b..c97dd7767d6 100644
--- a/tao/tao_bridge/passes/defunctionalize_control_flow.cc
+++ b/tao/tao_bridge/passes/defunctionalize_control_flow.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/passes/defunctionalize_control_flow.h"
 #include "tao_bridge/tf/lower_if_op.h"
 #include "tao_bridge/tf/lower_while_op.h"
diff --git a/tao/tao_bridge/passes/defunctionalize_control_flow.h b/tao/tao_bridge/passes/defunctionalize_control_flow.h
index 8597a32dd02..d78d40d8aa2 100644
--- a/tao/tao_bridge/passes/defunctionalize_control_flow.h
+++ b/tao/tao_bridge/passes/defunctionalize_control_flow.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_PASSES_DEFUNCTIONALIZE_CONTROL_FLOW_H_
 #define TAO_TAO_BRIDGE_PASSES_DEFUNCTIONALIZE_CONTROL_FLOW_H_
 
diff --git a/tao/tao_bridge/passes/tao_bace_reformat_pass.cc b/tao/tao_bridge/passes/tao_bace_reformat_pass.cc
index d07b14c1048..f15ab1a970b 100644
--- a/tao/tao_bridge/passes/tao_bace_reformat_pass.cc
+++ b/tao/tao_bridge/passes/tao_bace_reformat_pass.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #define EIGEN_USE_THREADS
 #include "tao_bridge/passes/tao_bace_reformat_pass.h"
 
diff --git a/tao/tao_bridge/passes/tao_bace_reformat_pass.h b/tao/tao_bridge/passes/tao_bace_reformat_pass.h
index 77f1b7833ff..933d85a56e2 100644
--- a/tao/tao_bridge/passes/tao_bace_reformat_pass.h
+++ b/tao/tao_bridge/passes/tao_bace_reformat_pass.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_PASSES_TAO_BACE_REFORMAT_FP32_PASS_H_
 #define TAO_TAO_BRIDGE_PASSES_TAO_BACE_REFORMAT_FP32_PASS_H_
 
diff --git a/tao/tao_bridge/passes/tao_build_tao_op_pass.cc b/tao/tao_bridge/passes/tao_build_tao_op_pass.cc
index 536e59d44bc..974c96c7abd 100644
--- a/tao/tao_bridge/passes/tao_build_tao_op_pass.cc
+++ b/tao/tao_bridge/passes/tao_build_tao_op_pass.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/passes/tao_build_tao_op_pass.h"
 
 #include <string>
diff --git a/tao/tao_bridge/passes/tao_build_tao_op_pass.h b/tao/tao_bridge/passes/tao_build_tao_op_pass.h
index 07807869f8d..e8eff0c5194 100644
--- a/tao/tao_bridge/passes/tao_build_tao_op_pass.h
+++ b/tao/tao_bridge/passes/tao_build_tao_op_pass.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_PASSES_TAO_BUILD_TAO_OP_PASS_H_
 #define TAO_TAO_BRIDGE_PASSES_TAO_BUILD_TAO_OP_PASS_H_
 
diff --git a/tao/tao_bridge/passes/tao_defuse_pass.cc b/tao/tao_bridge/passes/tao_defuse_pass.cc
index 0330e61ebbc..9fa162d547c 100644
--- a/tao/tao_bridge/passes/tao_defuse_pass.cc
+++ b/tao/tao_bridge/passes/tao_defuse_pass.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/passes/tao_defuse_pass.h"
 
 #include <string>
diff --git a/tao/tao_bridge/passes/tao_defuse_pass.h b/tao/tao_bridge/passes/tao_defuse_pass.h
index 25e83ae62e5..bc81f130d37 100644
--- a/tao/tao_bridge/passes/tao_defuse_pass.h
+++ b/tao/tao_bridge/passes/tao_defuse_pass.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_PASSES_TAO_DEFUSE_PASS_H_
 #define TAO_TAO_BRIDGE_PASSES_TAO_DEFUSE_PASS_H_
 
diff --git a/tao/tao_bridge/passes/tao_feature_detector.cc b/tao/tao_bridge/passes/tao_feature_detector.cc
index fe58ff6eb65..0d43801a721 100644
--- a/tao/tao_bridge/passes/tao_feature_detector.cc
+++ b/tao/tao_bridge/passes/tao_feature_detector.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/passes/tao_feature_detector.h"
 
 #include <sstream>
diff --git a/tao/tao_bridge/passes/tao_feature_detector.h b/tao/tao_bridge/passes/tao_feature_detector.h
index 05e4a4186e2..79cf24b8336 100644
--- a/tao/tao_bridge/passes/tao_feature_detector.h
+++ b/tao/tao_bridge/passes/tao_feature_detector.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #pragma once
 
diff --git a/tao/tao_bridge/tao_util.cc b/tao/tao_bridge/tao_util.cc
index 3de9095573a..cb03720bc7e 100644
--- a/tao/tao_bridge/tao_util.cc
+++ b/tao/tao_bridge/tao_util.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/tao_util.h"
 
 #include <algorithm>
diff --git a/tao/tao_bridge/tao_util.h b/tao/tao_bridge/tao_util.h
index a8c2e2cb178..2162fd7a4cb 100644
--- a/tao/tao_bridge/tao_util.h
+++ b/tao/tao_bridge/tao_util.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TAO_TAO_BRIDGE_TAO_UTIL_H_
 #define TAO_TAO_BRIDGE_TAO_UTIL_H_
 
diff --git a/tao/tao_bridge/tf_compatible.h b/tao/tao_bridge/tf_compatible.h
index 4d30f8e3c88..8a1a40b3643 100644
--- a/tao/tao_bridge/tf_compatible.h
+++ b/tao/tao_bridge/tf_compatible.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 
 #include "tensorflow/core/public/version.h"
diff --git a/tao/tao_bridge/version.cc b/tao/tao_bridge/version.cc
index 90f5f45de86..5c9756b72b6 100644
--- a/tao/tao_bridge/version.cc
+++ b/tao/tao_bridge/version.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/version.h"
 
 #include <iostream>
diff --git a/tao/tools/download_protoc.sh b/tao/tools/download_protoc.sh
index 187ad610ced..9b6c14501d9 100755
--- a/tao/tools/download_protoc.sh
+++ b/tao/tools/download_protoc.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 function echoerr() {
     echo "$@" 1>&2;
diff --git a/tao_compiler/ci_build/tools/clean_bazel_cache.sh b/tao_compiler/ci_build/tools/clean_bazel_cache.sh
index 0a472dc6148..9663a270a42 100644
--- a/tao_compiler/ci_build/tools/clean_bazel_cache.sh
+++ b/tao_compiler/ci_build/tools/clean_bazel_cache.sh
@@ -1,1 +1,12 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 cd tf_community && bazel clean --expunge
\ No newline at end of file
diff --git a/tao_compiler/ci_build/tools/install_bazel.sh b/tao_compiler/ci_build/tools/install_bazel.sh
index 912ccde1341..2aa6ad5e38d 100644
--- a/tao_compiler/ci_build/tools/install_bazel.sh
+++ b/tao_compiler/ci_build/tools/install_bazel.sh
@@ -1,4 +1,16 @@
 #!/usr/bin/env bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 wget http://hlomodule.oss-cn-zhangjiakou.aliyuncs.com/tao_compiler/tools/bazelisk/v1.7.5/bazelisk-linux-amd64 -O /usr/local/bin/bazel
 chmod +x /usr/local/bin/bazel
diff --git a/tao_compiler/decoupling/compiler_base.cc b/tao_compiler/decoupling/compiler_base.cc
index 0730bd75790..3e3f047b660 100644
--- a/tao_compiler/decoupling/compiler_base.cc
+++ b/tao_compiler/decoupling/compiler_base.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/decoupling/compiler_base.h"
 
 namespace tensorflow {
diff --git a/tao_compiler/decoupling/compiler_base.h b/tao_compiler/decoupling/compiler_base.h
index 95ea652dcc7..d9cba9790e3 100644
--- a/tao_compiler/decoupling/compiler_base.h
+++ b/tao_compiler/decoupling/compiler_base.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TENSORFLOW_COMPILER_DECOUPLING_MLIR_COMPILER_BASE_H_
 #define TENSORFLOW_COMPILER_DECOUPLING_MLIR_COMPILER_BASE_H_
 
diff --git a/tao_compiler/decoupling/mlir_compiler.cc b/tao_compiler/decoupling/mlir_compiler.cc
index 4acc0c86816..854cc8ad7da 100644
--- a/tao_compiler/decoupling/mlir_compiler.cc
+++ b/tao_compiler/decoupling/mlir_compiler.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/decoupling/mlir_compiler.h"
 
 #include <vector>
diff --git a/tao_compiler/decoupling/mlir_compiler.h b/tao_compiler/decoupling/mlir_compiler.h
index 1d2fef39c12..7e09ff4fb09 100644
--- a/tao_compiler/decoupling/mlir_compiler.h
+++ b/tao_compiler/decoupling/mlir_compiler.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TENSORFLOW_COMPILER_DECOUPLING_MLIR_COMPILER_H_
 #define TENSORFLOW_COMPILER_DECOUPLING_MLIR_COMPILER_H_
 
diff --git a/tao_compiler/decoupling/mlir_compiler_impl_gpu.cc b/tao_compiler/decoupling/mlir_compiler_impl_gpu.cc
index 36cffcdf0cf..8a078396cad 100644
--- a/tao_compiler/decoupling/mlir_compiler_impl_gpu.cc
+++ b/tao_compiler/decoupling/mlir_compiler_impl_gpu.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/decoupling/mlir_compiler_impl_gpu.h"
 
 #include "cuda.h"
diff --git a/tao_compiler/decoupling/mlir_compiler_impl_gpu.h b/tao_compiler/decoupling/mlir_compiler_impl_gpu.h
index 7bf60d55605..46f8aef543c 100644
--- a/tao_compiler/decoupling/mlir_compiler_impl_gpu.h
+++ b/tao_compiler/decoupling/mlir_compiler_impl_gpu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TENSORFLOW_COMPILER_DECOUPLING_MLIR_COMPILER_IMPL_GPU_H_
 #define TENSORFLOW_COMPILER_DECOUPLING_MLIR_COMPILER_IMPL_GPU_H_
 
diff --git a/tao_compiler/decoupling/mlir_compiler_impl_rocm.cc b/tao_compiler/decoupling/mlir_compiler_impl_rocm.cc
index f290f336393..b6940f6c719 100644
--- a/tao_compiler/decoupling/mlir_compiler_impl_rocm.cc
+++ b/tao_compiler/decoupling/mlir_compiler_impl_rocm.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/decoupling/mlir_compiler_impl_rocm.h"
 
 #define CUDA_SUCCESS hipSuccess
diff --git a/tao_compiler/decoupling/mlir_compiler_impl_rocm.h b/tao_compiler/decoupling/mlir_compiler_impl_rocm.h
index d24fd59a73f..65eba6d9381 100644
--- a/tao_compiler/decoupling/mlir_compiler_impl_rocm.h
+++ b/tao_compiler/decoupling/mlir_compiler_impl_rocm.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TENSORFLOW_COMPILER_DECOUPLING_MLIR_COMPILER_IMPL_ROCM_H_
 #define TENSORFLOW_COMPILER_DECOUPLING_MLIR_COMPILER_IMPL_ROCM_H_
 
diff --git a/tao_compiler/decoupling/tao_compiler_trace.cc b/tao_compiler/decoupling/tao_compiler_trace.cc
index 197f428798c..30125437b51 100644
--- a/tao_compiler/decoupling/tao_compiler_trace.cc
+++ b/tao_compiler/decoupling/tao_compiler_trace.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/decoupling/tao_compiler_trace.h"
 
 #include <fstream>
diff --git a/tao_compiler/decoupling/tao_compiler_trace.h b/tao_compiler/decoupling/tao_compiler_trace.h
index 9b48484a848..ee2776acb67 100644
--- a/tao_compiler/decoupling/tao_compiler_trace.h
+++ b/tao_compiler/decoupling/tao_compiler_trace.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TENSORFLOW_COMPILER_DECOUPLING_TAO_COMPILER_TRACE_H_
 #define TENSORFLOW_COMPILER_DECOUPLING_TAO_COMPILER_TRACE_H_
 
diff --git a/tao_compiler/mlir/disc/transforms/disc_lower_gpu_ops_to_nvvm_ops.cc b/tao_compiler/mlir/disc/transforms/disc_lower_gpu_ops_to_nvvm_ops.cc
index 749d91180bf..a4212a8fd91 100644
--- a/tao_compiler/mlir/disc/transforms/disc_lower_gpu_ops_to_nvvm_ops.cc
+++ b/tao_compiler/mlir/disc/transforms/disc_lower_gpu_ops_to_nvvm_ops.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 //===- LowerGpuOpsToNVVMOps.cpp - MLIR GPU to NVVM lowering passes --------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
diff --git a/tao_compiler/mlir/disc/transforms/disc_lower_gpu_ops_to_rocdl_ops.cc b/tao_compiler/mlir/disc/transforms/disc_lower_gpu_ops_to_rocdl_ops.cc
index dc19c9f1806..9e8f49845a4 100644
--- a/tao_compiler/mlir/disc/transforms/disc_lower_gpu_ops_to_rocdl_ops.cc
+++ b/tao_compiler/mlir/disc/transforms/disc_lower_gpu_ops_to_rocdl_ops.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 //===- LowerGpuOpsToROCDLOps.cpp - MLIR GPU to ROCDL lowering passes ------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
diff --git a/tao_compiler/mlir/disc/transforms/disc_unhandled_atomic_rmw_converter.cc b/tao_compiler/mlir/disc/transforms/disc_unhandled_atomic_rmw_converter.cc
index d4e1f213284..3e1692a8f60 100644
--- a/tao_compiler/mlir/disc/transforms/disc_unhandled_atomic_rmw_converter.cc
+++ b/tao_compiler/mlir/disc/transforms/disc_unhandled_atomic_rmw_converter.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "mlir/Dialect/MemRef/IR/MemRef.h"               // TF:llvm-project
 #include "mlir/Dialect/StandardOps/IR/Ops.h"             // TF:llvm-project
 #include "mlir/IR/Location.h"                            // TF:llvm-project
diff --git a/tao_compiler/mlir/disc/transforms/dot_rewriter.cc b/tao_compiler/mlir/disc/transforms/dot_rewriter.cc
index 211ee74018c..6bfd2d16b1f 100644
--- a/tao_compiler/mlir/disc/transforms/dot_rewriter.cc
+++ b/tao_compiler/mlir/disc/transforms/dot_rewriter.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 
 // This pass converts DotOp into DotGeneralOp, and folds transpose into
diff --git a/tao_compiler/mlir/disc/transforms/legalize_to_cubin.cc b/tao_compiler/mlir/disc/transforms/legalize_to_cubin.cc
index 35ebda05c7f..45da52bea5a 100644
--- a/tao_compiler/mlir/disc/transforms/legalize_to_cubin.cc
+++ b/tao_compiler/mlir/disc/transforms/legalize_to_cubin.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 //===- ConvertKernelFuncToCubin.cpp - MLIR GPU lowering passes ------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
diff --git a/tao_compiler/mlir/disc/transforms/mhlo_mark_shape_calc.cc b/tao_compiler/mlir/disc/transforms/mhlo_mark_shape_calc.cc
index 40283c83f5e..6aab549aa64 100644
--- a/tao_compiler/mlir/disc/transforms/mhlo_mark_shape_calc.cc
+++ b/tao_compiler/mlir/disc/transforms/mhlo_mark_shape_calc.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/StringRef.h"
diff --git a/tao_compiler/mlir/disc/transforms/mhlo_placer.cc b/tao_compiler/mlir/disc/transforms/mhlo_placer.cc
index 1160c4c24d9..7c62cc15bef 100644
--- a/tao_compiler/mlir/disc/transforms/mhlo_placer.cc
+++ b/tao_compiler/mlir/disc/transforms/mhlo_placer.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/Debug.h"
diff --git a/tao_compiler/mlir/disc/transforms/parallel_loop_collapsing.cc b/tao_compiler/mlir/disc/transforms/parallel_loop_collapsing.cc
index 7ace58bb4d2..6ef87afc7c4 100644
--- a/tao_compiler/mlir/disc/transforms/parallel_loop_collapsing.cc
+++ b/tao_compiler/mlir/disc/transforms/parallel_loop_collapsing.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 //===- ParallelLoopCollapsing.cpp - Pass collapsing parallel loop indices -===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
diff --git a/tao_compiler/mlir/disc/transforms/parallel_loop_tiling.cc b/tao_compiler/mlir/disc/transforms/parallel_loop_tiling.cc
index 20936aa0bc0..7e8568bdb9c 100644
--- a/tao_compiler/mlir/disc/transforms/parallel_loop_tiling.cc
+++ b/tao_compiler/mlir/disc/transforms/parallel_loop_tiling.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 //===- ParallelLoopTiling.cpp - Tiles scf.parallel ---------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
diff --git a/tao_compiler/mlir/disc/transforms/placement_utils.cc b/tao_compiler/mlir/disc/transforms/placement_utils.cc
index 89594acc491..2c261e635e8 100644
--- a/tao_compiler/mlir/disc/transforms/placement_utils.cc
+++ b/tao_compiler/mlir/disc/transforms/placement_utils.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include "placement_utils.h"
 
diff --git a/tao_compiler/mlir/disc/transforms/placement_utils.h b/tao_compiler/mlir/disc/transforms/placement_utils.h
index 70ffc95595d..0e7b2ad568c 100644
--- a/tao_compiler/mlir/disc/transforms/placement_utils.h
+++ b/tao_compiler/mlir/disc/transforms/placement_utils.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
diff --git a/tao_compiler/mlir/disc/transforms/revise_args_for_static_rank.cc b/tao_compiler/mlir/disc/transforms/revise_args_for_static_rank.cc
index 6b89ec1c4b2..56fe73b5c16 100644
--- a/tao_compiler/mlir/disc/transforms/revise_args_for_static_rank.cc
+++ b/tao_compiler/mlir/disc/transforms/revise_args_for_static_rank.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/StringRef.h"
diff --git a/tao_compiler/mlir/disc/transforms/revise_kernel_outlining.cc b/tao_compiler/mlir/disc/transforms/revise_kernel_outlining.cc
index f3cd42df077..699de12be3a 100644
--- a/tao_compiler/mlir/disc/transforms/revise_kernel_outlining.cc
+++ b/tao_compiler/mlir/disc/transforms/revise_kernel_outlining.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 //===- KernelOutlining.cpp - Implementation of GPU kernel outlining -------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
diff --git a/tao_compiler/mlir/xla/ral/context/base/cuda/cuda_stream.cc b/tao_compiler/mlir/xla/ral/context/base/cuda/cuda_stream.cc
index d63c45b7703..3706202e95d 100644
--- a/tao_compiler/mlir/xla/ral/context/base/cuda/cuda_stream.cc
+++ b/tao_compiler/mlir/xla/ral/context/base/cuda/cuda_stream.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/mlir/xla/ral/context/base/cuda/cuda_stream.h"
 
 namespace tao {
diff --git a/tao_compiler/mlir/xla/ral/context/base/cuda/cuda_stream.h b/tao_compiler/mlir/xla/ral/context/base/cuda/cuda_stream.h
index 693f4f4c12e..79da13b7560 100644
--- a/tao_compiler/mlir/xla/ral/context/base/cuda/cuda_stream.h
+++ b/tao_compiler/mlir/xla/ral/context/base/cuda/cuda_stream.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #pragma once
 #include "tensorflow/stream_executor/gpu/gpu_executor.h"
 #include "tensorflow/stream_executor/gpu/gpu_stream.h"
diff --git a/tao_compiler/mlir/xla/ral/context/common_context_impl.cc b/tao_compiler/mlir/xla/ral/context/common_context_impl.cc
index 08fcd9d7fc0..07314f031b9 100644
--- a/tao_compiler/mlir/xla/ral/context/common_context_impl.cc
+++ b/tao_compiler/mlir/xla/ral/context/common_context_impl.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include "tensorflow/compiler/mlir/xla/ral/context/common_context_impl.h"
 
diff --git a/tao_compiler/mlir/xla/ral/context/common_context_impl.h b/tao_compiler/mlir/xla/ral/context/common_context_impl.h
index 0d71cac9d82..f6b2e0f39ba 100644
--- a/tao_compiler/mlir/xla/ral/context/common_context_impl.h
+++ b/tao_compiler/mlir/xla/ral/context/common_context_impl.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #ifndef TENSORFLOW_COMPILER_MLIR_XLA_RAL_CONTEXT_COMMON_CONTEXT_IMPL_H_
 #define TENSORFLOW_COMPILER_MLIR_XLA_RAL_CONTEXT_COMMON_CONTEXT_IMPL_H_
diff --git a/tao_compiler/mlir/xla/ral/context/common_context_impl_cuda.cc b/tao_compiler/mlir/xla/ral/context/common_context_impl_cuda.cc
index 56c88731eab..4aebb6924e7 100644
--- a/tao_compiler/mlir/xla/ral/context/common_context_impl_cuda.cc
+++ b/tao_compiler/mlir/xla/ral/context/common_context_impl_cuda.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include <fcntl.h>
 
diff --git a/tao_compiler/mlir/xla/ral/context/context_util.h b/tao_compiler/mlir/xla/ral/context/context_util.h
index e6bb89cc60e..404612b2453 100644
--- a/tao_compiler/mlir/xla/ral/context/context_util.h
+++ b/tao_compiler/mlir/xla/ral/context/context_util.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #ifndef TENSORFLOW_COMPILER_MLIR_XLA_RAL_CONTEXT_CONTEXT_UTIL_H_
 #define TENSORFLOW_COMPILER_MLIR_XLA_RAL_CONTEXT_CONTEXT_UTIL_H_
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/atomic.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/atomic.cu.h
index ecf5fc31ed9..5c2e49a20cb 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/atomic.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/atomic.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_SORT_ATOMIC_H_
 #define DYN_SORT_ATOMIC_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/bitonic_sort.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/bitonic_sort.cu.h
index d4931a37317..2e7073c47ad 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/bitonic_sort.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/bitonic_sort.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_SORT_BITONIC_SORT_H_
 #define DYN_SORT_BITONIC_SORT_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/dynamic_sort.cu.cc b/tao_compiler/mlir/xla/ral/context/custom_library/dynamic_sort.cu.cc
index 48a9ad5cc9b..b31108da031 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/dynamic_sort.cu.cc
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/dynamic_sort.cu.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/mlir/xla/ral/context/custom_library/dynamic_sort.h"
 #include "tensorflow/compiler/mlir/xla/ral/context/custom_library/tf_topk.cu.h"
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/dynamic_sort.h b/tao_compiler/mlir/xla/ral/context/custom_library/dynamic_sort.h
index e851983c888..aaef21fa764 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/dynamic_sort.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/dynamic_sort.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef AI_COMPILER_CUSTOM_LIB_DYN_SORT_H_
 #define AI_COMPILER_CUSTOM_LIB_DYN_SORT_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/filter_n_compress.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/filter_n_compress.cu.h
index 25cf324f918..1516b708d25 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/filter_n_compress.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/filter_n_compress.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_TOP_K_FILTER_K_COMPRESS_H_
 #define DYN_TOP_K_FILTER_K_COMPRESS_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/gather_topk.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/gather_topk.cu.h
index 2354af6ea5a..d9bd8312030 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/gather_topk.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/gather_topk.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_SORT_GATHER_TOP_K_H_
 #define DYN_SORT_GATHER_TOP_K_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/kth_biggest.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/kth_biggest.cu.h
index ccbb431c4ed..a00bc936855 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/kth_biggest.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/kth_biggest.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_TOP_K_KTH_BIGGEST_H_
 #define DYN_TOP_K_KTH_BIGGEST_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/philox_random.h b/tao_compiler/mlir/xla/ral/context/custom_library/philox_random.h
index 749abea99fd..1b9611be1c0 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/philox_random.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/philox_random.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TENSORFLOW_COMPILER_MLIR_XLA_RAL_CONTEXT_CUSTOM_LIBRARY_PHILOX_RANDDOM_H_
 #define TENSORFLOW_COMPILER_MLIR_XLA_RAL_CONTEXT_CUSTOM_LIBRARY_PHILOX_RANDDOM_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/random.h b/tao_compiler/mlir/xla/ral/context/custom_library/random.h
index ba13b9a151c..da466d9049d 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/random.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/random.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef RAL_CONTEXT_CUSTOM_LIBRARY_RANDOM_H_
 #define RAL_CONTEXT_CUSTOM_LIBRARY_RANDOM_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/random_gpu.cu.cc b/tao_compiler/mlir/xla/ral/context/custom_library/random_gpu.cu.cc
index ed8f976a571..a0662ac96b4 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/random_gpu.cu.cc
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/random_gpu.cu.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/mlir/xla/ral/context/custom_library/random.h"
 
 namespace tao {
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/small_top128.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/small_top128.cu.h
index a1a83315875..9393003f4cb 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/small_top128.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/small_top128.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_TOP_K_SMALL_TOP_128_H_
 #define DYN_TOP_K_SMALL_TOP_128_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/tf_topk.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/tf_topk.cu.h
index 2036bddb5d1..23565dd026b 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/tf_topk.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/tf_topk.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_SORT_TF_TOPK_IMPL_H_
 #define DYN_SORT_TF_TOPK_IMPL_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/top128.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/top128.cu.h
index 8d61a4fd4fe..b9d41eb0952 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/top128.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/top128.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_TOP_K_TOP_128_H_
 #define DYN_TOP_K_TOP_128_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/top2.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/top2.cu.h
index 54e5e9d1aea..59975447c1c 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/top2.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/top2.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_TOP_K_TOP_2_H_
 #define DYN_TOP_K_TOP_2_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/topk_sort.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/topk_sort.cu.h
index 60aad8ed6e9..1b4d1b31e2f 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/topk_sort.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/topk_sort.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_SORT_TOP_K_SORT_H_
 #define DYN_SORT_TOP_K_SORT_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/topk_util.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/topk_util.cu.h
index eb2109df311..2077b390a7a 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/topk_util.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/topk_util.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_TOP_K_INTERNAL_H_
 #define DYN_TOP_K_INTERNAL_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/warp.cu.h b/tao_compiler/mlir/xla/ral/context/custom_library/warp.cu.h
index 903d612f3b6..aeb60542fc6 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/warp.cu.h
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/warp.cu.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef DYN_SORT_WARP_H_
 #define DYN_SORT_WARP_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/dynamic_sort_impl.cc b/tao_compiler/mlir/xla/ral/context/dynamic_sort_impl.cc
index bcbea81d3f8..e15420c611c 100644
--- a/tao_compiler/mlir/xla/ral/context/dynamic_sort_impl.cc
+++ b/tao_compiler/mlir/xla/ral/context/dynamic_sort_impl.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/mlir/xla/ral/context/dynamic_sort_impl.h"
 
 #include <vector>
diff --git a/tao_compiler/mlir/xla/ral/context/dynamic_sort_impl.h b/tao_compiler/mlir/xla/ral/context/dynamic_sort_impl.h
index 2c7d2675d8c..64e6d6498eb 100644
--- a/tao_compiler/mlir/xla/ral/context/dynamic_sort_impl.h
+++ b/tao_compiler/mlir/xla/ral/context/dynamic_sort_impl.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef TENSORFLOW_COMPILER_MLIR_XLA_RAL_CUSTOM_LIB_CALL_DYNAMIC_SORT_IMPL_H_
 #define TENSORFLOW_COMPILER_MLIR_XLA_RAL_CUSTOM_LIB_CALL_DYNAMIC_SORT_IMPL_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/init_stream_executor.cc b/tao_compiler/mlir/xla/ral/context/init_stream_executor.cc
index c59b2708d23..8844af43184 100644
--- a/tao_compiler/mlir/xla/ral/context/init_stream_executor.cc
+++ b/tao_compiler/mlir/xla/ral/context/init_stream_executor.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/mlir/xla/ral/context/init_stream_executor.h"
 
 #include "tensorflow/compiler/mlir/xla/ral/context/base/cuda/cuda_stream.h"
diff --git a/tao_compiler/mlir/xla/ral/context/init_stream_executor.h b/tao_compiler/mlir/xla/ral/context/init_stream_executor.h
index 9fcc7210de9..d460a26dd88 100644
--- a/tao_compiler/mlir/xla/ral/context/init_stream_executor.h
+++ b/tao_compiler/mlir/xla/ral/context/init_stream_executor.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #ifndef RAL_CONTEXT_INIT_STREAM_EXECUTOR_H_
 #define RAL_CONTEXT_INIT_STREAM_EXECUTOR_H_
 
diff --git a/tao_compiler/mlir/xla/ral/context/random_impl.cc b/tao_compiler/mlir/xla/ral/context/random_impl.cc
index 111acabc2c3..97144ee73cb 100644
--- a/tao_compiler/mlir/xla/ral/context/random_impl.cc
+++ b/tao_compiler/mlir/xla/ral/context/random_impl.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <cassert>
 #include <mutex>
 #include <random>
diff --git a/tao_compiler/mlir/xla/ral/context/stream_executor_based_impl.cc b/tao_compiler/mlir/xla/ral/context/stream_executor_based_impl.cc
index ddda5481d84..86a627fbb8f 100644
--- a/tao_compiler/mlir/xla/ral/context/stream_executor_based_impl.cc
+++ b/tao_compiler/mlir/xla/ral/context/stream_executor_based_impl.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/mlir/xla/ral/context/stream_executor_based_impl.h"
 
 #include <functional>
diff --git a/tao_compiler/mlir/xla/ral/context/stream_executor_based_impl.h b/tao_compiler/mlir/xla/ral/context/stream_executor_based_impl.h
index 11be315b922..5ad8683f264 100644
--- a/tao_compiler/mlir/xla/ral/context/stream_executor_based_impl.h
+++ b/tao_compiler/mlir/xla/ral/context/stream_executor_based_impl.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #ifndef TENSORFLOW_COMPILER_MLIR_XLA_RAL_CONTEXT_STREAM_EXECUTOR_BASED_IMPL_H_
 #define TENSORFLOW_COMPILER_MLIR_XLA_RAL_CONTEXT_STREAM_EXECUTOR_BASED_IMPL_H_


Test patch:
diff --git a/docker/scripts/find-fastest-apt.sh b/docker/scripts/find-fastest-apt.sh
index 40357844930..8a4d10527a5 100755
--- a/docker/scripts/find-fastest-apt.sh
+++ b/docker/scripts/find-fastest-apt.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 # Returns the domain name of an URL.
 function get_domain_from_url() {
diff --git a/pytorch_blade/src/compiler/jit/shape_type_test.cpp b/pytorch_blade/src/compiler/jit/shape_type_test.cpp
index 5e08ed361c2..e4edd8f1c83 100644
--- a/pytorch_blade/src/compiler/jit/shape_type_test.cpp
+++ b/pytorch_blade/src/compiler/jit/shape_type_test.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <gtest/gtest.h>
 
 #include <vector>
diff --git a/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register_test.cpp b/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register_test.cpp
index e48b42694a5..3d887577a8d 100644
--- a/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register_test.cpp
+++ b/pytorch_blade/src/compiler/mlir/converters/mhlo_converter_register_test.cpp
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <gtest/gtest.h>
 
 #include "compiler/mlir/converters/mhlo_conversion.h"
diff --git a/pytorch_blade/tests/__init__.py b/pytorch_blade/tests/__init__.py
index e69de29bb2d..57249d7142e 100644
--- a/pytorch_blade/tests/__init__.py
+++ b/pytorch_blade/tests/__init__.py
@@ -0,0 +1,11 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
diff --git a/pytorch_blade/tests/mlir/__init__.py b/pytorch_blade/tests/mlir/__init__.py
index d25d2bbaecd..4fd86d3e86e 100644
--- a/pytorch_blade/tests/mlir/__init__.py
+++ b/pytorch_blade/tests/mlir/__init__.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 from torch_blade.mlir import is_available
 
diff --git a/pytorch_blade/tests/mlir/test_disc_activation.py b/pytorch_blade/tests/mlir/test_disc_activation.py
index 407c20c76ab..5da3a50cd55 100644
--- a/pytorch_blade/tests/mlir/test_disc_activation.py
+++ b/pytorch_blade/tests/mlir/test_disc_activation.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_batchnorm.py b/pytorch_blade/tests/mlir/test_disc_batchnorm.py
index fe96a8f6c7f..8244b9ac666 100644
--- a/pytorch_blade/tests/mlir/test_disc_batchnorm.py
+++ b/pytorch_blade/tests/mlir/test_disc_batchnorm.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_binary_ops.py b/pytorch_blade/tests/mlir/test_disc_binary_ops.py
index c1251b060d2..9848de8109f 100644
--- a/pytorch_blade/tests/mlir/test_disc_binary_ops.py
+++ b/pytorch_blade/tests/mlir/test_disc_binary_ops.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 import torch_blade
diff --git a/pytorch_blade/tests/mlir/test_disc_black_ops.py b/pytorch_blade/tests/mlir/test_disc_black_ops.py
index 8559bc02388..28b161c6f7a 100644
--- a/pytorch_blade/tests/mlir/test_disc_black_ops.py
+++ b/pytorch_blade/tests/mlir/test_disc_black_ops.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_block_ops.py b/pytorch_blade/tests/mlir/test_disc_block_ops.py
index 939279b6658..84d883da608 100644
--- a/pytorch_blade/tests/mlir/test_disc_block_ops.py
+++ b/pytorch_blade/tests/mlir/test_disc_block_ops.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_broadcast.py b/pytorch_blade/tests/mlir/test_disc_broadcast.py
index c22efc1ae29..a337f3e657e 100644
--- a/pytorch_blade/tests/mlir/test_disc_broadcast.py
+++ b/pytorch_blade/tests/mlir/test_disc_broadcast.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_const.py b/pytorch_blade/tests/mlir/test_disc_const.py
index c548c389673..40372c74ea2 100644
--- a/pytorch_blade/tests/mlir/test_disc_const.py
+++ b/pytorch_blade/tests/mlir/test_disc_const.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_conv_ops.py b/pytorch_blade/tests/mlir/test_disc_conv_ops.py
index 4d3d31fdbd6..254c776bb54 100644
--- a/pytorch_blade/tests/mlir/test_disc_conv_ops.py
+++ b/pytorch_blade/tests/mlir/test_disc_conv_ops.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import torch_blade
 import unittest
diff --git a/pytorch_blade/tests/mlir/test_disc_engine.py b/pytorch_blade/tests/mlir/test_disc_engine.py
index 0e85ea7fc83..ba608c9352c 100644
--- a/pytorch_blade/tests/mlir/test_disc_engine.py
+++ b/pytorch_blade/tests/mlir/test_disc_engine.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 import torch
 
diff --git a/pytorch_blade/tests/mlir/test_disc_list.py b/pytorch_blade/tests/mlir/test_disc_list.py
index 82795d16f64..4bb3d4811ee 100644
--- a/pytorch_blade/tests/mlir/test_disc_list.py
+++ b/pytorch_blade/tests/mlir/test_disc_list.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_matmul.py b/pytorch_blade/tests/mlir/test_disc_matmul.py
index c4b597bfa7d..59de77499a4 100644
--- a/pytorch_blade/tests/mlir/test_disc_matmul.py
+++ b/pytorch_blade/tests/mlir/test_disc_matmul.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_multi_streams.py b/pytorch_blade/tests/mlir/test_disc_multi_streams.py
index f8ddee4be91..c3a0c13130c 100644
--- a/pytorch_blade/tests/mlir/test_disc_multi_streams.py
+++ b/pytorch_blade/tests/mlir/test_disc_multi_streams.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_nn_ops.py b/pytorch_blade/tests/mlir/test_disc_nn_ops.py
index 85c06b5f2db..0048f388d73 100644
--- a/pytorch_blade/tests/mlir/test_disc_nn_ops.py
+++ b/pytorch_blade/tests/mlir/test_disc_nn_ops.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_reduction.py b/pytorch_blade/tests/mlir/test_disc_reduction.py
index f5d42347718..90a67e326f7 100644
--- a/pytorch_blade/tests/mlir/test_disc_reduction.py
+++ b/pytorch_blade/tests/mlir/test_disc_reduction.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 from unittest import skip
diff --git a/pytorch_blade/tests/mlir/test_disc_reshape.py b/pytorch_blade/tests/mlir/test_disc_reshape.py
index 020dbe50eb5..3a1c024447a 100644
--- a/pytorch_blade/tests/mlir/test_disc_reshape.py
+++ b/pytorch_blade/tests/mlir/test_disc_reshape.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 from typing import List
 import unittest
diff --git a/pytorch_blade/tests/mlir/test_disc_tensor.py b/pytorch_blade/tests/mlir/test_disc_tensor.py
index b70f1f79431..efb38d88e94 100644
--- a/pytorch_blade/tests/mlir/test_disc_tensor.py
+++ b/pytorch_blade/tests/mlir/test_disc_tensor.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_tools.py b/pytorch_blade/tests/mlir/test_disc_tools.py
index 94f43b8c024..d2e3c434fc7 100644
--- a/pytorch_blade/tests/mlir/test_disc_tools.py
+++ b/pytorch_blade/tests/mlir/test_disc_tools.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 
diff --git a/pytorch_blade/tests/mlir/test_disc_unary_ops.py b/pytorch_blade/tests/mlir/test_disc_unary_ops.py
index 1f60798e1fa..be31e037624 100644
--- a/pytorch_blade/tests/mlir/test_disc_unary_ops.py
+++ b/pytorch_blade/tests/mlir/test_disc_unary_ops.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 import torch_blade
diff --git a/pytorch_blade/tests/mlir/testing_utils.py b/pytorch_blade/tests/mlir/testing_utils.py
index 1af207aea1a..48fbd16ad29 100644
--- a/pytorch_blade/tests/mlir/testing_utils.py
+++ b/pytorch_blade/tests/mlir/testing_utils.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 
 from torch_blade import mlir
diff --git a/pytorch_blade/tests/run_no_init_class_subprocess.py b/pytorch_blade/tests/run_no_init_class_subprocess.py
index d3c6a843ba2..96eb4a1ad46 100644
--- a/pytorch_blade/tests/run_no_init_class_subprocess.py
+++ b/pytorch_blade/tests/run_no_init_class_subprocess.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import sys
 import torch
 import torch_blade  # noqa: F401
diff --git a/pytorch_blade/tests/test_algorithm.py b/pytorch_blade/tests/test_algorithm.py
index acbec207700..ab981dfa47d 100644
--- a/pytorch_blade/tests/test_algorithm.py
+++ b/pytorch_blade/tests/test_algorithm.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 import torch_blade.algorithm as algorithm
 
diff --git a/pytorch_blade/tests/test_almost_equal.py b/pytorch_blade/tests/test_almost_equal.py
index ffa2e506c3a..585bb5b515e 100644
--- a/pytorch_blade/tests/test_almost_equal.py
+++ b/pytorch_blade/tests/test_almost_equal.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 import copy
diff --git a/pytorch_blade/tests/test_config.py b/pytorch_blade/tests/test_config.py
index d4626cb47d8..6844083e0d4 100644
--- a/pytorch_blade/tests/test_config.py
+++ b/pytorch_blade/tests/test_config.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 
 from torch_blade.config import Config
diff --git a/pytorch_blade/tests/test_contiguous.py b/pytorch_blade/tests/test_contiguous.py
index 40b04a1646e..12aacab3cae 100644
--- a/pytorch_blade/tests/test_contiguous.py
+++ b/pytorch_blade/tests/test_contiguous.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import torch
 import unittest
 from torch_blade.testing.common_utils import TestCase
diff --git a/pytorch_blade/tests/test_export.py b/pytorch_blade/tests/test_export.py
index 6e2a5f93553..105228be798 100644
--- a/pytorch_blade/tests/test_export.py
+++ b/pytorch_blade/tests/test_export.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 import torch
 import torch.nn as nn
diff --git a/pytorch_blade/tests/test_flags.py b/pytorch_blade/tests/test_flags.py
index 90438f62e82..c7c441cdaa3 100644
--- a/pytorch_blade/tests/test_flags.py
+++ b/pytorch_blade/tests/test_flags.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 
 from torch_blade import tools
diff --git a/pytorch_blade/tests/test_freeze_module.py b/pytorch_blade/tests/test_freeze_module.py
index e0a6ee9fa14..39bc867d8f8 100644
--- a/pytorch_blade/tests/test_freeze_module.py
+++ b/pytorch_blade/tests/test_freeze_module.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 import torch
 import torch_blade.tools as tools
diff --git a/pytorch_blade/tests/test_passes.py b/pytorch_blade/tests/test_passes.py
index 70eb43f44c8..e322455aba5 100644
--- a/pytorch_blade/tests/test_passes.py
+++ b/pytorch_blade/tests/test_passes.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 import torch
 from torch.testing import FileCheck
diff --git a/pytorch_blade/tests/test_python_ir_passes.py b/pytorch_blade/tests/test_python_ir_passes.py
index 86c76b8fdaf..c58e4e9ff6a 100644
--- a/pytorch_blade/tests/test_python_ir_passes.py
+++ b/pytorch_blade/tests/test_python_ir_passes.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 import torch
 from torch.testing import FileCheck
diff --git a/pytorch_blade/tests/test_record_shape.py b/pytorch_blade/tests/test_record_shape.py
index 1de8dc10a36..8be82172c7b 100644
--- a/pytorch_blade/tests/test_record_shape.py
+++ b/pytorch_blade/tests/test_record_shape.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 
 import torch
diff --git a/pytorch_blade/tests/test_tools.py b/pytorch_blade/tests/test_tools.py
index e4701f54830..58413262165 100644
--- a/pytorch_blade/tests/test_tools.py
+++ b/pytorch_blade/tests/test_tools.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 import torch
 from torch.testing import FileCheck
diff --git a/pytorch_blade/tests/test_utils.py b/pytorch_blade/tests/test_utils.py
index 75ee1b391fd..0d707d0824e 100644
--- a/pytorch_blade/tests/test_utils.py
+++ b/pytorch_blade/tests/test_utils.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 import torch
 import torch_blade.utils as utils
diff --git a/pytorch_blade/torch_blade/testing/__init__.py b/pytorch_blade/torch_blade/testing/__init__.py
index e69de29bb2d..57249d7142e 100644
--- a/pytorch_blade/torch_blade/testing/__init__.py
+++ b/pytorch_blade/torch_blade/testing/__init__.py
@@ -0,0 +1,11 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
diff --git a/pytorch_blade/torch_blade/testing/common_utils.py b/pytorch_blade/torch_blade/testing/common_utils.py
index 3dbcc18e568..d372f61457f 100644
--- a/pytorch_blade/torch_blade/testing/common_utils.py
+++ b/pytorch_blade/torch_blade/testing/common_utils.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import unittest
 import re
 import time
diff --git a/scripts/ci/build_and_test.sh b/scripts/ci/build_and_test.sh
index 1ea37103ba5..df93a2f0176 100644
--- a/scripts/ci/build_and_test.sh
+++ b/scripts/ci/build_and_test.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 set -e
 
 SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
diff --git a/scripts/ci/test_pytorch_blade.sh b/scripts/ci/test_pytorch_blade.sh
index 7ddca0d27b3..3a5addc8b14 100644
--- a/scripts/ci/test_pytorch_blade.sh
+++ b/scripts/ci/test_pytorch_blade.sh
@@ -1,4 +1,16 @@
 #!/bin/bash
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 set -ex
 SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
 # bazel cache
diff --git a/tao/python/tests/__init__.py b/tao/python/tests/__init__.py
index e69de29bb2d..57249d7142e 100644
--- a/tao/python/tests/__init__.py
+++ b/tao/python/tests/__init__.py
@@ -0,0 +1,11 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
diff --git a/tao/python/tests/test_import.py b/tao/python/tests/test_import.py
index 029e46a4765..2434e711a5c 100644
--- a/tao/python/tests/test_import.py
+++ b/tao/python/tests/test_import.py
@@ -1,3 +1,14 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
 import blade_disc_tf as disc
 from unittest import TestCase
 
diff --git a/tao/tao_bridge/common_test.cc b/tao/tao_bridge/common_test.cc
index 06711d53631..0f020a5a966 100644
--- a/tao/tao_bridge/common_test.cc
+++ b/tao/tao_bridge/common_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/common.h"
 
 #include <stdlib.h>
diff --git a/tao/tao_bridge/cuda_utils_test.cc b/tao/tao_bridge/cuda_utils_test.cc
index 6bf02702ebd..b505e661cb5 100644
--- a/tao/tao_bridge/cuda_utils_test.cc
+++ b/tao/tao_bridge/cuda_utils_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/cuda_utils.h"
 
 #include <dlfcn.h>
diff --git a/tao/tao_bridge/dumper_common_test.cc b/tao/tao_bridge/dumper_common_test.cc
index 07004bb59b8..c4de5e503f0 100644
--- a/tao/tao_bridge/dumper_common_test.cc
+++ b/tao/tao_bridge/dumper_common_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/dumper_common.h"
 
 #include <stdlib.h>
diff --git a/tao/tao_bridge/errors_test.cc b/tao/tao_bridge/errors_test.cc
index d67b51491da..47c5fbf36ce 100644
--- a/tao/tao_bridge/errors_test.cc
+++ b/tao/tao_bridge/errors_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/core/lib/core/errors.h"
 
 #include "tao_bridge/errors.h"
diff --git a/tao/tao_bridge/passes/tao_bace_reformat_pass_test.cc b/tao/tao_bridge/passes/tao_bace_reformat_pass_test.cc
index 6024b884d5b..8f66d325b8e 100644
--- a/tao/tao_bridge/passes/tao_bace_reformat_pass_test.cc
+++ b/tao/tao_bridge/passes/tao_bace_reformat_pass_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/passes/tao_bace_reformat_pass.h"
 
 #include <sstream>
diff --git a/tao/tao_bridge/passes/tao_clone_constants_for_better_clustering_test.cc b/tao/tao_bridge/passes/tao_clone_constants_for_better_clustering_test.cc
index c9804b0596a..9fe437d9c62 100644
--- a/tao/tao_bridge/passes/tao_clone_constants_for_better_clustering_test.cc
+++ b/tao/tao_bridge/passes/tao_clone_constants_for_better_clustering_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/passes/tao_clone_constants_for_better_clustering.h"
 
 #include <sstream>
diff --git a/tao/tao_bridge/passes/tao_defuse_pass_test.cc b/tao/tao_bridge/passes/tao_defuse_pass_test.cc
index f3f77eb512b..92847a82ce5 100644
--- a/tao/tao_bridge/passes/tao_defuse_pass_test.cc
+++ b/tao/tao_bridge/passes/tao_defuse_pass_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/passes/tao_defuse_pass.h"
 
 #include <sstream>
diff --git a/tao/tao_bridge/passes/tao_remove_small_cluster_pass_test.cc b/tao/tao_bridge/passes/tao_remove_small_cluster_pass_test.cc
index a9ca9545591..47de25f89aa 100644
--- a/tao/tao_bridge/passes/tao_remove_small_cluster_pass_test.cc
+++ b/tao/tao_bridge/passes/tao_remove_small_cluster_pass_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/passes/tao_remove_small_cluster_pass.h"
 
 #include <sstream>
diff --git a/tao/tao_bridge/tao_util_test.cc b/tao/tao_bridge/tao_util_test.cc
index 919432fd92d..0b543fc5a1c 100644
--- a/tao/tao_bridge/tao_util_test.cc
+++ b/tao/tao_bridge/tao_util_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tao_bridge/tao_util.h"
 
 #include <string>
diff --git a/tao/tao_bridge/test/__init__.py b/tao/tao_bridge/test/__init__.py
index e69de29bb2d..57249d7142e 100644
--- a/tao/tao_bridge/test/__init__.py
+++ b/tao/tao_bridge/test/__init__.py
@@ -0,0 +1,11 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
diff --git a/tao/tao_bridge/test/gpu/__init__.py b/tao/tao_bridge/test/gpu/__init__.py
index e69de29bb2d..57249d7142e 100644
--- a/tao/tao_bridge/test/gpu/__init__.py
+++ b/tao/tao_bridge/test/gpu/__init__.py
@@ -0,0 +1,11 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
diff --git a/tao/tao_bridge/test/gpu/mlir/__init__.py b/tao/tao_bridge/test/gpu/mlir/__init__.py
index e69de29bb2d..57249d7142e 100644
--- a/tao/tao_bridge/test/gpu/mlir/__init__.py
+++ b/tao/tao_bridge/test/gpu/mlir/__init__.py
@@ -0,0 +1,11 @@
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
diff --git a/tao/tao_bridge/test/gpu/mlir/base.py b/tao/tao_bridge/test/gpu/mlir/base.py
index f01c565feeb..e64d053167b 100644
--- a/tao/tao_bridge/test/gpu/mlir/base.py
+++ b/tao/tao_bridge/test/gpu/mlir/base.py
@@ -1,4 +1,16 @@
 #!/usr/bin/env python
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 from __future__ import print_function
 import os
 from test.tao_ut_common import TaoTestCase
diff --git a/tao/tao_bridge/test/gpu/mlir/test_mlir.py b/tao/tao_bridge/test/gpu/mlir/test_mlir.py
index afa303e9381..47721e36437 100644
--- a/tao/tao_bridge/test/gpu/mlir/test_mlir.py
+++ b/tao/tao_bridge/test/gpu/mlir/test_mlir.py
@@ -1,4 +1,16 @@
 #!/usr/bin/env python
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 from __future__ import print_function
 from test.tao_ut_common import *
 from test.gpu.mlir.base import MlirTestCase
diff --git a/tao/tao_bridge/test/gpu/mlir/test_mlir_static_rank_cache.py b/tao/tao_bridge/test/gpu/mlir/test_mlir_static_rank_cache.py
index 8704c3c7d11..649fa167477 100644
--- a/tao/tao_bridge/test/gpu/mlir/test_mlir_static_rank_cache.py
+++ b/tao/tao_bridge/test/gpu/mlir/test_mlir_static_rank_cache.py
@@ -1,4 +1,16 @@
 #!/usr/bin/env python
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 from __future__ import print_function
 import unittest
 
diff --git a/tao/tao_bridge/test/tao_ut_common.py b/tao/tao_bridge/test/tao_ut_common.py
index c3ea9996a83..e0e09180f89 100644
--- a/tao/tao_bridge/test/tao_ut_common.py
+++ b/tao/tao_bridge/test/tao_ut_common.py
@@ -1,4 +1,16 @@
 #!/usr/bin/env python
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 from __future__ import print_function
 
 import datetime as dt
diff --git a/tao_compiler/decoupling/tao_compiler_trace_test.cc b/tao_compiler/decoupling/tao_compiler_trace_test.cc
index 6aff47205a6..2712d3749b5 100644
--- a/tao_compiler/decoupling/tao_compiler_trace_test.cc
+++ b/tao_compiler/decoupling/tao_compiler_trace_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/decoupling/tao_compiler_trace.h"
 
 #include <fstream>
diff --git a/tao_compiler/mlir/disc/tests/mlir_feature_test.cc b/tao_compiler/mlir/disc/tests/mlir_feature_test.cc
index 3111f639006..478f93f9186 100644
--- a/tao_compiler/mlir/disc/tests/mlir_feature_test.cc
+++ b/tao_compiler/mlir/disc/tests/mlir_feature_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/mlir/disc/tests/mlir_feature_test.h"
 
 #include <stdio.h>
diff --git a/tao_compiler/mlir/disc/tests/mlir_feature_test.h b/tao_compiler/mlir/disc/tests/mlir_feature_test.h
index 6685897e2ce..35a044a061a 100644
--- a/tao_compiler/mlir/disc/tests/mlir_feature_test.h
+++ b/tao_compiler/mlir/disc/tests/mlir_feature_test.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #include <string>
 #include <vector>
diff --git a/tao_compiler/mlir/disc/tests/mlir_test.cc b/tao_compiler/mlir/disc/tests/mlir_test.cc
index c3283471a45..1bab6dd2f01 100644
--- a/tao_compiler/mlir/disc/tests/mlir_test.cc
+++ b/tao_compiler/mlir/disc/tests/mlir_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/mlir/disc/tests/mlir_test.h"
 
 #include <dlfcn.h>
diff --git a/tao_compiler/mlir/disc/tests/mlir_test.h b/tao_compiler/mlir/disc/tests/mlir_test.h
index 26910be1148..c0cfa1556e1 100644
--- a/tao_compiler/mlir/disc/tests/mlir_test.h
+++ b/tao_compiler/mlir/disc/tests/mlir_test.h
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 
 #ifndef TENSORFLOW_COMPILER_MLIR_XLA_TAO_TESTS_MLIR_TEST_H_
 #define TENSORFLOW_COMPILER_MLIR_XLA_TAO_TESTS_MLIR_TEST_H_
diff --git a/tao_compiler/mlir/xla/ral/context/custom_library/philox_random_test.cc b/tao_compiler/mlir/xla/ral/context/custom_library/philox_random_test.cc
index 3577bfa0c23..21883c5f746 100644
--- a/tao_compiler/mlir/xla/ral/context/custom_library/philox_random_test.cc
+++ b/tao_compiler/mlir/xla/ral/context/custom_library/philox_random_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include "tensorflow/compiler/mlir/xla/ral/context/custom_library/philox_random.h"
 
 #include <gtest/gtest.h>
diff --git a/tao_compiler/mlir/xla/ral/test/bace.py b/tao_compiler/mlir/xla/ral/test/bace.py
index e177939b51c..f1141e69e89 100644
--- a/tao_compiler/mlir/xla/ral/test/bace.py
+++ b/tao_compiler/mlir/xla/ral/test/bace.py
@@ -1,4 +1,16 @@
 #!/usr/bin/env python
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 from __future__ import print_function
 
diff --git a/tao_compiler/mlir/xla/ral/test/codgen_kernels.py b/tao_compiler/mlir/xla/ral/test/codgen_kernels.py
index e434fc81115..41ace6bb89a 100644
--- a/tao_compiler/mlir/xla/ral/test/codgen_kernels.py
+++ b/tao_compiler/mlir/xla/ral/test/codgen_kernels.py
@@ -1,4 +1,16 @@
 #!/usr/bin/env python
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 from __future__ import print_function
 
diff --git a/tao_compiler/mlir/xla/ral/test/raw_cuda_test.cc b/tao_compiler/mlir/xla/ral/test/raw_cuda_test.cc
index 3c25105dee4..84c755929fc 100644
--- a/tao_compiler/mlir/xla/ral/test/raw_cuda_test.cc
+++ b/tao_compiler/mlir/xla/ral/test/raw_cuda_test.cc
@@ -1,3 +1,14 @@
+// Copyright 2021 The BladeDISC Authors. All rights reserved.
+// Licensed 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://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.
+
 #include <dlfcn.h>
 #include <stdio.h>
 
diff --git a/tao_compiler/mlir/xla/ral/test/run.sh b/tao_compiler/mlir/xla/ral/test/run.sh
index c11337d690f..0dc6a326872 100644
--- a/tao_compiler/mlir/xla/ral/test/run.sh
+++ b/tao_compiler/mlir/xla/ral/test/run.sh
@@ -1,4 +1,16 @@
 #!/bin/sh
+# Copyright 2021 The BladeDISC Authors. All rights reserved.
+# Licensed 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://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.
+
+
 
 export CUDA_VISIBLE_DEVICES=0
 export BRIDGE_ENABLE_TAO=true