From 1e76b44462c068e343fb6e205370fda48d4bfffa Mon Sep 17 00:00:00 2001 From: Ivan Butygin Date: Tue, 24 Sep 2024 04:48:57 +0200 Subject: [PATCH] Make project reuse compatible Signed-off-by: Ivan Butygin --- .github/workflows/ci.yaml | 4 + .github/workflows/perf.yaml | 4 + .github/workflows/pre-commit.yaml | 4 + .github/workflows/test_build_release.yml | 4 + .github/workflows/test_models.yml | 4 + .github/workflows/test_shark.yml | 4 + .gitignore | 4 + .pre-commit-config.yaml | 8 ++ CONTRIBUTING.md | 6 ++ LICENSES/Apache-2.0.txt | 73 +++++++++++++++++++ LICENSES/LLVM-exception.txt | 15 ++++ MANIFEST.in | 4 + README.md | 6 ++ REUSE.toml | 20 +++++ build_tools/build_release.py | 4 +- build_tools/post_build_release_test.sh | 4 +- build_tools/post_pypi_release_test.sh | 4 +- examples/aot_mlp/mlp_export_dynamic.py | 3 +- examples/aot_mlp/mlp_export_simple.py | 3 +- examples/eager_mlp/mlp_eager_simple.py | 3 +- examples/llama2_inference/README.md | 6 ++ .../llama2_inference/llama2.ipynb.license | 3 + .../llama2_state_schema.json.license | 3 + examples/llama2_inference/requirements.txt | 4 + examples/resnet-18/README.md | 6 ++ examples/resnet-18/requirements.txt | 4 + examples/resnet-18/resnet-18.py | 4 + examples/runtime_torture/README.md | 6 ++ .../runtime_torture/launchable_torture.py | 4 +- iree/turbine/__init__.py | 3 +- lit_tests/kernel/wave/barriers.py | 4 + lit_tests/kernel/wave/codegen.py | 4 + lit_tests/kernel/wave/expansion.py | 4 + .../kernel/wave/index_sequence_analysis.py | 4 + .../kernel/wave/minimize_global_loads.py | 4 + lit_tests/kernel/wave/promotion.py | 4 + lit_tests/kernel/wave/tracing.py | 4 + lit_tests/lit.cfg.py | 4 + mypy.ini | 4 + pyproject.toml | 4 + requirements.txt | 4 + setup.cfg | 4 + setup.py | 3 +- shark_turbine/aot/__init__.py | 3 +- shark_turbine/aot/builtins/__init__.py | 3 +- shark_turbine/aot/builtins/globals.py | 5 +- shark_turbine/aot/builtins/jittable.py | 5 +- shark_turbine/aot/compiled_module.py | 5 +- shark_turbine/aot/decompositions.py | 3 +- shark_turbine/aot/exporter.py | 3 +- shark_turbine/aot/fx_programs.py | 3 +- shark_turbine/aot/params.py | 3 +- shark_turbine/aot/passes/__init__.py | 3 +- shark_turbine/aot/passes/functorch.py | 3 +- shark_turbine/aot/support/ir_utils.py | 5 +- .../aot/support/procedural/__init__.py | 5 +- shark_turbine/aot/support/procedural/base.py | 5 +- .../support/procedural/exported_program.py | 5 +- .../aot/support/procedural/globals.py | 5 +- .../aot/support/procedural/iree_emitter.py | 3 +- .../aot/support/procedural/primitives.py | 5 +- .../aot/support/procedural/tracer.py | 5 +- shark_turbine/aot/tensor_traits.py | 3 +- shark_turbine/dynamo/__init__.py | 4 +- shark_turbine/dynamo/backends/cpu.py | 3 +- shark_turbine/dynamo/decompositions.py | 3 +- shark_turbine/dynamo/executor.py | 3 +- shark_turbine/dynamo/passes.py | 4 + shark_turbine/dynamo/tensor.py | 3 +- shark_turbine/dynamo/type_conversion.py | 3 +- shark_turbine/importers/README.md | 6 ++ shark_turbine/importers/ir.py | 5 +- shark_turbine/importers/utils.py | 3 +- shark_turbine/kernel/__init__.py | 3 +- shark_turbine/kernel/_support/context.py | 4 + shark_turbine/kernel/_support/dtype.py | 4 + shark_turbine/kernel/_support/indexing.py | 4 + shark_turbine/kernel/_support/regions.py | 4 + shark_turbine/kernel/_support/shaped_type.py | 4 + shark_turbine/kernel/_support/tracing.py | 4 + shark_turbine/kernel/compiler/base.py | 4 + shark_turbine/kernel/compiler/builder.py | 4 + .../kernel/compiler/dispatch_codegen.py | 4 + shark_turbine/kernel/compiler/host_codegen.py | 4 + shark_turbine/kernel/compiler/ir.py | 4 + .../kernel/compiler/kernel_codegen.py | 4 + shark_turbine/kernel/compiler/op_matchers.py | 4 + shark_turbine/kernel/compiler/utils.py | 4 + .../kernel/compiler/vector_codegen.py | 4 + shark_turbine/kernel/gen/__init__.py | 4 + shark_turbine/kernel/gen/kernel.py | 4 +- shark_turbine/kernel/gen/thread.py | 4 +- shark_turbine/kernel/lang/__init__.py | 4 + shark_turbine/kernel/lang/global_symbols.py | 4 + shark_turbine/kernel/lang/grid.py | 4 + shark_turbine/kernel/lang/kernel_buffer.py | 4 + shark_turbine/kernel/lang/prims.py | 4 + shark_turbine/kernel/lang/types.py | 4 + shark_turbine/kernel/lang/wave_types.py | 4 + shark_turbine/kernel/ops/__init__.py | 4 + shark_turbine/kernel/ops/base.py | 4 + shark_turbine/kernel/ops/control_flow.py | 4 + shark_turbine/kernel/ops/core.py | 4 + shark_turbine/kernel/ops/math.py | 4 + shark_turbine/kernel/ops/memory.py | 4 + shark_turbine/kernel/ops/reduction.py | 4 + .../kernel/ops/shape_manipulation.py | 4 + shark_turbine/kernel/ops/wave_ops.py | 4 + shark_turbine/kernel/wave/README.md | 6 ++ shark_turbine/kernel/wave/__init__.py | 4 +- shark_turbine/kernel/wave/barriers.py | 4 +- shark_turbine/kernel/wave/codegen.py | 4 +- shark_turbine/kernel/wave/constraints.py | 4 +- .../kernel/wave/decompose_reduce_ops.py | 4 +- .../kernel/wave/docs/gemm_example.md | 6 ++ .../kernel/wave/docs/mlsys/.gitignore | 4 + .../kernel/wave/docs/mlsys/algorithm.sty | 7 +- .../kernel/wave/docs/mlsys/algorithmic.sty | 9 +-- .../kernel/wave/docs/mlsys/fancyhdr.sty | 4 + .../kernel/wave/docs/mlsys/mlsys2024.sty | 4 + shark_turbine/kernel/wave/docs/mlsys/tkw.bib | 6 ++ shark_turbine/kernel/wave/docs/mlsys/tkw.tex | 4 + shark_turbine/kernel/wave/expansion.py | 4 +- shark_turbine/kernel/wave/hoisting.py | 4 +- .../kernel/wave/index_sequence_analysis.py | 4 +- shark_turbine/kernel/wave/iree_utils.py | 4 +- .../kernel/wave/minimize_global_loads.py | 4 +- shark_turbine/kernel/wave/promotion.py | 4 +- .../kernel/wave/register_analysis.py | 4 +- .../kernel/wave/scheduling/__init__.py | 4 +- .../kernel/wave/scheduling/graph_utils.py | 4 +- .../wave/scheduling/modulo_scheduling.py | 4 +- .../kernel/wave/scheduling/resources.py | 4 +- .../kernel/wave/scheduling/schedule.py | 4 +- .../kernel/wave/shared_memory_indexing.py | 4 +- shark_turbine/kernel/wave/utils.py | 4 +- shark_turbine/kernel/wave/visualization.py | 4 +- shark_turbine/kernel/wave/wave.py | 4 +- shark_turbine/kernel/wave/wave_sim.py | 4 +- shark_turbine/ops/__init__.py | 3 +- shark_turbine/ops/_jinja_test_ops.py | 3 +- shark_turbine/ops/_str_format_test_ops.py | 3 +- shark_turbine/ops/iree.py | 3 +- shark_turbine/runtime/__init__.py | 3 +- shark_turbine/runtime/device.py | 3 +- shark_turbine/runtime/launch.py | 3 +- shark_turbine/runtime/op_reg/__init__.py | 3 +- shark_turbine/runtime/op_reg/base.py | 3 +- shark_turbine/runtime/op_reg/compiler.py | 3 +- shark_turbine/runtime/op_reg/eager.py | 3 +- shark_turbine/runtime/op_reg/impl_helper.py | 3 +- shark_turbine/runtime/tracing.py | 3 +- shark_turbine/support/__init__.py | 3 +- shark_turbine/support/conversions.py | 3 +- shark_turbine/support/debugging.py | 3 +- shark_turbine/support/exceptions.py | 3 +- shark_turbine/support/ir_imports.py | 5 +- shark_turbine/support/logging.py | 3 +- shark_turbine/tools/__init__.py | 4 + shark_turbine/tools/interpreter.py | 4 + shark_turbine/transforms/builder.py | 3 +- .../transforms/general/add_metadata.py | 3 +- .../transforms/general/custom_op_expansion.py | 3 +- .../transforms/general/rename_parameters.py | 3 +- shark_turbine/transforms/merger.py | 3 +- .../transforms/quantization/mm_group_quant.py | 3 +- shark_turbine/transforms/rewriter.py | 3 +- tests/aot/api_test.py | 3 +- tests/aot/args_test.py | 3 +- tests/aot/compiled_exported_program_test.py | 3 +- tests/aot/decompositions_test.py | 3 +- tests/aot/functionalize_test.py | 3 +- tests/aot/fx_programs_test.py | 3 +- tests/aot/globals_test.py | 3 +- tests/aot/iree_procedural_test.py | 3 +- tests/aot/jittable_test.py | 3 +- tests/aot/non_strict_export_test.py | 4 + tests/aot/params_test.py | 3 +- tests/dynamo/backend_smoke_test.py | 3 +- tests/dynamo/importer_backward_test.py | 3 +- tests/dynamo/importer_basic_test.py | 4 +- tests/dynamo/importer_dynamic_test.py | 3 +- tests/dynamo/llama_test.py | 3 +- tests/dynamo/mninst_test.py | 3 +- ...nsor_scalar_op_conversion_importer_test.py | 3 +- tests/dynamo/tensor_test.py | 3 +- tests/dynamo/testutils.py | 3 +- tests/dynamo/type_conversion_test.py | 3 +- tests/examples/aot_mlp_test.py | 3 +- tests/generated/evaluate.py | 4 + tests/generated/extract_unimpl_ops.sh | 4 + tests/generated/main.py | 4 + tests/generated/running_tests.md | 6 ++ tests/generated/stats.py | 4 + tests/generated/testutils.py | 4 + tests/kernel/aot_kernel_test.py | 3 +- tests/kernel/arith_test.py | 4 +- tests/kernel/compiler/utils_test.py | 4 + tests/kernel/dispatch_codegen_test.py | 4 +- tests/kernel/fused_attention_test.py | 4 +- tests/kernel/indexing_test.py | 4 +- tests/kernel/simple_kernel_test.py | 3 +- tests/kernel/types_test.py | 4 +- tests/kernel/vector_codegen_test.py | 4 +- tests/kernel/wave/.gitignore | 4 + tests/kernel/wave/__init__.py | 4 +- tests/kernel/wave/constraints_test.py | 4 +- tests/kernel/wave/scheduling_test.py | 4 +- tests/kernel/wave/test_param.json.license | 3 + tests/kernel/wave/types_test.py | 4 +- tests/kernel/wave/visualization_test.py | 4 +- tests/kernel/wave/wave_e2e_test.py | 4 +- tests/kernel/wave/wave_gemm_test.py | 4 +- tests/kernel/wave/wave_sim_test.py | 4 +- tests/kernel/wave/wave_utils_test.py | 4 +- tests/ops/iree_test.py | 3 +- tests/runtime/device_test.py | 3 +- tests/runtime/launch_test.py | 3 +- tests/runtime/op_reg/impl_helper_test.py | 3 +- tests/runtime/op_reg/kernel_aot_test.py | 3 +- tests/runtime/op_reg/kernel_reg_test.py | 3 +- tests/tools/interpreter_test.py | 4 + tests/top_level_package_test.py | 3 +- tests/transforms/general/add_metadata_test.py | 5 +- .../general/custom_op_expansion_test.py | 3 +- .../general/rename_parameters_test.py | 5 +- .../quantization/mm_group_quant_test.py | 5 +- version_info.json.license | 3 + 228 files changed, 635 insertions(+), 339 deletions(-) create mode 100644 LICENSES/Apache-2.0.txt create mode 100644 LICENSES/LLVM-exception.txt create mode 100644 REUSE.toml create mode 100644 examples/llama2_inference/llama2.ipynb.license create mode 100644 examples/llama2_inference/llama2_state_schema.json.license create mode 100644 tests/kernel/wave/test_param.json.license create mode 100644 version_info.json.license diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8f938a0e..1f4b4fb8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + name: CI on: diff --git a/.github/workflows/perf.yaml b/.github/workflows/perf.yaml index 87adb13d..66df7acc 100644 --- a/.github/workflows/perf.yaml +++ b/.github/workflows/perf.yaml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + name: PERF on: diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 2213fcf7..b40fd0c5 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + name: pre-commit on: diff --git a/.github/workflows/test_build_release.yml b/.github/workflows/test_build_release.yml index c0546365..eaaee17d 100644 --- a/.github/workflows/test_build_release.yml +++ b/.github/workflows/test_build_release.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + name: Build Release on: diff --git a/.github/workflows/test_models.yml b/.github/workflows/test_models.yml index 3c61cec1..51cc214a 100644 --- a/.github/workflows/test_models.yml +++ b/.github/workflows/test_models.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + name: Test Turbine Models on: diff --git a/.github/workflows/test_shark.yml b/.github/workflows/test_shark.yml index 595bd365..0ec40374 100644 --- a/.github/workflows/test_shark.yml +++ b/.github/workflows/test_shark.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + name: Test SHARK on: diff --git a/.gitignore b/.gitignore index 3f5c75ef..a26b9ebb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + # Visual Studio files .env .vs/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c682da5..779a644c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: @@ -12,3 +16,7 @@ repos: rev: 22.10.0 hooks: - id: black +- repo: https://github.com/fsfe/reuse-tool + rev: v4.0.3 + hooks: + - id: reuse diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 426cb31e..4eff7fb6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,9 @@ + + # How to contribute We'd love to accept your patches and contributions to this project. diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt new file mode 100644 index 00000000..137069b8 --- /dev/null +++ b/LICENSES/Apache-2.0.txt @@ -0,0 +1,73 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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/LICENSES/LLVM-exception.txt b/LICENSES/LLVM-exception.txt new file mode 100644 index 00000000..fa4b725a --- /dev/null +++ b/LICENSES/LLVM-exception.txt @@ -0,0 +1,15 @@ +---- LLVM Exceptions to the Apache 2.0 License ---- + + As an exception, if, as a result of your compiling your source code, portions + of this Software are embedded into an Object form of such source code, you + may redistribute such embedded portions in such Object form without complying + with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + + In addition, if you combine or link compiled forms of this Software with + software that is licensed under the GPLv2 ("Combined Software") and if a + court of competent jurisdiction determines that the patent provision (Section + 3), the indemnity provision (Section 9) or other Section of the License + conflicts with the conditions of the GPLv2, you may retroactively and + prospectively choose to deem waived or otherwise exclude such Section(s) of + the License, but only in their entirety and only with respect to the Combined + Software. diff --git a/MANIFEST.in b/MANIFEST.in index 97971bba..55d803a8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + include README.md include requirements.txt include pytorch-cpu-requirements.txt diff --git a/README.md b/README.md index 4d0d0c22..c38af45c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ + + # IREE Turbine ![image](https://netl.doe.gov/sites/default/files/2020-11/Turbine-8412270026_83cfc8ee8f_c.jpg) diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 00000000..9783791c --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +version = 1 + +[[annotations]] +path = [ + "**.mlir", + "tests/**", + "shark_turbine/kernel/wave/docs/**", + "iree-requirements-ci.txt", + "iree-requirements.txt", + "mypy-requirements.txt", + "pytorch-cpu-requirements.txt", + "pytorch-rocm-requirements.txt" +] + +SPDX-FileCopyrightText = "2024 The IREE Authors" +SPDX-License-Identifier = "Apache-2.0 WITH LLVM-exception" diff --git a/build_tools/build_release.py b/build_tools/build_release.py index 5a6ef98d..e86347a2 100755 --- a/build_tools/build_release.py +++ b/build_tools/build_release.py @@ -1,8 +1,8 @@ #!/usr/bin/env python + # Copyright 2024 Advanced Micro Devices, Inc. +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Fetches dependent release artifacts and builds wheels. diff --git a/build_tools/post_build_release_test.sh b/build_tools/post_build_release_test.sh index d18f8c41..1064615a 100755 --- a/build_tools/post_build_release_test.sh +++ b/build_tools/post_build_release_test.sh @@ -1,8 +1,8 @@ #!/bin/bash + # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 set -xeuo pipefail diff --git a/build_tools/post_pypi_release_test.sh b/build_tools/post_pypi_release_test.sh index c1a55b09..d2884442 100755 --- a/build_tools/post_pypi_release_test.sh +++ b/build_tools/post_pypi_release_test.sh @@ -1,8 +1,8 @@ #!/bin/bash + # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 set -xeuo pipefail diff --git a/examples/aot_mlp/mlp_export_dynamic.py b/examples/aot_mlp/mlp_export_dynamic.py index cd863655..67a2c81d 100644 --- a/examples/aot_mlp/mlp_export_dynamic.py +++ b/examples/aot_mlp/mlp_export_dynamic.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 # This sample builds a dynamic shape version of the MLP with diff --git a/examples/aot_mlp/mlp_export_simple.py b/examples/aot_mlp/mlp_export_simple.py index fed4795d..2dac6dbc 100644 --- a/examples/aot_mlp/mlp_export_simple.py +++ b/examples/aot_mlp/mlp_export_simple.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/examples/eager_mlp/mlp_eager_simple.py b/examples/eager_mlp/mlp_eager_simple.py index ec671515..8c39d093 100644 --- a/examples/eager_mlp/mlp_eager_simple.py +++ b/examples/eager_mlp/mlp_eager_simple.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/examples/llama2_inference/README.md b/examples/llama2_inference/README.md index 50bc6537..e578b46a 100644 --- a/examples/llama2_inference/README.md +++ b/examples/llama2_inference/README.md @@ -1,3 +1,9 @@ + + # LLAMA 2 Inference This example require some extra dependencies. Here's an easy way to get it running on a fresh server. diff --git a/examples/llama2_inference/llama2.ipynb.license b/examples/llama2_inference/llama2.ipynb.license new file mode 100644 index 00000000..afa119fa --- /dev/null +++ b/examples/llama2_inference/llama2.ipynb.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 The IREE Authors + +SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/llama2_inference/llama2_state_schema.json.license b/examples/llama2_inference/llama2_state_schema.json.license new file mode 100644 index 00000000..afa119fa --- /dev/null +++ b/examples/llama2_inference/llama2_state_schema.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 The IREE Authors + +SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/llama2_inference/requirements.txt b/examples/llama2_inference/requirements.txt index acbc93ca..b6e87db6 100644 --- a/examples/llama2_inference/requirements.txt +++ b/examples/llama2_inference/requirements.txt @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + protobuf sentencepiece shark_turbine diff --git a/examples/resnet-18/README.md b/examples/resnet-18/README.md index cbb45539..b168f4a3 100644 --- a/examples/resnet-18/README.md +++ b/examples/resnet-18/README.md @@ -1,3 +1,9 @@ + + # Dynamic AOT Resnet-18 Example This example AOT-compiles a Resnet-18 module for performing inference on a dynamic number of input images. diff --git a/examples/resnet-18/requirements.txt b/examples/resnet-18/requirements.txt index a5123e97..36e80307 100644 --- a/examples/resnet-18/requirements.txt +++ b/examples/resnet-18/requirements.txt @@ -1,2 +1,6 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + transformers shark_turbine==0.9.2 diff --git a/examples/resnet-18/resnet-18.py b/examples/resnet-18/resnet-18.py index 20340013..188913db 100644 --- a/examples/resnet-18/resnet-18.py +++ b/examples/resnet-18/resnet-18.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from transformers import AutoFeatureExtractor, AutoModelForImageClassification import torch from shark_turbine.aot import * diff --git a/examples/runtime_torture/README.md b/examples/runtime_torture/README.md index 338e1a6a..dd76c527 100644 --- a/examples/runtime_torture/README.md +++ b/examples/runtime_torture/README.md @@ -1,3 +1,9 @@ + + # Runtime torture tests These examples aim to stress the torch<->iree runtime in various ways both as a diff --git a/examples/runtime_torture/launchable_torture.py b/examples/runtime_torture/launchable_torture.py index 56f92a99..f3fd8c2c 100644 --- a/examples/runtime_torture/launchable_torture.py +++ b/examples/runtime_torture/launchable_torture.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import argparse diff --git a/iree/turbine/__init__.py b/iree/turbine/__init__.py index c59e85c2..c034cfc2 100644 --- a/iree/turbine/__init__.py +++ b/iree/turbine/__init__.py @@ -4,9 +4,8 @@ """ # Copyright 2024 Advanced Micro Devices, Inc. +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 # TODO: This redirection layer exists while we are migrating from the diff --git a/lit_tests/kernel/wave/barriers.py b/lit_tests/kernel/wave/barriers.py index 1b446dc0..90b55761 100644 --- a/lit_tests/kernel/wave/barriers.py +++ b/lit_tests/kernel/wave/barriers.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + # RUN: python %s | FileCheck %s import logging diff --git a/lit_tests/kernel/wave/codegen.py b/lit_tests/kernel/wave/codegen.py index 0bba2384..ba4c551c 100644 --- a/lit_tests/kernel/wave/codegen.py +++ b/lit_tests/kernel/wave/codegen.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + # RUN: python %s | FileCheck %s import pytest diff --git a/lit_tests/kernel/wave/expansion.py b/lit_tests/kernel/wave/expansion.py index a20965f3..15d3105a 100644 --- a/lit_tests/kernel/wave/expansion.py +++ b/lit_tests/kernel/wave/expansion.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + # RUN: python %s | FileCheck %s import logging diff --git a/lit_tests/kernel/wave/index_sequence_analysis.py b/lit_tests/kernel/wave/index_sequence_analysis.py index d49ee3b2..6be920a3 100644 --- a/lit_tests/kernel/wave/index_sequence_analysis.py +++ b/lit_tests/kernel/wave/index_sequence_analysis.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + # RUN: python %s | FileCheck %s import logging diff --git a/lit_tests/kernel/wave/minimize_global_loads.py b/lit_tests/kernel/wave/minimize_global_loads.py index 310e9ef4..f6064c6c 100644 --- a/lit_tests/kernel/wave/minimize_global_loads.py +++ b/lit_tests/kernel/wave/minimize_global_loads.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + # RUN: python %s | FileCheck %s import logging diff --git a/lit_tests/kernel/wave/promotion.py b/lit_tests/kernel/wave/promotion.py index 01db88cc..c5739234 100644 --- a/lit_tests/kernel/wave/promotion.py +++ b/lit_tests/kernel/wave/promotion.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + # RUN: python %s | FileCheck %s import logging diff --git a/lit_tests/kernel/wave/tracing.py b/lit_tests/kernel/wave/tracing.py index 283b6436..9f0d9dc3 100644 --- a/lit_tests/kernel/wave/tracing.py +++ b/lit_tests/kernel/wave/tracing.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + # RUN: python %s | FileCheck %s from typing import Callable diff --git a/lit_tests/lit.cfg.py b/lit_tests/lit.cfg.py index 5b40c7eb..83aaba22 100644 --- a/lit_tests/lit.cfg.py +++ b/lit_tests/lit.cfg.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + import os import shutil import sys diff --git a/mypy.ini b/mypy.ini index 29c35b65..b0ecb719 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,3 +1,7 @@ +; SPDX-FileCopyrightText: 2024 The IREE Authors +; +; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + [mypy] explicit_package_bases = True diff --git a/pyproject.toml b/pyproject.toml index 9787c3bd..cb7f8651 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + [build-system] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" diff --git a/requirements.txt b/requirements.txt index cfe0a6d8..01fc5d8f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + # Build/test requirements. Jinja2==3.1.3 filecheck==1.0.0 diff --git a/setup.cfg b/setup.cfg index 35836067..4c062c1d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + [tool:pytest] testpaths = ./tests diff --git a/setup.py b/setup.py index 63a028cb..1febfe3e 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc. +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import json diff --git a/shark_turbine/aot/__init__.py b/shark_turbine/aot/__init__.py index ceb95fe2..a9f7d77c 100644 --- a/shark_turbine/aot/__init__.py +++ b/shark_turbine/aot/__init__.py @@ -3,9 +3,8 @@ """ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from .builtins import * diff --git a/shark_turbine/aot/builtins/__init__.py b/shark_turbine/aot/builtins/__init__.py index 0d37f5d8..036877d5 100644 --- a/shark_turbine/aot/builtins/__init__.py +++ b/shark_turbine/aot/builtins/__init__.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from .globals import * diff --git a/shark_turbine/aot/builtins/globals.py b/shark_turbine/aot/builtins/globals.py index befe2bbe..532a9252 100644 --- a/shark_turbine/aot/builtins/globals.py +++ b/shark_turbine/aot/builtins/globals.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Any, Callable, Optional diff --git a/shark_turbine/aot/builtins/jittable.py b/shark_turbine/aot/builtins/jittable.py index 7a34a01b..2a9b4593 100644 --- a/shark_turbine/aot/builtins/jittable.py +++ b/shark_turbine/aot/builtins/jittable.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Tracing builtins.""" diff --git a/shark_turbine/aot/compiled_module.py b/shark_turbine/aot/compiled_module.py index 3f44c8b9..ad26c22d 100644 --- a/shark_turbine/aot/compiled_module.py +++ b/shark_turbine/aot/compiled_module.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Union diff --git a/shark_turbine/aot/decompositions.py b/shark_turbine/aot/decompositions.py index 29f72345..9acdfe94 100644 --- a/shark_turbine/aot/decompositions.py +++ b/shark_turbine/aot/decompositions.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import contextlib diff --git a/shark_turbine/aot/exporter.py b/shark_turbine/aot/exporter.py index 4c0e0160..a477b6ff 100644 --- a/shark_turbine/aot/exporter.py +++ b/shark_turbine/aot/exporter.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import overload, Any, Dict, List, Optional, Sequence, Tuple, Type, Union diff --git a/shark_turbine/aot/fx_programs.py b/shark_turbine/aot/fx_programs.py index 696f9a00..2005c9d9 100644 --- a/shark_turbine/aot/fx_programs.py +++ b/shark_turbine/aot/fx_programs.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Helper classes for assembling sets of FX modules that can be compiled. diff --git a/shark_turbine/aot/params.py b/shark_turbine/aot/params.py index 234085b6..f82eadf9 100644 --- a/shark_turbine/aot/params.py +++ b/shark_turbine/aot/params.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Iterator, List, Optional, Set, Tuple, Union diff --git a/shark_turbine/aot/passes/__init__.py b/shark_turbine/aot/passes/__init__.py index 167b8b88..f7419e43 100644 --- a/shark_turbine/aot/passes/__init__.py +++ b/shark_turbine/aot/passes/__init__.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from .functorch import functorch_functionalize diff --git a/shark_turbine/aot/passes/functorch.py b/shark_turbine/aot/passes/functorch.py index 06967ecf..27304c79 100644 --- a/shark_turbine/aot/passes/functorch.py +++ b/shark_turbine/aot/passes/functorch.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Any, Callable diff --git a/shark_turbine/aot/support/ir_utils.py b/shark_turbine/aot/support/ir_utils.py index a662c15c..4c2d17b6 100644 --- a/shark_turbine/aot/support/ir_utils.py +++ b/shark_turbine/aot/support/ir_utils.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Callable, Dict, Optional, Sequence, Tuple diff --git a/shark_turbine/aot/support/procedural/__init__.py b/shark_turbine/aot/support/procedural/__init__.py index f78c2d43..cb5b9303 100644 --- a/shark_turbine/aot/support/procedural/__init__.py +++ b/shark_turbine/aot/support/procedural/__init__.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 # The procedural package has circular dependencies due to its diff --git a/shark_turbine/aot/support/procedural/base.py b/shark_turbine/aot/support/procedural/base.py index b4793202..604ad2ce 100644 --- a/shark_turbine/aot/support/procedural/base.py +++ b/shark_turbine/aot/support/procedural/base.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import ( diff --git a/shark_turbine/aot/support/procedural/exported_program.py b/shark_turbine/aot/support/procedural/exported_program.py index 331a7345..277a19ce 100644 --- a/shark_turbine/aot/support/procedural/exported_program.py +++ b/shark_turbine/aot/support/procedural/exported_program.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2024 Advanced Micro Devices, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Any, Dict, List, Optional diff --git a/shark_turbine/aot/support/procedural/globals.py b/shark_turbine/aot/support/procedural/globals.py index 5d24cf29..6c115ee1 100644 --- a/shark_turbine/aot/support/procedural/globals.py +++ b/shark_turbine/aot/support/procedural/globals.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 # Global references in a module. diff --git a/shark_turbine/aot/support/procedural/iree_emitter.py b/shark_turbine/aot/support/procedural/iree_emitter.py index dbfd4ea2..b1169036 100644 --- a/shark_turbine/aot/support/procedural/iree_emitter.py +++ b/shark_turbine/aot/support/procedural/iree_emitter.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Python API for IREE's high-level tensor dialects.""" diff --git a/shark_turbine/aot/support/procedural/primitives.py b/shark_turbine/aot/support/procedural/primitives.py index ad406c87..dc64dc08 100644 --- a/shark_turbine/aot/support/procedural/primitives.py +++ b/shark_turbine/aot/support/procedural/primitives.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 # Live types during runtime of a procedure trace. User code will diff --git a/shark_turbine/aot/support/procedural/tracer.py b/shark_turbine/aot/support/procedural/tracer.py index 942d36d9..98bf268f 100644 --- a/shark_turbine/aot/support/procedural/tracer.py +++ b/shark_turbine/aot/support/procedural/tracer.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 # Concrete tracer for running buildable code. diff --git a/shark_turbine/aot/tensor_traits.py b/shark_turbine/aot/tensor_traits.py index bb7a5280..fe7c4244 100644 --- a/shark_turbine/aot/tensor_traits.py +++ b/shark_turbine/aot/tensor_traits.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Optional diff --git a/shark_turbine/dynamo/__init__.py b/shark_turbine/dynamo/__init__.py index b122f462..de372e73 100644 --- a/shark_turbine/dynamo/__init__.py +++ b/shark_turbine/dynamo/__init__.py @@ -1,10 +1,8 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 - from .tensor import ( enable, TurbineMode, diff --git a/shark_turbine/dynamo/backends/cpu.py b/shark_turbine/dynamo/backends/cpu.py index 521d0380..f56399d8 100644 --- a/shark_turbine/dynamo/backends/cpu.py +++ b/shark_turbine/dynamo/backends/cpu.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import functools diff --git a/shark_turbine/dynamo/decompositions.py b/shark_turbine/dynamo/decompositions.py index ed12a678..9d4875df 100644 --- a/shark_turbine/dynamo/decompositions.py +++ b/shark_turbine/dynamo/decompositions.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Callable, Dict, List, Optional, Sequence, Union diff --git a/shark_turbine/dynamo/executor.py b/shark_turbine/dynamo/executor.py index 4dcc2fa0..33f01ab1 100644 --- a/shark_turbine/dynamo/executor.py +++ b/shark_turbine/dynamo/executor.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import functools diff --git a/shark_turbine/dynamo/passes.py b/shark_turbine/dynamo/passes.py index 23078a83..8a5fb425 100644 --- a/shark_turbine/dynamo/passes.py +++ b/shark_turbine/dynamo/passes.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + import torch from torch.fx.experimental.proxy_tensor import make_fx from torch._decomp import get_decompositions diff --git a/shark_turbine/dynamo/tensor.py b/shark_turbine/dynamo/tensor.py index cd1de1ea..7e6b9873 100644 --- a/shark_turbine/dynamo/tensor.py +++ b/shark_turbine/dynamo/tensor.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """A Turbine tensor. diff --git a/shark_turbine/dynamo/type_conversion.py b/shark_turbine/dynamo/type_conversion.py index 8206e10f..6f96fc4b 100644 --- a/shark_turbine/dynamo/type_conversion.py +++ b/shark_turbine/dynamo/type_conversion.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Converters to/from torch types. diff --git a/shark_turbine/importers/README.md b/shark_turbine/importers/README.md index 9e47ca46..2c08d729 100644 --- a/shark_turbine/importers/README.md +++ b/shark_turbine/importers/README.md @@ -1,3 +1,9 @@ + + # Importers from various systems This directory is self-contained and intended to be shared with other diff --git a/shark_turbine/importers/ir.py b/shark_turbine/importers/ir.py index 4b4f94d7..f56de261 100644 --- a/shark_turbine/importers/ir.py +++ b/shark_turbine/importers/ir.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from iree.compiler.ir import ( diff --git a/shark_turbine/importers/utils.py b/shark_turbine/importers/utils.py index a2047d54..adf5e1c9 100644 --- a/shark_turbine/importers/utils.py +++ b/shark_turbine/importers/utils.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Any, Dict, List, Tuple diff --git a/shark_turbine/kernel/__init__.py b/shark_turbine/kernel/__init__.py index 5753d40e..d414b95c 100644 --- a/shark_turbine/kernel/__init__.py +++ b/shark_turbine/kernel/__init__.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from . import gen diff --git a/shark_turbine/kernel/_support/context.py b/shark_turbine/kernel/_support/context.py index 31aec520..f474a359 100644 --- a/shark_turbine/kernel/_support/context.py +++ b/shark_turbine/kernel/_support/context.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import Optional, Type, TypeVar import threading diff --git a/shark_turbine/kernel/_support/dtype.py b/shark_turbine/kernel/_support/dtype.py index 9a0ba20b..a7084cbb 100644 --- a/shark_turbine/kernel/_support/dtype.py +++ b/shark_turbine/kernel/_support/dtype.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + __all__ = [ "DataType", "bool", diff --git a/shark_turbine/kernel/_support/indexing.py b/shark_turbine/kernel/_support/indexing.py index 3f092278..a2d1155c 100644 --- a/shark_turbine/kernel/_support/indexing.py +++ b/shark_turbine/kernel/_support/indexing.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import Any, ClassVar, Optional, Type, TypeVar, Union from abc import ABC diff --git a/shark_turbine/kernel/_support/regions.py b/shark_turbine/kernel/_support/regions.py index d39b15a8..d870e822 100644 --- a/shark_turbine/kernel/_support/regions.py +++ b/shark_turbine/kernel/_support/regions.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import ( Optional, TypeVar, diff --git a/shark_turbine/kernel/_support/shaped_type.py b/shark_turbine/kernel/_support/shaped_type.py index f5bd25cf..1b3c0972 100644 --- a/shark_turbine/kernel/_support/shaped_type.py +++ b/shark_turbine/kernel/_support/shaped_type.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + import typing from typing import Optional, Type, TypeVar, cast diff --git a/shark_turbine/kernel/_support/tracing.py b/shark_turbine/kernel/_support/tracing.py index 42424257..7f681f9e 100644 --- a/shark_turbine/kernel/_support/tracing.py +++ b/shark_turbine/kernel/_support/tracing.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from abc import ABC, abstractmethod from typing import ( Optional, diff --git a/shark_turbine/kernel/compiler/base.py b/shark_turbine/kernel/compiler/base.py index 6af9ec02..c444ff23 100644 --- a/shark_turbine/kernel/compiler/base.py +++ b/shark_turbine/kernel/compiler/base.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + NDEBUG = False diff --git a/shark_turbine/kernel/compiler/builder.py b/shark_turbine/kernel/compiler/builder.py index c7231250..c08f4515 100644 --- a/shark_turbine/kernel/compiler/builder.py +++ b/shark_turbine/kernel/compiler/builder.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import Any, Optional, Union from .._support.indexing import ( diff --git a/shark_turbine/kernel/compiler/dispatch_codegen.py b/shark_turbine/kernel/compiler/dispatch_codegen.py index 0fccf39c..a250816e 100644 --- a/shark_turbine/kernel/compiler/dispatch_codegen.py +++ b/shark_turbine/kernel/compiler/dispatch_codegen.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + """Code generation support for top-level IREE dispatch constructs. This assumes that you have some form of code generation for the diff --git a/shark_turbine/kernel/compiler/host_codegen.py b/shark_turbine/kernel/compiler/host_codegen.py index 9225d831..65331494 100644 --- a/shark_turbine/kernel/compiler/host_codegen.py +++ b/shark_turbine/kernel/compiler/host_codegen.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from .kernel_codegen import KernelSignature from .dispatch_codegen import StreamExecutable diff --git a/shark_turbine/kernel/compiler/ir.py b/shark_turbine/kernel/compiler/ir.py index 3f2bb974..d5d04480 100644 --- a/shark_turbine/kernel/compiler/ir.py +++ b/shark_turbine/kernel/compiler/ir.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from iree.compiler.ir import ( AffineConstantExpr, AffineExpr, diff --git a/shark_turbine/kernel/compiler/kernel_codegen.py b/shark_turbine/kernel/compiler/kernel_codegen.py index 0069630c..01865aca 100644 --- a/shark_turbine/kernel/compiler/kernel_codegen.py +++ b/shark_turbine/kernel/compiler/kernel_codegen.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + """Code generation support for kernel entry-points. In a typical code generation stack, there are three elements: diff --git a/shark_turbine/kernel/compiler/op_matchers.py b/shark_turbine/kernel/compiler/op_matchers.py index 81f738a5..abb6bbf2 100644 --- a/shark_turbine/kernel/compiler/op_matchers.py +++ b/shark_turbine/kernel/compiler/op_matchers.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import Optional import torch diff --git a/shark_turbine/kernel/compiler/utils.py b/shark_turbine/kernel/compiler/utils.py index db804abd..52fa262c 100644 --- a/shark_turbine/kernel/compiler/utils.py +++ b/shark_turbine/kernel/compiler/utils.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import Optional from .._support.indexing import IndexSymbol, IndexingContext from math import prod diff --git a/shark_turbine/kernel/compiler/vector_codegen.py b/shark_turbine/kernel/compiler/vector_codegen.py index ae3d21ab..11000b28 100644 --- a/shark_turbine/kernel/compiler/vector_codegen.py +++ b/shark_turbine/kernel/compiler/vector_codegen.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + """Code generation for generating vector-dialect based kernels. Such kernels operate on global memory at the boundary, scheduling diff --git a/shark_turbine/kernel/gen/__init__.py b/shark_turbine/kernel/gen/__init__.py index 68db21b7..f3887710 100644 --- a/shark_turbine/kernel/gen/__init__.py +++ b/shark_turbine/kernel/gen/__init__.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from .thread import * from .kernel import * diff --git a/shark_turbine/kernel/gen/kernel.py b/shark_turbine/kernel/gen/kernel.py index 3a16a7bc..36ca8549 100644 --- a/shark_turbine/kernel/gen/kernel.py +++ b/shark_turbine/kernel/gen/kernel.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Custom op registeration for TK""" diff --git a/shark_turbine/kernel/gen/thread.py b/shark_turbine/kernel/gen/thread.py index 97f69a90..bdd4e292 100644 --- a/shark_turbine/kernel/gen/thread.py +++ b/shark_turbine/kernel/gen/thread.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import ( diff --git a/shark_turbine/kernel/lang/__init__.py b/shark_turbine/kernel/lang/__init__.py index c94ee993..3f35be9b 100644 --- a/shark_turbine/kernel/lang/__init__.py +++ b/shark_turbine/kernel/lang/__init__.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from .prims import * from .types import * from .kernel_buffer import * diff --git a/shark_turbine/kernel/lang/global_symbols.py b/shark_turbine/kernel/lang/global_symbols.py index efe112e8..ce7b413b 100644 --- a/shark_turbine/kernel/lang/global_symbols.py +++ b/shark_turbine/kernel/lang/global_symbols.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from .._support.indexing import index_symbol # Global symbols used throughout the code. diff --git a/shark_turbine/kernel/lang/grid.py b/shark_turbine/kernel/lang/grid.py index 6c21c690..4bab9dd1 100644 --- a/shark_turbine/kernel/lang/grid.py +++ b/shark_turbine/kernel/lang/grid.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import cast, Type, ClassVar from .._support.shaped_type import ShapedType diff --git a/shark_turbine/kernel/lang/kernel_buffer.py b/shark_turbine/kernel/lang/kernel_buffer.py index 4ab00ea7..ac7092ab 100644 --- a/shark_turbine/kernel/lang/kernel_buffer.py +++ b/shark_turbine/kernel/lang/kernel_buffer.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import Type, TypeVar, cast, ClassVar from enum import Enum diff --git a/shark_turbine/kernel/lang/prims.py b/shark_turbine/kernel/lang/prims.py index b9f16308..f5c4d1b9 100644 --- a/shark_turbine/kernel/lang/prims.py +++ b/shark_turbine/kernel/lang/prims.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from .. import ops from .._support.tracing import ( diff --git a/shark_turbine/kernel/lang/types.py b/shark_turbine/kernel/lang/types.py index 1f42fdb1..f5baa278 100644 --- a/shark_turbine/kernel/lang/types.py +++ b/shark_turbine/kernel/lang/types.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import Type __all__ = [ diff --git a/shark_turbine/kernel/lang/wave_types.py b/shark_turbine/kernel/lang/wave_types.py index c84bdbdd..a4a73d76 100644 --- a/shark_turbine/kernel/lang/wave_types.py +++ b/shark_turbine/kernel/lang/wave_types.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import ( Any, Callable, diff --git a/shark_turbine/kernel/ops/__init__.py b/shark_turbine/kernel/ops/__init__.py index c022248f..5a454220 100644 --- a/shark_turbine/kernel/ops/__init__.py +++ b/shark_turbine/kernel/ops/__init__.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from .core import * from .math import * from .reduction import * diff --git a/shark_turbine/kernel/ops/base.py b/shark_turbine/kernel/ops/base.py index 88291997..fb36ee01 100644 --- a/shark_turbine/kernel/ops/base.py +++ b/shark_turbine/kernel/ops/base.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + """Support for defining the op library and dispatch.""" from typing import Callable, Type, TypeVar diff --git a/shark_turbine/kernel/ops/control_flow.py b/shark_turbine/kernel/ops/control_flow.py index beb94c77..6ddb7e33 100644 --- a/shark_turbine/kernel/ops/control_flow.py +++ b/shark_turbine/kernel/ops/control_flow.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import ( Any, List, diff --git a/shark_turbine/kernel/ops/core.py b/shark_turbine/kernel/ops/core.py index 0121c69c..72f29d41 100644 --- a/shark_turbine/kernel/ops/core.py +++ b/shark_turbine/kernel/ops/core.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import Any, TypeVar import typing diff --git a/shark_turbine/kernel/ops/math.py b/shark_turbine/kernel/ops/math.py index 0b617baa..00018126 100644 --- a/shark_turbine/kernel/ops/math.py +++ b/shark_turbine/kernel/ops/math.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import Tuple import typing diff --git a/shark_turbine/kernel/ops/memory.py b/shark_turbine/kernel/ops/memory.py index a4cb073d..06d46ad3 100644 --- a/shark_turbine/kernel/ops/memory.py +++ b/shark_turbine/kernel/ops/memory.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import ( Any, List, diff --git a/shark_turbine/kernel/ops/reduction.py b/shark_turbine/kernel/ops/reduction.py index 3a97057b..38501e61 100644 --- a/shark_turbine/kernel/ops/reduction.py +++ b/shark_turbine/kernel/ops/reduction.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import Any, List, Optional import typing diff --git a/shark_turbine/kernel/ops/shape_manipulation.py b/shark_turbine/kernel/ops/shape_manipulation.py index 9f7285bd..221573b3 100644 --- a/shark_turbine/kernel/ops/shape_manipulation.py +++ b/shark_turbine/kernel/ops/shape_manipulation.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from typing import Tuple import typing diff --git a/shark_turbine/kernel/ops/wave_ops.py b/shark_turbine/kernel/ops/wave_ops.py index 0298a065..f7750097 100644 --- a/shark_turbine/kernel/ops/wave_ops.py +++ b/shark_turbine/kernel/ops/wave_ops.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from __future__ import annotations from abc import ABC from dataclasses import dataclass, field, fields diff --git a/shark_turbine/kernel/wave/README.md b/shark_turbine/kernel/wave/README.md index a2ec7103..decc95f9 100644 --- a/shark_turbine/kernel/wave/README.md +++ b/shark_turbine/kernel/wave/README.md @@ -1,3 +1,9 @@ + + # TKW: A Wave Kernel Language for GPUs TKW is a high-level programming language designed to simplify the development of GPU micro-kernels by abstracting over intricate details of GPU hardware. It allows developers to write efficient micro-kernels, focusing on core computations while inferring the required data transfers and indexing automatically. TKW implements a wave-based programming model to express programs leveraging coalesced memory accesses effortlessly and supports the explicit use of matrix multiplication intrinsics. diff --git a/shark_turbine/kernel/wave/__init__.py b/shark_turbine/kernel/wave/__init__.py index cd1e587b..b7680693 100644 --- a/shark_turbine/kernel/wave/__init__.py +++ b/shark_turbine/kernel/wave/__init__.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from ..ops.wave_ops import * diff --git a/shark_turbine/kernel/wave/barriers.py b/shark_turbine/kernel/wave/barriers.py index a2babda8..10956f86 100644 --- a/shark_turbine/kernel/wave/barriers.py +++ b/shark_turbine/kernel/wave/barriers.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from .._support.tracing import CapturedTrace diff --git a/shark_turbine/kernel/wave/codegen.py b/shark_turbine/kernel/wave/codegen.py index e4a8cf72..4025233b 100644 --- a/shark_turbine/kernel/wave/codegen.py +++ b/shark_turbine/kernel/wave/codegen.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import operator diff --git a/shark_turbine/kernel/wave/constraints.py b/shark_turbine/kernel/wave/constraints.py index a6eb008f..840b8527 100644 --- a/shark_turbine/kernel/wave/constraints.py +++ b/shark_turbine/kernel/wave/constraints.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from abc import ABC, abstractmethod diff --git a/shark_turbine/kernel/wave/decompose_reduce_ops.py b/shark_turbine/kernel/wave/decompose_reduce_ops.py index 1dac06cc..c09834b3 100644 --- a/shark_turbine/kernel/wave/decompose_reduce_ops.py +++ b/shark_turbine/kernel/wave/decompose_reduce_ops.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from ..wave.constraints import ( diff --git a/shark_turbine/kernel/wave/docs/gemm_example.md b/shark_turbine/kernel/wave/docs/gemm_example.md index 731c0504..82979ebc 100644 --- a/shark_turbine/kernel/wave/docs/gemm_example.md +++ b/shark_turbine/kernel/wave/docs/gemm_example.md @@ -1,3 +1,9 @@ + + # Matrix Multiplication Let's assume we want to compute the following matrix multiplication. diff --git a/shark_turbine/kernel/wave/docs/mlsys/.gitignore b/shark_turbine/kernel/wave/docs/mlsys/.gitignore index f2e31fe2..099e6e6a 100644 --- a/shark_turbine/kernel/wave/docs/mlsys/.gitignore +++ b/shark_turbine/kernel/wave/docs/mlsys/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + *.aux *.log *.out diff --git a/shark_turbine/kernel/wave/docs/mlsys/algorithm.sty b/shark_turbine/kernel/wave/docs/mlsys/algorithm.sty index 58d5bff6..b652d9c3 100644 --- a/shark_turbine/kernel/wave/docs/mlsys/algorithm.sty +++ b/shark_turbine/kernel/wave/docs/mlsys/algorithm.sty @@ -1,7 +1,8 @@ -% ALGORITHM STYLE -- Released 8 April 1996 -% for LaTeX-2e % Copyright -- 1994 Peter Williams -% E-mail Peter.Williams@dsto.defence.gov.au +% SPDX-FileCopyrightText: 2024 The IREE Authors +% +% SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{algorithm} \typeout{Document Style `algorithm' - floating environment} diff --git a/shark_turbine/kernel/wave/docs/mlsys/algorithmic.sty b/shark_turbine/kernel/wave/docs/mlsys/algorithmic.sty index 36fff486..a843859d 100644 --- a/shark_turbine/kernel/wave/docs/mlsys/algorithmic.sty +++ b/shark_turbine/kernel/wave/docs/mlsys/algorithmic.sty @@ -1,11 +1,8 @@ -% ALGORITHMIC STYLE -- Released 8 APRIL 1996 -% for LaTeX version 2e % Copyright -- 1994 Peter Williams -% E-mail PeterWilliams@dsto.defence.gov.au -% -% Modified by Alex Smola (08/2000) -% E-mail Alex.Smola@anu.edu.au +% SPDX-FileCopyrightText: 2024 The IREE Authors % +% SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{algorithmic} \typeout{Document Style `algorithmic' - environment} diff --git a/shark_turbine/kernel/wave/docs/mlsys/fancyhdr.sty b/shark_turbine/kernel/wave/docs/mlsys/fancyhdr.sty index 93bce8b3..bd3bcfa1 100644 --- a/shark_turbine/kernel/wave/docs/mlsys/fancyhdr.sty +++ b/shark_turbine/kernel/wave/docs/mlsys/fancyhdr.sty @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 The IREE Authors +% +% SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + % fancyhdr.sty version 3.2 % Fancy headers and footers for LaTeX. % Piet van Oostrum, diff --git a/shark_turbine/kernel/wave/docs/mlsys/mlsys2024.sty b/shark_turbine/kernel/wave/docs/mlsys/mlsys2024.sty index 6d8a20d5..f7389d51 100644 --- a/shark_turbine/kernel/wave/docs/mlsys/mlsys2024.sty +++ b/shark_turbine/kernel/wave/docs/mlsys/mlsys2024.sty @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 The IREE Authors +% +% SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + % File: mlsys2024.sty (LaTeX style file for mlsys-2024, version of 2017-10-28) % This file contains the LaTeX formatting parameters for a two-column diff --git a/shark_turbine/kernel/wave/docs/mlsys/tkw.bib b/shark_turbine/kernel/wave/docs/mlsys/tkw.bib index 6bd0e3ee..7f470726 100644 --- a/shark_turbine/kernel/wave/docs/mlsys/tkw.bib +++ b/shark_turbine/kernel/wave/docs/mlsys/tkw.bib @@ -1,3 +1,9 @@ +@Comment{ +SPDX-FileCopyrightText: 2024 The IREE Authors + +SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +} + @inproceedings{langley00, author = {P. Langley}, title = {Crafting Papers on Machine Learning}, diff --git a/shark_turbine/kernel/wave/docs/mlsys/tkw.tex b/shark_turbine/kernel/wave/docs/mlsys/tkw.tex index cb56cab1..2120681d 100644 --- a/shark_turbine/kernel/wave/docs/mlsys/tkw.tex +++ b/shark_turbine/kernel/wave/docs/mlsys/tkw.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 The IREE Authors +% +% SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + %%%%%%%% mlsys 2024 EXAMPLE LATEX SUBMISSION FILE %%%%%%%%%%%%%%%%% \documentclass{article} diff --git a/shark_turbine/kernel/wave/expansion.py b/shark_turbine/kernel/wave/expansion.py index b96f778c..af758b84 100644 --- a/shark_turbine/kernel/wave/expansion.py +++ b/shark_turbine/kernel/wave/expansion.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import itertools diff --git a/shark_turbine/kernel/wave/hoisting.py b/shark_turbine/kernel/wave/hoisting.py index df68c753..001fb008 100644 --- a/shark_turbine/kernel/wave/hoisting.py +++ b/shark_turbine/kernel/wave/hoisting.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from ...support.logging import get_logger diff --git a/shark_turbine/kernel/wave/index_sequence_analysis.py b/shark_turbine/kernel/wave/index_sequence_analysis.py index cec8b60b..1b83fc3d 100644 --- a/shark_turbine/kernel/wave/index_sequence_analysis.py +++ b/shark_turbine/kernel/wave/index_sequence_analysis.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from ..ops.wave_ops import Write, ExtractSlice, get_custom diff --git a/shark_turbine/kernel/wave/iree_utils.py b/shark_turbine/kernel/wave/iree_utils.py index 6d612c91..785676eb 100644 --- a/shark_turbine/kernel/wave/iree_utils.py +++ b/shark_turbine/kernel/wave/iree_utils.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import torch diff --git a/shark_turbine/kernel/wave/minimize_global_loads.py b/shark_turbine/kernel/wave/minimize_global_loads.py index 3ea1a3d0..cc68687a 100644 --- a/shark_turbine/kernel/wave/minimize_global_loads.py +++ b/shark_turbine/kernel/wave/minimize_global_loads.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from ..wave.constraints import ( diff --git a/shark_turbine/kernel/wave/promotion.py b/shark_turbine/kernel/wave/promotion.py index fd1aa541..53658385 100644 --- a/shark_turbine/kernel/wave/promotion.py +++ b/shark_turbine/kernel/wave/promotion.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from .._support.tracing import CapturedTrace diff --git a/shark_turbine/kernel/wave/register_analysis.py b/shark_turbine/kernel/wave/register_analysis.py index cbd42fbe..a01272da 100644 --- a/shark_turbine/kernel/wave/register_analysis.py +++ b/shark_turbine/kernel/wave/register_analysis.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from ..wave.constraints import Constraint diff --git a/shark_turbine/kernel/wave/scheduling/__init__.py b/shark_turbine/kernel/wave/scheduling/__init__.py index 19879f4b..081f5906 100644 --- a/shark_turbine/kernel/wave/scheduling/__init__.py +++ b/shark_turbine/kernel/wave/scheduling/__init__.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from .schedule import * diff --git a/shark_turbine/kernel/wave/scheduling/graph_utils.py b/shark_turbine/kernel/wave/scheduling/graph_utils.py index e625b666..7b12c64b 100644 --- a/shark_turbine/kernel/wave/scheduling/graph_utils.py +++ b/shark_turbine/kernel/wave/scheduling/graph_utils.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import torch.fx as fx diff --git a/shark_turbine/kernel/wave/scheduling/modulo_scheduling.py b/shark_turbine/kernel/wave/scheduling/modulo_scheduling.py index f2abbd13..31836ea0 100644 --- a/shark_turbine/kernel/wave/scheduling/modulo_scheduling.py +++ b/shark_turbine/kernel/wave/scheduling/modulo_scheduling.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import torch.fx as fx diff --git a/shark_turbine/kernel/wave/scheduling/resources.py b/shark_turbine/kernel/wave/scheduling/resources.py index 13e80687..67ecf912 100644 --- a/shark_turbine/kernel/wave/scheduling/resources.py +++ b/shark_turbine/kernel/wave/scheduling/resources.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from ...lang.global_symbols import * diff --git a/shark_turbine/kernel/wave/scheduling/schedule.py b/shark_turbine/kernel/wave/scheduling/schedule.py index a03ad082..e9d4e122 100644 --- a/shark_turbine/kernel/wave/scheduling/schedule.py +++ b/shark_turbine/kernel/wave/scheduling/schedule.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from ..constraints import Constraint diff --git a/shark_turbine/kernel/wave/shared_memory_indexing.py b/shark_turbine/kernel/wave/shared_memory_indexing.py index 184568f6..aa67d2d7 100644 --- a/shark_turbine/kernel/wave/shared_memory_indexing.py +++ b/shark_turbine/kernel/wave/shared_memory_indexing.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from .._support.tracing import CapturedTrace diff --git a/shark_turbine/kernel/wave/utils.py b/shark_turbine/kernel/wave/utils.py index affd5fef..c8ece82f 100644 --- a/shark_turbine/kernel/wave/utils.py +++ b/shark_turbine/kernel/wave/utils.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from ..compiler.ir import ( diff --git a/shark_turbine/kernel/wave/visualization.py b/shark_turbine/kernel/wave/visualization.py index 924c36bd..088f94c8 100644 --- a/shark_turbine/kernel/wave/visualization.py +++ b/shark_turbine/kernel/wave/visualization.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 graphviz_disabled = False diff --git a/shark_turbine/kernel/wave/wave.py b/shark_turbine/kernel/wave/wave.py index eb6003de..df6808c6 100644 --- a/shark_turbine/kernel/wave/wave.py +++ b/shark_turbine/kernel/wave/wave.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Any, Callable, Optional diff --git a/shark_turbine/kernel/wave/wave_sim.py b/shark_turbine/kernel/wave/wave_sim.py index 4265db61..c963918a 100644 --- a/shark_turbine/kernel/wave/wave_sim.py +++ b/shark_turbine/kernel/wave/wave_sim.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import inspect diff --git a/shark_turbine/ops/__init__.py b/shark_turbine/ops/__init__.py index c4aca599..5a5b552a 100644 --- a/shark_turbine/ops/__init__.py +++ b/shark_turbine/ops/__init__.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from . import iree diff --git a/shark_turbine/ops/_jinja_test_ops.py b/shark_turbine/ops/_jinja_test_ops.py index 6b3c5e6c..f55ad9a4 100644 --- a/shark_turbine/ops/_jinja_test_ops.py +++ b/shark_turbine/ops/_jinja_test_ops.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from ..support.ir_imports import ( diff --git a/shark_turbine/ops/_str_format_test_ops.py b/shark_turbine/ops/_str_format_test_ops.py index 6988a4ae..8341c9b6 100644 --- a/shark_turbine/ops/_str_format_test_ops.py +++ b/shark_turbine/ops/_str_format_test_ops.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from ..support.ir_imports import ( diff --git a/shark_turbine/ops/iree.py b/shark_turbine/ops/iree.py index 1609db2b..0e636577 100644 --- a/shark_turbine/ops/iree.py +++ b/shark_turbine/ops/iree.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Custom ops for built-in IREE functionality.""" diff --git a/shark_turbine/runtime/__init__.py b/shark_turbine/runtime/__init__.py index f1db6fe5..58cca1e7 100644 --- a/shark_turbine/runtime/__init__.py +++ b/shark_turbine/runtime/__init__.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from .device import * diff --git a/shark_turbine/runtime/device.py b/shark_turbine/runtime/device.py index d34f49a8..bb1e5ceb 100644 --- a/shark_turbine/runtime/device.py +++ b/shark_turbine/runtime/device.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from functools import lru_cache diff --git a/shark_turbine/runtime/launch.py b/shark_turbine/runtime/launch.py index 11a937f5..dbf8d8ce 100644 --- a/shark_turbine/runtime/launch.py +++ b/shark_turbine/runtime/launch.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Any, Callable, Optional, Sequence, Tuple diff --git a/shark_turbine/runtime/op_reg/__init__.py b/shark_turbine/runtime/op_reg/__init__.py index 32b0733b..53b667f8 100644 --- a/shark_turbine/runtime/op_reg/__init__.py +++ b/shark_turbine/runtime/op_reg/__init__.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from .base import * diff --git a/shark_turbine/runtime/op_reg/base.py b/shark_turbine/runtime/op_reg/base.py index 22600e75..5338bc27 100644 --- a/shark_turbine/runtime/op_reg/base.py +++ b/shark_turbine/runtime/op_reg/base.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Base classes for registering custom operations with the PyTorch diff --git a/shark_turbine/runtime/op_reg/compiler.py b/shark_turbine/runtime/op_reg/compiler.py index ae5d35b4..4c78f2a0 100644 --- a/shark_turbine/runtime/op_reg/compiler.py +++ b/shark_turbine/runtime/op_reg/compiler.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from dataclasses import dataclass diff --git a/shark_turbine/runtime/op_reg/eager.py b/shark_turbine/runtime/op_reg/eager.py index e32ebeb9..7993ca15 100644 --- a/shark_turbine/runtime/op_reg/eager.py +++ b/shark_turbine/runtime/op_reg/eager.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Custom op integration into the eager executor.""" diff --git a/shark_turbine/runtime/op_reg/impl_helper.py b/shark_turbine/runtime/op_reg/impl_helper.py index 471e6ccf..55e89d0c 100644 --- a/shark_turbine/runtime/op_reg/impl_helper.py +++ b/shark_turbine/runtime/op_reg/impl_helper.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Helpers for implementing ops. diff --git a/shark_turbine/runtime/tracing.py b/shark_turbine/runtime/tracing.py index abe908ed..4df7f250 100644 --- a/shark_turbine/runtime/tracing.py +++ b/shark_turbine/runtime/tracing.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import hashlib diff --git a/shark_turbine/support/__init__.py b/shark_turbine/support/__init__.py index bf935cb0..829b149a 100644 --- a/shark_turbine/support/__init__.py +++ b/shark_turbine/support/__init__.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 # Debugging must be loaded first as other low level things depend on it. diff --git a/shark_turbine/support/conversions.py b/shark_turbine/support/conversions.py index f07a0f24..32618fcf 100644 --- a/shark_turbine/support/conversions.py +++ b/shark_turbine/support/conversions.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Any, Callable diff --git a/shark_turbine/support/debugging.py b/shark_turbine/support/debugging.py index cf8475eb..b570e5a4 100644 --- a/shark_turbine/support/debugging.py +++ b/shark_turbine/support/debugging.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Debug flags and settings.""" diff --git a/shark_turbine/support/exceptions.py b/shark_turbine/support/exceptions.py index be2c2a63..875f030b 100644 --- a/shark_turbine/support/exceptions.py +++ b/shark_turbine/support/exceptions.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 diff --git a/shark_turbine/support/ir_imports.py b/shark_turbine/support/ir_imports.py index 09aa4042..229e8504 100644 --- a/shark_turbine/support/ir_imports.py +++ b/shark_turbine/support/ir_imports.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """Unifies all imports of iree.compiler.ir into one place.""" diff --git a/shark_turbine/support/logging.py b/shark_turbine/support/logging.py index 2bb205ea..0282c1f0 100644 --- a/shark_turbine/support/logging.py +++ b/shark_turbine/support/logging.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/shark_turbine/tools/__init__.py b/shark_turbine/tools/__init__.py index 69b64c55..fefa3d2d 100644 --- a/shark_turbine/tools/__init__.py +++ b/shark_turbine/tools/__init__.py @@ -1 +1,5 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from .interpreter import * diff --git a/shark_turbine/tools/interpreter.py b/shark_turbine/tools/interpreter.py index 5e4a0b15..34c53256 100644 --- a/shark_turbine/tools/interpreter.py +++ b/shark_turbine/tools/interpreter.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + import argparse import torch from ..support.logging import get_logger diff --git a/shark_turbine/transforms/builder.py b/shark_turbine/transforms/builder.py index eab07a24..23ab4339 100644 --- a/shark_turbine/transforms/builder.py +++ b/shark_turbine/transforms/builder.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import List, Optional, Sequence diff --git a/shark_turbine/transforms/general/add_metadata.py b/shark_turbine/transforms/general/add_metadata.py index 44aa2413..c98db168 100644 --- a/shark_turbine/transforms/general/add_metadata.py +++ b/shark_turbine/transforms/general/add_metadata.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, inc. +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """ diff --git a/shark_turbine/transforms/general/custom_op_expansion.py b/shark_turbine/transforms/general/custom_op_expansion.py index 55de6f0a..0a192666 100644 --- a/shark_turbine/transforms/general/custom_op_expansion.py +++ b/shark_turbine/transforms/general/custom_op_expansion.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Callable diff --git a/shark_turbine/transforms/general/rename_parameters.py b/shark_turbine/transforms/general/rename_parameters.py index d74de0e4..fa8939fd 100644 --- a/shark_turbine/transforms/general/rename_parameters.py +++ b/shark_turbine/transforms/general/rename_parameters.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 """This pass will rename any #stream.parameter.named<> attributes on globals. diff --git a/shark_turbine/transforms/merger.py b/shark_turbine/transforms/merger.py index a1b1be55..847b40c7 100644 --- a/shark_turbine/transforms/merger.py +++ b/shark_turbine/transforms/merger.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Any, Dict, List, Optional, Sequence, Union diff --git a/shark_turbine/transforms/quantization/mm_group_quant.py b/shark_turbine/transforms/quantization/mm_group_quant.py index 2f30a69e..95c32396 100644 --- a/shark_turbine/transforms/quantization/mm_group_quant.py +++ b/shark_turbine/transforms/quantization/mm_group_quant.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Optional, cast diff --git a/shark_turbine/transforms/rewriter.py b/shark_turbine/transforms/rewriter.py index 90205e67..e3aedf49 100644 --- a/shark_turbine/transforms/rewriter.py +++ b/shark_turbine/transforms/rewriter.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from typing import Dict, Generic, List, Optional, Set, Union, Type, TypeVar, cast diff --git a/tests/aot/api_test.py b/tests/aot/api_test.py index e038704d..b19ec574 100644 --- a/tests/aot/api_test.py +++ b/tests/aot/api_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/aot/args_test.py b/tests/aot/args_test.py index d7ec458d..9c29f2ec 100644 --- a/tests/aot/args_test.py +++ b/tests/aot/args_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/aot/compiled_exported_program_test.py b/tests/aot/compiled_exported_program_test.py index baaeb9bb..26910c8a 100644 --- a/tests/aot/compiled_exported_program_test.py +++ b/tests/aot/compiled_exported_program_test.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc. +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/aot/decompositions_test.py b/tests/aot/decompositions_test.py index baf96604..ced6ad7c 100644 --- a/tests/aot/decompositions_test.py +++ b/tests/aot/decompositions_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import torch diff --git a/tests/aot/functionalize_test.py b/tests/aot/functionalize_test.py index 0cad8e93..4b23eea5 100644 --- a/tests/aot/functionalize_test.py +++ b/tests/aot/functionalize_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/aot/fx_programs_test.py b/tests/aot/fx_programs_test.py index c54f1851..a86da9cf 100644 --- a/tests/aot/fx_programs_test.py +++ b/tests/aot/fx_programs_test.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from pathlib import Path diff --git a/tests/aot/globals_test.py b/tests/aot/globals_test.py index 26bab1a6..3605fc13 100644 --- a/tests/aot/globals_test.py +++ b/tests/aot/globals_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/aot/iree_procedural_test.py b/tests/aot/iree_procedural_test.py index 9f479921..7d5193e8 100644 --- a/tests/aot/iree_procedural_test.py +++ b/tests/aot/iree_procedural_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/aot/jittable_test.py b/tests/aot/jittable_test.py index 9c87fb11..be7c2992 100644 --- a/tests/aot/jittable_test.py +++ b/tests/aot/jittable_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/aot/non_strict_export_test.py b/tests/aot/non_strict_export_test.py index ece961dc..90b7091e 100644 --- a/tests/aot/non_strict_export_test.py +++ b/tests/aot/non_strict_export_test.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + import logging import unittest from torch import nn diff --git a/tests/aot/params_test.py b/tests/aot/params_test.py index a1d64206..6aaaec47 100644 --- a/tests/aot/params_test.py +++ b/tests/aot/params_test.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/dynamo/backend_smoke_test.py b/tests/dynamo/backend_smoke_test.py index 479b8713..ac8a1b58 100644 --- a/tests/dynamo/backend_smoke_test.py +++ b/tests/dynamo/backend_smoke_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import torch diff --git a/tests/dynamo/importer_backward_test.py b/tests/dynamo/importer_backward_test.py index e12689b2..c2154a5c 100644 --- a/tests/dynamo/importer_backward_test.py +++ b/tests/dynamo/importer_backward_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from testutils import * diff --git a/tests/dynamo/importer_basic_test.py b/tests/dynamo/importer_basic_test.py index 200c9578..56a4f24c 100644 --- a/tests/dynamo/importer_basic_test.py +++ b/tests/dynamo/importer_basic_test.py @@ -1,8 +1,8 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 + import torch from testutils import * diff --git a/tests/dynamo/importer_dynamic_test.py b/tests/dynamo/importer_dynamic_test.py index 72ff4f82..a39039ec 100644 --- a/tests/dynamo/importer_dynamic_test.py +++ b/tests/dynamo/importer_dynamic_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/dynamo/llama_test.py b/tests/dynamo/llama_test.py index 65750277..3b018fe2 100644 --- a/tests/dynamo/llama_test.py +++ b/tests/dynamo/llama_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/dynamo/mninst_test.py b/tests/dynamo/mninst_test.py index 88742e2b..435afccb 100644 --- a/tests/dynamo/mninst_test.py +++ b/tests/dynamo/mninst_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/dynamo/tensor_scalar_op_conversion_importer_test.py b/tests/dynamo/tensor_scalar_op_conversion_importer_test.py index a7d9ea63..d90b1025 100644 --- a/tests/dynamo/tensor_scalar_op_conversion_importer_test.py +++ b/tests/dynamo/tensor_scalar_op_conversion_importer_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from testutils import * diff --git a/tests/dynamo/tensor_test.py b/tests/dynamo/tensor_test.py index fcd40660..bd828382 100644 --- a/tests/dynamo/tensor_test.py +++ b/tests/dynamo/tensor_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/dynamo/testutils.py b/tests/dynamo/testutils.py index 2a89ef92..2376e18d 100644 --- a/tests/dynamo/testutils.py +++ b/tests/dynamo/testutils.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/dynamo/type_conversion_test.py b/tests/dynamo/type_conversion_test.py index dfc3de25..59b6a1da 100644 --- a/tests/dynamo/type_conversion_test.py +++ b/tests/dynamo/type_conversion_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/examples/aot_mlp_test.py b/tests/examples/aot_mlp_test.py index c4266a4a..4f89ad4f 100644 --- a/tests/examples/aot_mlp_test.py +++ b/tests/examples/aot_mlp_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/generated/evaluate.py b/tests/generated/evaluate.py index 3184930d..8ad44109 100644 --- a/tests/generated/evaluate.py +++ b/tests/generated/evaluate.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from stats import ErrorAggregatorDict import logging diff --git a/tests/generated/extract_unimpl_ops.sh b/tests/generated/extract_unimpl_ops.sh index 65e207d8..02684fd7 100644 --- a/tests/generated/extract_unimpl_ops.sh +++ b/tests/generated/extract_unimpl_ops.sh @@ -1,3 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + python main.py --limit 500 -j 8 | grep "NotImplementedError: Unimplemented torch op in the IREE compiler" | grep -o "'[^']*'" | sed "s/'//g" > unimplemented_torch_ops.txt diff --git a/tests/generated/main.py b/tests/generated/main.py index 98f15feb..1d635162 100644 --- a/tests/generated/main.py +++ b/tests/generated/main.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + import os import sys import argparse diff --git a/tests/generated/running_tests.md b/tests/generated/running_tests.md index fbcd071d..66ad70a5 100644 --- a/tests/generated/running_tests.md +++ b/tests/generated/running_tests.md @@ -1,3 +1,9 @@ + + # Running Tests ## Set Up diff --git a/tests/generated/stats.py b/tests/generated/stats.py index e39795bb..c0dc67b2 100644 --- a/tests/generated/stats.py +++ b/tests/generated/stats.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + import csv import logging import os diff --git a/tests/generated/testutils.py b/tests/generated/testutils.py index 9131d1d7..ade7e67c 100644 --- a/tests/generated/testutils.py +++ b/tests/generated/testutils.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + import time import types import os diff --git a/tests/kernel/aot_kernel_test.py b/tests/kernel/aot_kernel_test.py index 690e366a..e0b3a698 100644 --- a/tests/kernel/aot_kernel_test.py +++ b/tests/kernel/aot_kernel_test.py @@ -1,7 +1,6 @@ # Copyright 2024 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import re diff --git a/tests/kernel/arith_test.py b/tests/kernel/arith_test.py index 1631454c..8d3b7d5e 100644 --- a/tests/kernel/arith_test.py +++ b/tests/kernel/arith_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/kernel/compiler/utils_test.py b/tests/kernel/compiler/utils_test.py index be084613..35447062 100644 --- a/tests/kernel/compiler/utils_test.py +++ b/tests/kernel/compiler/utils_test.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + import logging import pytest import unittest diff --git a/tests/kernel/dispatch_codegen_test.py b/tests/kernel/dispatch_codegen_test.py index be17a86d..fcde2147 100644 --- a/tests/kernel/dispatch_codegen_test.py +++ b/tests/kernel/dispatch_codegen_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/kernel/fused_attention_test.py b/tests/kernel/fused_attention_test.py index 89883780..78390e8e 100644 --- a/tests/kernel/fused_attention_test.py +++ b/tests/kernel/fused_attention_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/kernel/indexing_test.py b/tests/kernel/indexing_test.py index 8bc27c50..5d90cb27 100644 --- a/tests/kernel/indexing_test.py +++ b/tests/kernel/indexing_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import re diff --git a/tests/kernel/simple_kernel_test.py b/tests/kernel/simple_kernel_test.py index 87cf3ed2..c7d536a1 100644 --- a/tests/kernel/simple_kernel_test.py +++ b/tests/kernel/simple_kernel_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/kernel/types_test.py b/tests/kernel/types_test.py index 87dc6536..9b7ad49f 100644 --- a/tests/kernel/types_test.py +++ b/tests/kernel/types_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/kernel/vector_codegen_test.py b/tests/kernel/vector_codegen_test.py index fcd33462..b3c34e92 100644 --- a/tests/kernel/vector_codegen_test.py +++ b/tests/kernel/vector_codegen_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/kernel/wave/.gitignore b/tests/kernel/wave/.gitignore index 68882edb..1b4ea92a 100644 --- a/tests/kernel/wave/.gitignore +++ b/tests/kernel/wave/.gitignore @@ -1 +1,5 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + wave_gemm_*.mlir diff --git a/tests/kernel/wave/__init__.py b/tests/kernel/wave/__init__.py index c68e0440..3b7afebb 100644 --- a/tests/kernel/wave/__init__.py +++ b/tests/kernel/wave/__init__.py @@ -1,5 +1,3 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 diff --git a/tests/kernel/wave/constraints_test.py b/tests/kernel/wave/constraints_test.py index 418c3c8b..894ad4b5 100644 --- a/tests/kernel/wave/constraints_test.py +++ b/tests/kernel/wave/constraints_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/kernel/wave/scheduling_test.py b/tests/kernel/wave/scheduling_test.py index 93d9cb6c..147f2820 100644 --- a/tests/kernel/wave/scheduling_test.py +++ b/tests/kernel/wave/scheduling_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import unittest diff --git a/tests/kernel/wave/test_param.json.license b/tests/kernel/wave/test_param.json.license new file mode 100644 index 00000000..afa119fa --- /dev/null +++ b/tests/kernel/wave/test_param.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 The IREE Authors + +SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/tests/kernel/wave/types_test.py b/tests/kernel/wave/types_test.py index d27c4c47..cb45ceda 100644 --- a/tests/kernel/wave/types_test.py +++ b/tests/kernel/wave/types_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/kernel/wave/visualization_test.py b/tests/kernel/wave/visualization_test.py index 17cce11c..410144fd 100644 --- a/tests/kernel/wave/visualization_test.py +++ b/tests/kernel/wave/visualization_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/kernel/wave/wave_e2e_test.py b/tests/kernel/wave/wave_e2e_test.py index 4c2f04db..00a53f15 100644 --- a/tests/kernel/wave/wave_e2e_test.py +++ b/tests/kernel/wave/wave_e2e_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import shark_turbine.kernel as tk diff --git a/tests/kernel/wave/wave_gemm_test.py b/tests/kernel/wave/wave_gemm_test.py index 344032a4..4d774d15 100644 --- a/tests/kernel/wave/wave_gemm_test.py +++ b/tests/kernel/wave/wave_gemm_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/kernel/wave/wave_sim_test.py b/tests/kernel/wave/wave_sim_test.py index 5fa5695a..4f5f1cba 100644 --- a/tests/kernel/wave/wave_sim_test.py +++ b/tests/kernel/wave/wave_sim_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import pytest diff --git a/tests/kernel/wave/wave_utils_test.py b/tests/kernel/wave/wave_utils_test.py index ec1198fd..bb307db0 100644 --- a/tests/kernel/wave/wave_utils_test.py +++ b/tests/kernel/wave/wave_utils_test.py @@ -1,7 +1,5 @@ -# Copyright 2024 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/ops/iree_test.py b/tests/ops/iree_test.py index b06a7910..d6f2865f 100644 --- a/tests/ops/iree_test.py +++ b/tests/ops/iree_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/runtime/device_test.py b/tests/runtime/device_test.py index e78aff8e..0df21c4c 100644 --- a/tests/runtime/device_test.py +++ b/tests/runtime/device_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/runtime/launch_test.py b/tests/runtime/launch_test.py index 1a142161..ccaca2e7 100644 --- a/tests/runtime/launch_test.py +++ b/tests/runtime/launch_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Nod Labs, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from parameterized import parameterized_class diff --git a/tests/runtime/op_reg/impl_helper_test.py b/tests/runtime/op_reg/impl_helper_test.py index b0797c2d..357c2d5b 100644 --- a/tests/runtime/op_reg/impl_helper_test.py +++ b/tests/runtime/op_reg/impl_helper_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/runtime/op_reg/kernel_aot_test.py b/tests/runtime/op_reg/kernel_aot_test.py index 4aa04857..0afad660 100644 --- a/tests/runtime/op_reg/kernel_aot_test.py +++ b/tests/runtime/op_reg/kernel_aot_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/runtime/op_reg/kernel_reg_test.py b/tests/runtime/op_reg/kernel_reg_test.py index 75554b04..7b9dd8b1 100644 --- a/tests/runtime/op_reg/kernel_reg_test.py +++ b/tests/runtime/op_reg/kernel_reg_test.py @@ -1,7 +1,6 @@ # Copyright 2023 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/tools/interpreter_test.py b/tests/tools/interpreter_test.py index 0513b10b..715f7c21 100644 --- a/tests/tools/interpreter_test.py +++ b/tests/tools/interpreter_test.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 The IREE Authors +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + from shark_turbine.tools.interpreter import Interpreter import shark_turbine.kernel as tk import shark_turbine.kernel.lang as tkl diff --git a/tests/top_level_package_test.py b/tests/top_level_package_test.py index 52ea796b..68169a56 100644 --- a/tests/top_level_package_test.py +++ b/tests/top_level_package_test.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc. +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/transforms/general/add_metadata_test.py b/tests/transforms/general/add_metadata_test.py index 8055fa26..10f4b7e5 100644 --- a/tests/transforms/general/add_metadata_test.py +++ b/tests/transforms/general/add_metadata_test.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2024 Advanced Micro Devices, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from pathlib import Path diff --git a/tests/transforms/general/custom_op_expansion_test.py b/tests/transforms/general/custom_op_expansion_test.py index b94e2750..125af09e 100644 --- a/tests/transforms/general/custom_op_expansion_test.py +++ b/tests/transforms/general/custom_op_expansion_test.py @@ -1,7 +1,6 @@ # Copyright 2024 Advanced Micro Devices, Inc +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 import logging diff --git a/tests/transforms/general/rename_parameters_test.py b/tests/transforms/general/rename_parameters_test.py index 74fc6753..fa097d69 100644 --- a/tests/transforms/general/rename_parameters_test.py +++ b/tests/transforms/general/rename_parameters_test.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from pathlib import Path diff --git a/tests/transforms/quantization/mm_group_quant_test.py b/tests/transforms/quantization/mm_group_quant_test.py index c6870d2c..6462e49b 100644 --- a/tests/transforms/quantization/mm_group_quant_test.py +++ b/tests/transforms/quantization/mm_group_quant_test.py @@ -1,8 +1,7 @@ +# Copyright 2022 The IREE Authors # Copyright 2023 Nod Labs, Inc -# Portions Copyright 2022 The IREE Authors +# SPDX-FileCopyrightText: 2024 The IREE Authors # -# 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 from pathlib import Path diff --git a/version_info.json.license b/version_info.json.license new file mode 100644 index 00000000..afa119fa --- /dev/null +++ b/version_info.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 The IREE Authors + +SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception