Relicense IREE under the LLVM license (#6020)
To facilitate easy movement between IREE and upstream LLVM, we are
relicensing under the same license: the Apache 2.0 License with LLVM
Exceptions (https://llvm.org/LICENSE.txt, SPDX-License-Identifier:
Apache-2.0 WITH LLVM-exception).
In addition, we are moving to a Copyright header format that attributes
copyright to "The IREE Authors" and uses a separate AUTHORS file to
keep track of contributions. For this PR, I am just listing Google, but
I will send follow-ups to list Fraunhofer IML and Nod Labs (keeping it
separate so I can get those folks approval for the precise wording).
Note that the change to the header format is to recognize the valuable
contributions from our external collaborators and as always copyright is
retained by the author.
See the announcement at
https://groups.google.com/g/iree-discuss/c/NJohLQ5rOBg
The script I used to update (almost) all the headers is at
https://gist.github.com/GMNGeoffrey/8e85e1a088f59822ab61eff01f8d4ef6
The updates from that script are all in one commit. I recommend
reviewing the other commits separately from that one. You can also see
the raw diff from that change at
https://github.com/google/iree/commit/bdb5800ea51.diff
As part of this, I had to manually fiddle with ipynb files (actually
that was the most time-consuming aspect). I changed the format of the
license headers there to just be a block of markdown text rather than
something that was for some reason executable. Also had to manually give
the cells IDs, which hopefully will have worked.
To resolve the inevitable merge conflicts, I will likely drop the
changes from the script and rerun.
Tested:
```
$ grep -r --exclude-dir=third_party "Google LLC" . | grep -v website/site
./AUTHORS:Google LLC
```
diff --git a/scripts/add_license_header.py b/scripts/add_license_header.py
index 45fc6e1..eebc17e 100755
--- a/scripts/add_license_header.py
+++ b/scripts/add_license_header.py
@@ -1,18 +1,10 @@
#!/usr/bin/env python3
-# Copyright 2020 Google LLC
+# Copyright 2020 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Prepends a license header to files that don't already have one.
By default, only operates on known filetypes but behavior can be overridden with
@@ -29,22 +21,12 @@
COPYRIGHT_PATTERN = re.compile(r"Copyright\s+\d+")
LICENSE_HEADER_FORMATTER = """{shebang}{start_comment} Copyright {year} {holder}
-{middle_comment}
-{middle_comment} Licensed under the Apache License, Version 2.0 (the "License");
-{middle_comment} you may not use this file except in compliance with the License.
-{middle_comment} You may obtain a copy of the License at
-{middle_comment}
-{middle_comment} https://www.apache.org/licenses/LICENSE-2.0
-{middle_comment}
-{middle_comment} Unless required by applicable law or agreed to in writing, software
-{middle_comment} distributed under the License is distributed on an "AS IS" BASIS,
-{middle_comment} WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-{middle_comment} See the License for the specific language governing permissions and
-{middle_comment} limitations under the License.{end_comment}
+{middle_comment} Licensed under the Apache License v2.0 with LLVM Exceptions.
+{middle_comment} See https://llvm.org/LICENSE.txt for license information.
+{middle_comment} SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception{end_comment}
"""
-
class CommentSyntax(object):
def __init__(self, start_comment, middle_comment=None, end_comment=""):
@@ -118,8 +100,8 @@
current_year),
default=current_year)
parser.add_argument("--holder",
- help="Copyright holder. Default: Google LLC",
- default="Google LLC")
+ help="Copyright holder. Default: The IREE Authors",
+ default="The IREE Authors")
parser.add_argument(
"--quiet",
help=("Don't raise a runtime error on encountering an unhandled filetype."
diff --git a/scripts/android_symbolize.sh b/scripts/android_symbolize.sh
index 984c1d2..6f31bad 100755
--- a/scripts/android_symbolize.sh
+++ b/scripts/android_symbolize.sh
@@ -1,18 +1,10 @@
#!/bin/bash
-# Copyright 2020 Google LLC
+# Copyright 2020 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Reads text from stdin containing stack frames in the format
# `#3 0x5b09835a14 (/data/local/tmp/iree-benchmark-module+0x18aa14)`
diff --git a/scripts/check_tabs.sh b/scripts/check_tabs.sh
index b57db26..3826dba 100755
--- a/scripts/check_tabs.sh
+++ b/scripts/check_tabs.sh
@@ -1,18 +1,10 @@
#!/bin/bash
-# Copyright 2020 Google LLC
+# Copyright 2020 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Checks for tabs in files modified vs the specified reference commit (default
# "main")
diff --git a/scripts/get_e2e_artifacts.py b/scripts/get_e2e_artifacts.py
index 0d9eb54..bc3ee48 100755
--- a/scripts/get_e2e_artifacts.py
+++ b/scripts/get_e2e_artifacts.py
@@ -1,18 +1,10 @@
#!/usr/bin/env python3
-# Copyright 2020 Google LLC
+# Copyright 2020 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Runs all E2E TensorFlow tests and extracts their benchmarking artifacts.
Example usages:
diff --git a/scripts/git/bazel_to_cmake.sh b/scripts/git/bazel_to_cmake.sh
index bd7fb79..7942863 100755
--- a/scripts/git/bazel_to_cmake.sh
+++ b/scripts/git/bazel_to_cmake.sh
@@ -1,18 +1,10 @@
#!/bin/bash
-# Copyright 2020 Google LLC
+# Copyright 2020 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Creates a PR based on the specified BASE_BRANCH (default "google") to fix
# CMake files based on Bazel BUILD files.
diff --git a/scripts/git/fix_copybara_export.sh b/scripts/git/fix_copybara_export.sh
index 2f58dae..d8e7e6e 100755
--- a/scripts/git/fix_copybara_export.sh
+++ b/scripts/git/fix_copybara_export.sh
@@ -1,17 +1,9 @@
#!/bin/bash
-# Copyright 2021 Google LLC
+# Copyright 2021 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Fixes a Copybara push that failed to create a merge commit, using the
# COPYBARA_TAG label to add a second parent to the HEAD commit. This should be
diff --git a/scripts/git/git_update.sh b/scripts/git/git_update.sh
index 56fab02..38160cf 100755
--- a/scripts/git/git_update.sh
+++ b/scripts/git/git_update.sh
@@ -1,18 +1,10 @@
#!/bin/bash
-# Copyright 2020 Google LLC
+# Copyright 2020 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Checks out and updates the specified branch to match the corresponding branch
# on UPSTREAM_REMOTE (default "upstream")
diff --git a/scripts/git/google_to_main.sh b/scripts/git/google_to_main.sh
index b00fd9a..ec20185 100755
--- a/scripts/git/google_to_main.sh
+++ b/scripts/git/google_to_main.sh
@@ -1,18 +1,10 @@
#!/bin/bash
-# Copyright 2020 Google LLC
+# Copyright 2020 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Checks out a branch at the specified green commit (default "google") and
# creates a PR from that branch based on main.
diff --git a/scripts/git/main_to_google.sh b/scripts/git/main_to_google.sh
index b9e56ae..571adea 100755
--- a/scripts/git/main_to_google.sh
+++ b/scripts/git/main_to_google.sh
@@ -1,18 +1,10 @@
#!/bin/bash
-# Copyright 2020 Google LLC
+# Copyright 2020 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Checks out a branch at the specified green commit (default "main") and
# creates a PR from that branch based on google.
diff --git a/scripts/git/submodule_versions.py b/scripts/git/submodule_versions.py
index 38eb3eb..cd3a9f1 100755
--- a/scripts/git/submodule_versions.py
+++ b/scripts/git/submodule_versions.py
@@ -1,18 +1,10 @@
#!/usr/bin/env python3
# Lint as: python3
-# Copyright 2019 Google LLC
+# Copyright 2019 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# pylint: disable=missing-docstring
"""submodule_versions.
diff --git a/scripts/git/summarize_changes.sh b/scripts/git/summarize_changes.sh
index 41f412f..33f7794 100755
--- a/scripts/git/summarize_changes.sh
+++ b/scripts/git/summarize_changes.sh
@@ -1,18 +1,10 @@
#!/bin/bash
-# Copyright 2020 Google LLC
+# Copyright 2020 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Creates a commit summary of commits between the specified refs.
#
diff --git a/scripts/git/update_llvm_dependent_submodules.sh b/scripts/git/update_llvm_dependent_submodules.sh
index 19e5422..1041326 100755
--- a/scripts/git/update_llvm_dependent_submodules.sh
+++ b/scripts/git/update_llvm_dependent_submodules.sh
@@ -1,18 +1,10 @@
#!/bin/bash
-# Copyright 2020 Google LLC
+# Copyright 2020 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Creates a PR based on the specified BASE_BRANCH (default "google") to update
# the LLVM-dependent submodules to the configured commits.
diff --git a/scripts/git/update_to_llvm_syncpoint.py b/scripts/git/update_to_llvm_syncpoint.py
index 4aad911..1c566c5 100755
--- a/scripts/git/update_to_llvm_syncpoint.py
+++ b/scripts/git/update_to_llvm_syncpoint.py
@@ -1,17 +1,9 @@
#!/usr/bin/env python3
-# Copyright 2019 Google LLC
+# Copyright 2019 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# pylint: disable=missing-docstring
"""Updates LLVM-dependent submodules based on the current LLVM commit.
diff --git a/scripts/git/utils.py b/scripts/git/utils.py
index cbeb29e..30c9ca6 100644
--- a/scripts/git/utils.py
+++ b/scripts/git/utils.py
@@ -1,17 +1,9 @@
# Lint as: python3
-# Copyright 2019 Google LLC
+# Copyright 2019 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# pylint: disable=missing-docstring
diff --git a/scripts/run_buildifier.sh b/scripts/run_buildifier.sh
index f0b9dda..298c4ac 100755
--- a/scripts/run_buildifier.sh
+++ b/scripts/run_buildifier.sh
@@ -1,18 +1,10 @@
#!/bin/bash
-# Copyright 2021 Google LLC
+# Copyright 2021 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Checks buildifier formatting and lint in files modified vs the specified
# reference commit (default "main")
diff --git a/scripts/utils.py b/scripts/utils.py
index 313dd65..1aff78a 100644
--- a/scripts/utils.py
+++ b/scripts/utils.py
@@ -1,17 +1,9 @@
# Lint as: python3
-# Copyright 2020 Google LLC
+# Copyright 2020 The IREE Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# pylint: disable=missing-docstring