From aa923ba2ca96dadc9110fa08ea2303c042078f6a Mon Sep 17 00:00:00 2001 From: Puneet Matharu Date: Thu, 11 Dec 2025 11:24:44 +0000 Subject: [PATCH] Make project REUSE compliant. --- .github/workflows/pytorch.yml | 17 +- .github/workflows/tensorflow.yml | 17 +- .gitignore | 4 + .pre-commit-config.yaml | 60 ++++++ CONTRIBUTING.md | 115 ++++++++++ LICENSES/Apache-2.0.txt | 201 ++++++++++++++++++ ML-Frameworks/pytorch-aarch64/.dockerignore | 4 + ML-Frameworks/pytorch-aarch64/.gitignore | 4 + ML-Frameworks/pytorch-aarch64/CHANGELOG.md | 8 +- ML-Frameworks/pytorch-aarch64/Dockerfile | 19 +- ML-Frameworks/pytorch-aarch64/README.md | 6 + ML-Frameworks/pytorch-aarch64/bash_profile | 17 +- .../pytorch-aarch64/build-torch-ao-wheel.sh | 17 +- ML-Frameworks/pytorch-aarch64/build-wheel.sh | 21 +- ML-Frameworks/pytorch-aarch64/build.sh | 17 +- ML-Frameworks/pytorch-aarch64/bump-sources.sh | 17 +- ML-Frameworks/pytorch-aarch64/cpu_info.sh | 17 +- ML-Frameworks/pytorch-aarch64/dockerize.sh | 17 +- .../pytorch-aarch64/examples/.gitignore | 4 + .../pytorch-aarch64/examples/README.md | 6 + .../examples/answer_questions.py | 17 +- .../examples/classify_image.py | 17 +- .../examples/detect_objects.py | 17 +- .../examples/executor/model.py | 17 +- .../aarch64_cpu_channelwise.json.license | 3 + .../aarch64_cpu_groupwise.json.license | 3 + .../examples/llama_vision_instruct.py | 17 +- .../examples/openimages-mlperf.json.license | 3 + .../examples/quantized_linear.py | 17 +- .../pytorch-aarch64/examples/resnet_v1-50.yml | 17 +- .../examples/run_unit_tests.sh | 17 +- .../pytorch-aarch64/examples/ssd_resnet34.py | 17 +- .../pytorch-aarch64/examples/ssd_resnet34.yml | 17 +- .../pytorch-aarch64/examples/test-examples.sh | 17 +- .../examples/transformers_llm_text_gen.py | 17 +- .../pytorch-aarch64/examples/utils/common.py | 17 +- .../pytorch-aarch64/examples/utils/image.py | 17 +- .../pytorch-aarch64/examples/utils/label.py | 17 +- .../pytorch-aarch64/examples/utils/nlp.py | 17 +- .../examples/utils/vision_parser.py | 17 +- ML-Frameworks/pytorch-aarch64/get-source.sh | 17 +- .../pytorch-aarch64/requirements.txt | 4 + .../scripts/build-mlcommons.sh | 17 +- .../scripts/download-dataset.sh | 5 + .../pytorch-aarch64/scripts/download-model.sh | 5 + .../pytorch-aarch64/welcome.txt.license | 3 + .../tensorflow-aarch64/.dockerignore | 4 + ML-Frameworks/tensorflow-aarch64/.gitignore | 4 + ML-Frameworks/tensorflow-aarch64/CHANGELOG.md | 6 + ML-Frameworks/tensorflow-aarch64/Dockerfile | 17 +- ML-Frameworks/tensorflow-aarch64/README.md | 6 + ML-Frameworks/tensorflow-aarch64/bash_profile | 17 +- .../tensorflow-aarch64/build-wheel.sh | 17 +- ML-Frameworks/tensorflow-aarch64/build.sh | 17 +- .../tensorflow-aarch64/bump-sources.sh | 17 +- ML-Frameworks/tensorflow-aarch64/dockerize.sh | 17 +- .../tensorflow-aarch64/examples/README.md | 6 + .../examples/answer_questions.py | 17 +- .../examples/classify_image.py | 17 +- .../examples/detect_objects.py | 17 +- .../examples/executor/model.py | 17 +- .../examples/resnet_v1-50.yml | 17 +- .../examples/run_unit_tests.sh | 17 +- .../examples/ssd_resnet34.yml | 17 +- .../examples/test_examples.sh | 17 +- .../examples/utils/common.py | 17 +- .../examples/utils/image.py | 17 +- .../examples/utils/label.py | 17 +- .../tensorflow-aarch64/examples/utils/nlp.py | 17 +- .../examples/utils/nlp_parser.py | 17 +- .../examples/utils/vision_parser.py | 17 +- .../tensorflow-aarch64/get-source.sh | 17 +- .../tensorflow-aarch64/requirements.txt | 4 + .../tensorflow-aarch64/welcome.txt.license | 3 + ML-Frameworks/utils/git-utils.sh | 17 +- README.md | 8 +- SECURITY.md | 6 + 77 files changed, 588 insertions(+), 770 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100644 CONTRIBUTING.md create mode 100644 LICENSES/Apache-2.0.txt create mode 100644 ML-Frameworks/pytorch-aarch64/examples/gen_ai_utils/quant_configs/aarch64_cpu_channelwise.json.license create mode 100644 ML-Frameworks/pytorch-aarch64/examples/gen_ai_utils/quant_configs/aarch64_cpu_groupwise.json.license create mode 100644 ML-Frameworks/pytorch-aarch64/examples/openimages-mlperf.json.license create mode 100644 ML-Frameworks/pytorch-aarch64/welcome.txt.license create mode 100644 ML-Frameworks/tensorflow-aarch64/welcome.txt.license diff --git a/.github/workflows/pytorch.yml b/.github/workflows/pytorch.yml index c0edcf25..b115d991 100644 --- a/.github/workflows/pytorch.yml +++ b/.github/workflows/pytorch.yml @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 name: "Build and test PyTorch" diff --git a/.github/workflows/tensorflow.yml b/.github/workflows/tensorflow.yml index 97d7011f..49969cd0 100644 --- a/.github/workflows/tensorflow.yml +++ b/.github/workflows/tensorflow.yml @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 name: "Build and test Tensorflow" diff --git a/.gitignore b/.gitignore index 396416b2..8abf8a1f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. +# +# SPDX-License-Identifier: Apache-2.0 + ao/ venv*/ __pycache__/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..440f47fd --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. +# +# SPDX-License-Identifier: Apache-2.0 + +fail_fast: false + +repos: + - repo: local + hooks: + # Python/YAML/shell: use hash comments (no --multi-line) + - id: reuse-annotate-current-year-python-yaml-shell-files + name: REUSE Annotate (Python add current year, merge) + language: python + additional_dependencies: [reuse==6.2.0] + entry: reuse annotate + args: + - --merge-copyrights + - --license + - Apache-2.0 + - --copyright + - Arm Limited and affiliates. + - --copyright-prefix + - spdx-string + - --style + - python + pass_filenames: true + files: '(\.gitignore|\.dockerignore|requirements\.txt|bash_profile|Dockerfile|\.(py|yml|yaml|sh|bash))$' + stages: [ pre-commit ] + + # JSON/Markdown/welcome.txt: use sidecar .license files + - id: reuse-annotate-current-year-json-and-md + name: REUSE Annotate (JSON/Markdown/welcome.txt sidecar fallback add current year, merge) + language: python + additional_dependencies: [reuse==6.2.0] + entry: reuse annotate + args: + - --merge-copyrights + - --license + - Apache-2.0 + - --copyright + - Arm Limited and affiliates. + - --copyright-prefix + - spdx-string + - --fallback-dot-license + pass_filenames: true + files: '(welcome\.txt|\.(json|md))$' + stages: [ pre-commit ] + + - repo: https://github.com/fsfe/reuse-tool + rev: v6.2.0 + hooks: + - id: reuse-lint-file + stages: [ pre-commit ] + name: "REUSE Compliant Copyright and License" + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: trailing-whitespace + stages: [ pre-commit ] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..e2b5187a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,115 @@ + + +# CONTRIBUTING + +Thank you for your interest in contributing to ML Tool Solutions. +This document describes the recommended development workflow, coding standards, and how to use the repository's automated tooling, particularly the pre-commit hooks that enforce SPDX/REUSE compliance, formatting checks, and other quality gates. + +We welcome contributions through GitHub Pull Requests. +Please read this guide before submitting changes. + +## Development Workflow + +### Fork, Branch, and Submit a PR + +1. Fork the repository. +2. Create a feature branch: + + ```bash + git checkout -b my-feature + ``` + +3. Make changes. +4. Ensure all automated checks (pre-commit hooks) pass locally. +5. Submit a pull request on GitHub. + +All PRs must have: + +- A clear description of the change. +- Passing CI checks. +- SPDX/REUSE-compliant licensing metadata (handled automatically by the hooks). +- Clean commits or a tidy commit history. + +## Pre-Commit Hooks (IMPORTANT) + +This repository uses `pre-commit` to automatically enforce: + +- SPDX/REUSE-compliant license and copyright notices +- Correct SPDX headers and/or sidecar `.license` files +- `reuse-lint` checks on modified files +- Trailing whitespace cleanup + +These hooks ensure all contributions meet licensing and formatting requirements before changes are committed. + +### Install `pre-commit` + +You only need to do this once per machine: + +```bash +pip install pre-commit +pre-commit install +``` + +This installs the git hooks so they run automatically before each commit. + +Verify installation: + +```bash +pre-commit --version +``` + +### Typical Contributor Workflow with Hooks + +1. Modify files. +2. Stage your changes: + + ```bash + git add . + ``` + +3. Commit: + + ```bash + git commit -m "..." + ``` + +4. The hooks run automatically. If they fail: + - Inspect the changed files (`git diff`) + - Apply fixes + - Stage again + - Re-run: + + ```bash + pre-commit run --all-files + ``` + +5. Push once everything passes: + + ```bash + git push + ``` + +## Licensing Requirements (SPDX/REUSE) + +This project follows the [REUSE specification](https://reuse.software). + +Every file must contain: + +- An SPDX license identifier +- `SPDX-FileCopyrightText` statements + +For formats where inline headers are not appropriate (e.g., binaries, JSON), use sidecar .license files. +The pre-commit hooks manage most of this automatically. + +## Coding Conventions + +- Keep scripts POSIX-compatible unless necessary. +- Use SPDX headers based on examples already in the repository. + +## Contact Us + +If you have questions, comments, and/or suggestions? Please raise an [issue](https://github.com/ARM-software/Tool-Solutions/issues/new/choose). diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/LICENSES/Apache-2.0.txt @@ -0,0 +1,201 @@ + 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/ML-Frameworks/pytorch-aarch64/.dockerignore b/ML-Frameworks/pytorch-aarch64/.dockerignore index b856d642..795909e6 100644 --- a/ML-Frameworks/pytorch-aarch64/.dockerignore +++ b/ML-Frameworks/pytorch-aarch64/.dockerignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. +# +# SPDX-License-Identifier: Apache-2.0 + ComputeLibrary/ pytorch/ !pytorch/test diff --git a/ML-Frameworks/pytorch-aarch64/.gitignore b/ML-Frameworks/pytorch-aarch64/.gitignore index ab069c68..b38e8e5a 100644 --- a/ML-Frameworks/pytorch-aarch64/.gitignore +++ b/ML-Frameworks/pytorch-aarch64/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. +# +# SPDX-License-Identifier: Apache-2.0 + ComputeLibrary/ pytorch/ results/ diff --git a/ML-Frameworks/pytorch-aarch64/CHANGELOG.md b/ML-Frameworks/pytorch-aarch64/CHANGELOG.md index c7899788..b5e14502 100644 --- a/ML-Frameworks/pytorch-aarch64/CHANGELOG.md +++ b/ML-Frameworks/pytorch-aarch64/CHANGELOG.md @@ -1,3 +1,9 @@ + + # Changelog All significant changes to the PyTorch container builds in docker/pytorch-aarch64 will be noted in this log. @@ -37,7 +43,7 @@ https://github.com/ARM-software/Tool-Solutions/tree/r25.12 https://github.com/ARM-software/Tool-Solutions/tree/r25.11 ### Added - - Adds PyTorch [PR #167720](https://github.com/pytorch/pytorch/pull/167720), to allow missing cutlass file + - Adds PyTorch [PR #167720](https://github.com/pytorch/pytorch/pull/167720), to allow missing cutlass file if CUDA disabled. - Adds oneDNN [PR #4237](https://github.com/uxlfoundation/oneDNN/pull/4237), which improves cache blocking 4/8 inner blocks. diff --git a/ML-Frameworks/pytorch-aarch64/Dockerfile b/ML-Frameworks/pytorch-aarch64/Dockerfile index 99618610..4c7d3103 100644 --- a/ML-Frameworks/pytorch-aarch64/Dockerfile +++ b/ML-Frameworks/pytorch-aarch64/Dockerfile @@ -1,20 +1,7 @@ -# ******************************************************************************* -# Copyright 2020-2025 Arm Limited and affiliates. -# Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2020-2025 Arm Limited and affiliates. +# SPDX-FileCopyrightText: Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 # Specify DOCKER_IMAGE_MIRROR if you want to use a mirror of hub.docker.com ARG DOCKER_IMAGE_MIRROR="" diff --git a/ML-Frameworks/pytorch-aarch64/README.md b/ML-Frameworks/pytorch-aarch64/README.md index 6b7cb4d4..c55feff3 100644 --- a/ML-Frameworks/pytorch-aarch64/README.md +++ b/ML-Frameworks/pytorch-aarch64/README.md @@ -1,3 +1,9 @@ + + # PyTorch for AArch64 > [!WARNING] diff --git a/ML-Frameworks/pytorch-aarch64/bash_profile b/ML-Frameworks/pytorch-aarch64/bash_profile index 5b90bfd5..b5ea5cb7 100644 --- a/ML-Frameworks/pytorch-aarch64/bash_profile +++ b/ML-Frameworks/pytorch-aarch64/bash_profile @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2020 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2020, 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 # Source global definitions if they're there if [ -f /etc/bashrc ]; then diff --git a/ML-Frameworks/pytorch-aarch64/build-torch-ao-wheel.sh b/ML-Frameworks/pytorch-aarch64/build-torch-ao-wheel.sh index f772c41b..071949e7 100755 --- a/ML-Frameworks/pytorch-aarch64/build-torch-ao-wheel.sh +++ b/ML-Frameworks/pytorch-aarch64/build-torch-ao-wheel.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2024-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 # Note that this script intentionally has no options. It builds *the* torchao # Tool-Solutions, of which there is only one type diff --git a/ML-Frameworks/pytorch-aarch64/build-wheel.sh b/ML-Frameworks/pytorch-aarch64/build-wheel.sh index 095c2d27..a0771173 100755 --- a/ML-Frameworks/pytorch-aarch64/build-wheel.sh +++ b/ML-Frameworks/pytorch-aarch64/build-wheel.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2024-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 # Note that this script intentionally has no options. It builds *the* PyTorch # Tool-Solutions, of which there is only one type @@ -23,8 +10,8 @@ # The logic in this script should mirror the upstream build pipelines as closely # as possible, along with Tool-Solutions specific changes we want to test (e.g. # installing tbb) or improving local development in a way that doesn't affect -# the result. Currently the upstream logic is defined in -# pytorch/.github/workflows/_binary-build-linux.yml +# the result. Currently the upstream logic is defined in +# pytorch/.github/workflows/_binary-build-linux.yml # and # pytorch/.github/workflows/generated-linux-aarch64-binary-manywheel-nightly.yml diff --git a/ML-Frameworks/pytorch-aarch64/build.sh b/ML-Frameworks/pytorch-aarch64/build.sh index 6f538c93..5bfdb076 100755 --- a/ML-Frameworks/pytorch-aarch64/build.sh +++ b/ML-Frameworks/pytorch-aarch64/build.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2024-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2020-2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 set -eux -o pipefail diff --git a/ML-Frameworks/pytorch-aarch64/bump-sources.sh b/ML-Frameworks/pytorch-aarch64/bump-sources.sh index fa2ba7c5..4328f03f 100755 --- a/ML-Frameworks/pytorch-aarch64/bump-sources.sh +++ b/ML-Frameworks/pytorch-aarch64/bump-sources.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2024-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 function git-bump { git fetch origin $1 diff --git a/ML-Frameworks/pytorch-aarch64/cpu_info.sh b/ML-Frameworks/pytorch-aarch64/cpu_info.sh index 2b0db230..506e7757 100644 --- a/ML-Frameworks/pytorch-aarch64/cpu_info.sh +++ b/ML-Frameworks/pytorch-aarch64/cpu_info.sh @@ -1,21 +1,8 @@ #!/usr/bin/env bash -# ******************************************************************************* -# Copyright 2021 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 ############################################################0#################### # Functions to set correct target properties. diff --git a/ML-Frameworks/pytorch-aarch64/dockerize.sh b/ML-Frameworks/pytorch-aarch64/dockerize.sh index 65682f64..0ded8aa4 100755 --- a/ML-Frameworks/pytorch-aarch64/dockerize.sh +++ b/ML-Frameworks/pytorch-aarch64/dockerize.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 set -eux -o pipefail diff --git a/ML-Frameworks/pytorch-aarch64/examples/.gitignore b/ML-Frameworks/pytorch-aarch64/examples/.gitignore index 7eb75bd4..a196d982 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/.gitignore +++ b/ML-Frameworks/pytorch-aarch64/examples/.gitignore @@ -1,2 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. +# +# SPDX-License-Identifier: Apache-2.0 + ssd_resnet*/ dev-v2.0.json diff --git a/ML-Frameworks/pytorch-aarch64/examples/README.md b/ML-Frameworks/pytorch-aarch64/examples/README.md index d0875467..f6c0970a 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/README.md +++ b/ML-Frameworks/pytorch-aarch64/examples/README.md @@ -1,3 +1,9 @@ + + # Examples diff --git a/ML-Frameworks/pytorch-aarch64/examples/answer_questions.py b/ML-Frameworks/pytorch-aarch64/examples/answer_questions.py index 9c3591c0..c2e91057 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/answer_questions.py +++ b/ML-Frameworks/pytorch-aarch64/examples/answer_questions.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2022, 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 import sys import random diff --git a/ML-Frameworks/pytorch-aarch64/examples/classify_image.py b/ML-Frameworks/pytorch-aarch64/examples/classify_image.py index d08e3636..825314bd 100755 --- a/ML-Frameworks/pytorch-aarch64/examples/classify_image.py +++ b/ML-Frameworks/pytorch-aarch64/examples/classify_image.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ This example demonstrates how to load an image classification model and run inference on a single image diff --git a/ML-Frameworks/pytorch-aarch64/examples/detect_objects.py b/ML-Frameworks/pytorch-aarch64/examples/detect_objects.py index 54f7c238..6c0d1ef4 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/detect_objects.py +++ b/ML-Frameworks/pytorch-aarch64/examples/detect_objects.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ This example demonstrates how to load an object detection model and run inference on a single image diff --git a/ML-Frameworks/pytorch-aarch64/examples/executor/model.py b/ML-Frameworks/pytorch-aarch64/examples/executor/model.py index 93df58a1..80405790 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/executor/model.py +++ b/ML-Frameworks/pytorch-aarch64/examples/executor/model.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021-2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ Class that wraps around TensorFlow session and execute frozen model """ diff --git a/ML-Frameworks/pytorch-aarch64/examples/gen_ai_utils/quant_configs/aarch64_cpu_channelwise.json.license b/ML-Frameworks/pytorch-aarch64/examples/gen_ai_utils/quant_configs/aarch64_cpu_channelwise.json.license new file mode 100644 index 00000000..0c7ebc53 --- /dev/null +++ b/ML-Frameworks/pytorch-aarch64/examples/gen_ai_utils/quant_configs/aarch64_cpu_channelwise.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. + +SPDX-License-Identifier: Apache-2.0 diff --git a/ML-Frameworks/pytorch-aarch64/examples/gen_ai_utils/quant_configs/aarch64_cpu_groupwise.json.license b/ML-Frameworks/pytorch-aarch64/examples/gen_ai_utils/quant_configs/aarch64_cpu_groupwise.json.license new file mode 100644 index 00000000..0c7ebc53 --- /dev/null +++ b/ML-Frameworks/pytorch-aarch64/examples/gen_ai_utils/quant_configs/aarch64_cpu_groupwise.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. + +SPDX-License-Identifier: Apache-2.0 diff --git a/ML-Frameworks/pytorch-aarch64/examples/llama_vision_instruct.py b/ML-Frameworks/pytorch-aarch64/examples/llama_vision_instruct.py index f6dce1b6..778d9a47 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/llama_vision_instruct.py +++ b/ML-Frameworks/pytorch-aarch64/examples/llama_vision_instruct.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 import argparse import requests diff --git a/ML-Frameworks/pytorch-aarch64/examples/openimages-mlperf.json.license b/ML-Frameworks/pytorch-aarch64/examples/openimages-mlperf.json.license new file mode 100644 index 00000000..2604f44a --- /dev/null +++ b/ML-Frameworks/pytorch-aarch64/examples/openimages-mlperf.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: Copyright 2023, 2025 Arm Limited and affiliates. + +SPDX-License-Identifier: Apache-2.0 diff --git a/ML-Frameworks/pytorch-aarch64/examples/quantized_linear.py b/ML-Frameworks/pytorch-aarch64/examples/quantized_linear.py index 42011ae9..46e11144 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/quantized_linear.py +++ b/ML-Frameworks/pytorch-aarch64/examples/quantized_linear.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2024-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 import sys diff --git a/ML-Frameworks/pytorch-aarch64/examples/resnet_v1-50.yml b/ML-Frameworks/pytorch-aarch64/examples/resnet_v1-50.yml index 10cffad6..9931ed49 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/resnet_v1-50.yml +++ b/ML-Frameworks/pytorch-aarch64/examples/resnet_v1-50.yml @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 description: >- resnet50-v1.5 is a PyTorch implementation of ResNet-50 - an image classification model diff --git a/ML-Frameworks/pytorch-aarch64/examples/run_unit_tests.sh b/ML-Frameworks/pytorch-aarch64/examples/run_unit_tests.sh index cbc5322a..44b60da7 100755 --- a/ML-Frameworks/pytorch-aarch64/examples/run_unit_tests.sh +++ b/ML-Frameworks/pytorch-aarch64/examples/run_unit_tests.sh @@ -1,21 +1,8 @@ #!/bin/bash -e -# ******************************************************************************* -# Copyright 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 if [[ "${ONEDNN_DEFAULT_FPMATH_MODE:-}" == "BF16" ]]; then # Run bfloat16 tests but carefully ignore float16 diff --git a/ML-Frameworks/pytorch-aarch64/examples/ssd_resnet34.py b/ML-Frameworks/pytorch-aarch64/examples/ssd_resnet34.py index 7e5a4b32..cc65ad30 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/ssd_resnet34.py +++ b/ML-Frameworks/pytorch-aarch64/examples/ssd_resnet34.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either exprgess or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ This wrapper script downloads Python modules that are required to in order to be able to deserialize saved PyTorch module diff --git a/ML-Frameworks/pytorch-aarch64/examples/ssd_resnet34.yml b/ML-Frameworks/pytorch-aarch64/examples/ssd_resnet34.yml index fc3edfd3..2d7fc720 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/ssd_resnet34.yml +++ b/ML-Frameworks/pytorch-aarch64/examples/ssd_resnet34.yml @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021-2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 description: "SSD-ResNet34 FP32 for object detection pretrained on COCO 2017 dataset. For details on how this model was trained please see for more information" # wokeignore:rule=master model: diff --git a/ML-Frameworks/pytorch-aarch64/examples/test-examples.sh b/ML-Frameworks/pytorch-aarch64/examples/test-examples.sh index 0db36761..a8b9ca42 100755 --- a/ML-Frameworks/pytorch-aarch64/examples/test-examples.sh +++ b/ML-Frameworks/pytorch-aarch64/examples/test-examples.sh @@ -1,21 +1,8 @@ #!/bin/bash -e -# ******************************************************************************* -# Copyright 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 # Runs examples from README.md by looking for lines that start with python, this # doesn't catch everything but it's a good first approximation. diff --git a/ML-Frameworks/pytorch-aarch64/examples/transformers_llm_text_gen.py b/ML-Frameworks/pytorch-aarch64/examples/transformers_llm_text_gen.py index 3f9ed9db..cb1c7d2a 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/transformers_llm_text_gen.py +++ b/ML-Frameworks/pytorch-aarch64/examples/transformers_llm_text_gen.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 import torch import torch.nn as nn diff --git a/ML-Frameworks/pytorch-aarch64/examples/utils/common.py b/ML-Frameworks/pytorch-aarch64/examples/utils/common.py index 72fc7acd..fbac847b 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/utils/common.py +++ b/ML-Frameworks/pytorch-aarch64/examples/utils/common.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ Helper methods that are common between utility functions """ diff --git a/ML-Frameworks/pytorch-aarch64/examples/utils/image.py b/ML-Frameworks/pytorch-aarch64/examples/utils/image.py index df691506..ca55ac11 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/utils/image.py +++ b/ML-Frameworks/pytorch-aarch64/examples/utils/image.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023, 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021-2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ Helper methods for pre- and post-processing of images """ diff --git a/ML-Frameworks/pytorch-aarch64/examples/utils/label.py b/ML-Frameworks/pytorch-aarch64/examples/utils/label.py index 2b37e4f7..ddafd465 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/utils/label.py +++ b/ML-Frameworks/pytorch-aarch64/examples/utils/label.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021-2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ Utility functions to label predictions """ diff --git a/ML-Frameworks/pytorch-aarch64/examples/utils/nlp.py b/ML-Frameworks/pytorch-aarch64/examples/utils/nlp.py index d6cabecb..d0f1aad4 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/utils/nlp.py +++ b/ML-Frameworks/pytorch-aarch64/examples/utils/nlp.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2022 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2022, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 import sys import os diff --git a/ML-Frameworks/pytorch-aarch64/examples/utils/vision_parser.py b/ML-Frameworks/pytorch-aarch64/examples/utils/vision_parser.py index c8774f11..49cca1fe 100644 --- a/ML-Frameworks/pytorch-aarch64/examples/utils/vision_parser.py +++ b/ML-Frameworks/pytorch-aarch64/examples/utils/vision_parser.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2022 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2022, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ Parse arguments from the command line """ diff --git a/ML-Frameworks/pytorch-aarch64/get-source.sh b/ML-Frameworks/pytorch-aarch64/get-source.sh index b2172f55..10751ca7 100755 --- a/ML-Frameworks/pytorch-aarch64/get-source.sh +++ b/ML-Frameworks/pytorch-aarch64/get-source.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2024-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 source ../utils/git-utils.sh diff --git a/ML-Frameworks/pytorch-aarch64/requirements.txt b/ML-Frameworks/pytorch-aarch64/requirements.txt index 0cb2847e..d80fa726 100644 --- a/ML-Frameworks/pytorch-aarch64/requirements.txt +++ b/ML-Frameworks/pytorch-aarch64/requirements.txt @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. +# +# SPDX-License-Identifier: Apache-2.0 + # Does not include torch and related packages (torchvision, torchdata etc) # because we install them in the docker container using the official nightly # PyTorch channel and our own built torch wheel (see Dockerfile for more info ) diff --git a/ML-Frameworks/pytorch-aarch64/scripts/build-mlcommons.sh b/ML-Frameworks/pytorch-aarch64/scripts/build-mlcommons.sh index d0612bde..eb8bf261 100755 --- a/ML-Frameworks/pytorch-aarch64/scripts/build-mlcommons.sh +++ b/ML-Frameworks/pytorch-aarch64/scripts/build-mlcommons.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2020-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2020, 2021, 2023-2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail diff --git a/ML-Frameworks/pytorch-aarch64/scripts/download-dataset.sh b/ML-Frameworks/pytorch-aarch64/scripts/download-dataset.sh index a0f0b32a..b2cd8eee 100755 --- a/ML-Frameworks/pytorch-aarch64/scripts/download-dataset.sh +++ b/ML-Frameworks/pytorch-aarch64/scripts/download-dataset.sh @@ -1,4 +1,9 @@ #!/bin/bash + +# SPDX-FileCopyrightText: Copyright 2020, 2021, 2023, 2025 Arm Limited and affiliates. +# +# SPDX-License-Identifier: Apache-2.0 + set -euo pipefail # This script is based on the upstream MLCommon's instructions to download datasets. diff --git a/ML-Frameworks/pytorch-aarch64/scripts/download-model.sh b/ML-Frameworks/pytorch-aarch64/scripts/download-model.sh index d038a8f6..e6163dae 100755 --- a/ML-Frameworks/pytorch-aarch64/scripts/download-model.sh +++ b/ML-Frameworks/pytorch-aarch64/scripts/download-model.sh @@ -1,4 +1,9 @@ #!/bin/bash + +# SPDX-FileCopyrightText: Copyright 2020-2023, 2025 Arm Limited and affiliates. +# +# SPDX-License-Identifier: Apache-2.0 + set -euo pipefail # This script is based on the upstream MLCommon's instructions to download models. diff --git a/ML-Frameworks/pytorch-aarch64/welcome.txt.license b/ML-Frameworks/pytorch-aarch64/welcome.txt.license new file mode 100644 index 00000000..0c7ebc53 --- /dev/null +++ b/ML-Frameworks/pytorch-aarch64/welcome.txt.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. + +SPDX-License-Identifier: Apache-2.0 diff --git a/ML-Frameworks/tensorflow-aarch64/.dockerignore b/ML-Frameworks/tensorflow-aarch64/.dockerignore index 397b4a76..f2737a6f 100644 --- a/ML-Frameworks/tensorflow-aarch64/.dockerignore +++ b/ML-Frameworks/tensorflow-aarch64/.dockerignore @@ -1 +1,5 @@ +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. +# +# SPDX-License-Identifier: Apache-2.0 + *.log diff --git a/ML-Frameworks/tensorflow-aarch64/.gitignore b/ML-Frameworks/tensorflow-aarch64/.gitignore index 54c41c90..5115fc0a 100644 --- a/ML-Frameworks/tensorflow-aarch64/.gitignore +++ b/ML-Frameworks/tensorflow-aarch64/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. +# +# SPDX-License-Identifier: Apache-2.0 + tensorflow/ results/ *.whl \ No newline at end of file diff --git a/ML-Frameworks/tensorflow-aarch64/CHANGELOG.md b/ML-Frameworks/tensorflow-aarch64/CHANGELOG.md index 0c3eaf92..bf10508c 100644 --- a/ML-Frameworks/tensorflow-aarch64/CHANGELOG.md +++ b/ML-Frameworks/tensorflow-aarch64/CHANGELOG.md @@ -1,3 +1,9 @@ + + # Changelog All significant changes to the TensorFlow container builds in docker/tensorflow-aarch64 will be noted in this log. diff --git a/ML-Frameworks/tensorflow-aarch64/Dockerfile b/ML-Frameworks/tensorflow-aarch64/Dockerfile index ad09ff13..ad66dc1d 100644 --- a/ML-Frameworks/tensorflow-aarch64/Dockerfile +++ b/ML-Frameworks/tensorflow-aarch64/Dockerfile @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2020-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2020-2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 # Specify DOCKER_IMAGE_MIRROR if you want to use a mirror of hub.docker.com ARG DOCKER_IMAGE_MIRROR="" diff --git a/ML-Frameworks/tensorflow-aarch64/README.md b/ML-Frameworks/tensorflow-aarch64/README.md index 83e12853..b0ec4ab6 100644 --- a/ML-Frameworks/tensorflow-aarch64/README.md +++ b/ML-Frameworks/tensorflow-aarch64/README.md @@ -1,3 +1,9 @@ + + # TensorFlow for AArch64 > [!WARNING] diff --git a/ML-Frameworks/tensorflow-aarch64/bash_profile b/ML-Frameworks/tensorflow-aarch64/bash_profile index 0cf77411..fee64a4b 100644 --- a/ML-Frameworks/tensorflow-aarch64/bash_profile +++ b/ML-Frameworks/tensorflow-aarch64/bash_profile @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2020, 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2019, 2020, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 # Source global definitions if they're there if [ -f /etc/bashrc ]; then diff --git a/ML-Frameworks/tensorflow-aarch64/build-wheel.sh b/ML-Frameworks/tensorflow-aarch64/build-wheel.sh index 4b5f1353..f0f270c9 100755 --- a/ML-Frameworks/tensorflow-aarch64/build-wheel.sh +++ b/ML-Frameworks/tensorflow-aarch64/build-wheel.sh @@ -1,21 +1,8 @@ # #!/bin/bash -# ******************************************************************************* -# Copyright 2024-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2022, 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 # Note that this script intentionally has no options. It builds *the* TensorFlow # Tool-Solutions, of which there is only one type diff --git a/ML-Frameworks/tensorflow-aarch64/build.sh b/ML-Frameworks/tensorflow-aarch64/build.sh index 8ebcef79..f43668d0 100755 --- a/ML-Frameworks/tensorflow-aarch64/build.sh +++ b/ML-Frameworks/tensorflow-aarch64/build.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2024-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2019-2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 set -eux -o pipefail diff --git a/ML-Frameworks/tensorflow-aarch64/bump-sources.sh b/ML-Frameworks/tensorflow-aarch64/bump-sources.sh index 86220734..d0e95051 100755 --- a/ML-Frameworks/tensorflow-aarch64/bump-sources.sh +++ b/ML-Frameworks/tensorflow-aarch64/bump-sources.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 function git-bump { git fetch origin $1 diff --git a/ML-Frameworks/tensorflow-aarch64/dockerize.sh b/ML-Frameworks/tensorflow-aarch64/dockerize.sh index 2e3c5a8d..cb80e74b 100755 --- a/ML-Frameworks/tensorflow-aarch64/dockerize.sh +++ b/ML-Frameworks/tensorflow-aarch64/dockerize.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2024-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 set -eux -o pipefail diff --git a/ML-Frameworks/tensorflow-aarch64/examples/README.md b/ML-Frameworks/tensorflow-aarch64/examples/README.md index 422f3faa..d0f30355 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/README.md +++ b/ML-Frameworks/tensorflow-aarch64/examples/README.md @@ -1,3 +1,9 @@ + + # Python Examples This folder contains number of scripts that demonstrate how to run inference with various machine learning models. diff --git a/ML-Frameworks/tensorflow-aarch64/examples/answer_questions.py b/ML-Frameworks/tensorflow-aarch64/examples/answer_questions.py index 42039741..784777ad 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/answer_questions.py +++ b/ML-Frameworks/tensorflow-aarch64/examples/answer_questions.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2022 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2022, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 import sys import random diff --git a/ML-Frameworks/tensorflow-aarch64/examples/classify_image.py b/ML-Frameworks/tensorflow-aarch64/examples/classify_image.py index 550d9305..baad66a6 100755 --- a/ML-Frameworks/tensorflow-aarch64/examples/classify_image.py +++ b/ML-Frameworks/tensorflow-aarch64/examples/classify_image.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ This example demonstrates how to load an image classification model and run inference on a single image diff --git a/ML-Frameworks/tensorflow-aarch64/examples/detect_objects.py b/ML-Frameworks/tensorflow-aarch64/examples/detect_objects.py index 671c8cf4..84e51760 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/detect_objects.py +++ b/ML-Frameworks/tensorflow-aarch64/examples/detect_objects.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ This example demonstrates how to load an object detection model and run inference on a single image diff --git a/ML-Frameworks/tensorflow-aarch64/examples/executor/model.py b/ML-Frameworks/tensorflow-aarch64/examples/executor/model.py index 3b133531..3e373d1f 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/executor/model.py +++ b/ML-Frameworks/tensorflow-aarch64/examples/executor/model.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021-2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ Class that wraps around TensorFlow session and executes the frozen model """ diff --git a/ML-Frameworks/tensorflow-aarch64/examples/resnet_v1-50.yml b/ML-Frameworks/tensorflow-aarch64/examples/resnet_v1-50.yml index 54b6723b..aae68e17 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/resnet_v1-50.yml +++ b/ML-Frameworks/tensorflow-aarch64/examples/resnet_v1-50.yml @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2022-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021-2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 description: >- resnet50-v1.5 is a TensorFlow implementation of ResNet-50 - an image classification model diff --git a/ML-Frameworks/tensorflow-aarch64/examples/run_unit_tests.sh b/ML-Frameworks/tensorflow-aarch64/examples/run_unit_tests.sh index ab1e68f2..bb362cbe 100755 --- a/ML-Frameworks/tensorflow-aarch64/examples/run_unit_tests.sh +++ b/ML-Frameworks/tensorflow-aarch64/examples/run_unit_tests.sh @@ -1,21 +1,8 @@ #!/bin/bash -e -# ******************************************************************************* -# Copyright 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 python tensorflow/tensorflow/python/module/module_test.py python tensorflow/tensorflow/python/kernel_tests/nn_ops/conv_ops_test.py diff --git a/ML-Frameworks/tensorflow-aarch64/examples/ssd_resnet34.yml b/ML-Frameworks/tensorflow-aarch64/examples/ssd_resnet34.yml index 315796b9..c19461d7 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/ssd_resnet34.yml +++ b/ML-Frameworks/tensorflow-aarch64/examples/ssd_resnet34.yml @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 description: "SSD-ResNet34 FP32 for object detection pretrained on COCO 2017 dataset. For details on how this model was trained please see for more information" # wokeignore:rule=master model: diff --git a/ML-Frameworks/tensorflow-aarch64/examples/test_examples.sh b/ML-Frameworks/tensorflow-aarch64/examples/test_examples.sh index 6918e1f2..e02f3c85 100755 --- a/ML-Frameworks/tensorflow-aarch64/examples/test_examples.sh +++ b/ML-Frameworks/tensorflow-aarch64/examples/test_examples.sh @@ -1,21 +1,8 @@ #!/bin/bash -e -# ******************************************************************************* -# Copyright 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 # Runs examples from README.md by looking for lines that start with python, this # doesn't catch everything but it's a good first approximation. diff --git a/ML-Frameworks/tensorflow-aarch64/examples/utils/common.py b/ML-Frameworks/tensorflow-aarch64/examples/utils/common.py index c1f41365..aa21f42a 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/utils/common.py +++ b/ML-Frameworks/tensorflow-aarch64/examples/utils/common.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ Helper methods that are common between utility functions """ diff --git a/ML-Frameworks/tensorflow-aarch64/examples/utils/image.py b/ML-Frameworks/tensorflow-aarch64/examples/utils/image.py index 738270db..568ce205 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/utils/image.py +++ b/ML-Frameworks/tensorflow-aarch64/examples/utils/image.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023, 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021-2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ Helper methods for pre- and post-processing of images """ diff --git a/ML-Frameworks/tensorflow-aarch64/examples/utils/label.py b/ML-Frameworks/tensorflow-aarch64/examples/utils/label.py index e3dbe4c4..877ce0fe 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/utils/label.py +++ b/ML-Frameworks/tensorflow-aarch64/examples/utils/label.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021-2023 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021-2023, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ Utility functions to label predictions """ diff --git a/ML-Frameworks/tensorflow-aarch64/examples/utils/nlp.py b/ML-Frameworks/tensorflow-aarch64/examples/utils/nlp.py index 5ba54283..7ea41038 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/utils/nlp.py +++ b/ML-Frameworks/tensorflow-aarch64/examples/utils/nlp.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 import sys import os diff --git a/ML-Frameworks/tensorflow-aarch64/examples/utils/nlp_parser.py b/ML-Frameworks/tensorflow-aarch64/examples/utils/nlp_parser.py index 6092c557..f6e49d2c 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/utils/nlp_parser.py +++ b/ML-Frameworks/tensorflow-aarch64/examples/utils/nlp_parser.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2021 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ Parse arguments from the command line for NLP examples. """ diff --git a/ML-Frameworks/tensorflow-aarch64/examples/utils/vision_parser.py b/ML-Frameworks/tensorflow-aarch64/examples/utils/vision_parser.py index 6fc62fda..8c0a10fc 100644 --- a/ML-Frameworks/tensorflow-aarch64/examples/utils/vision_parser.py +++ b/ML-Frameworks/tensorflow-aarch64/examples/utils/vision_parser.py @@ -1,19 +1,6 @@ -# ******************************************************************************* -# Copyright 2022 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2021, 2022, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 """ Parse arguments from the command line """ diff --git a/ML-Frameworks/tensorflow-aarch64/get-source.sh b/ML-Frameworks/tensorflow-aarch64/get-source.sh index e254d472..b7661c71 100755 --- a/ML-Frameworks/tensorflow-aarch64/get-source.sh +++ b/ML-Frameworks/tensorflow-aarch64/get-source.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2024-2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2024, 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 source ../utils/git-utils.sh diff --git a/ML-Frameworks/tensorflow-aarch64/requirements.txt b/ML-Frameworks/tensorflow-aarch64/requirements.txt index 525c0efc..7f032482 100644 --- a/ML-Frameworks/tensorflow-aarch64/requirements.txt +++ b/ML-Frameworks/tensorflow-aarch64/requirements.txt @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. +# +# SPDX-License-Identifier: Apache-2.0 + filelock~=3.17.0 fsspec==2025.2.0 huggingface-hub~=0.34.0 diff --git a/ML-Frameworks/tensorflow-aarch64/welcome.txt.license b/ML-Frameworks/tensorflow-aarch64/welcome.txt.license new file mode 100644 index 00000000..9726c411 --- /dev/null +++ b/ML-Frameworks/tensorflow-aarch64/welcome.txt.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. + +SPDX-License-Identifier: Apache-2.0 diff --git a/ML-Frameworks/utils/git-utils.sh b/ML-Frameworks/utils/git-utils.sh index 8a39eff4..5631f463 100755 --- a/ML-Frameworks/utils/git-utils.sh +++ b/ML-Frameworks/utils/git-utils.sh @@ -1,21 +1,8 @@ #!/bin/bash -# ******************************************************************************* -# Copyright 2025 Arm Limited and affiliates. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates. # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ******************************************************************************* +# SPDX-License-Identifier: Apache-2.0 # Define patch cache directory as global variable, set to be in this directory, # shared by this Tool-Solutions. Collisions are almost impossible, even between diff --git a/README.md b/README.md index d3006c7a..dc94245d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ + + # Tool Solutions > [!WARNING] @@ -13,7 +19,7 @@ This ML [Tool Solutions](https://github.com/ARM-software/Tool-Solutions) reposit ## Table of Contents Here is a list of all the contents of this repository with short descriptions: -### [ML-Frameworks/pytorch-aarch64](https://github.com/ARM-software/Tool-Solutions/tree/main/ML-Frameworks/pytorch-aarch64) +### [ML-Frameworks/pytorch-aarch64](https://github.com/ARM-software/Tool-Solutions/tree/main/ML-Frameworks/pytorch-aarch64) Provides scripts to build a wheel and a Docker image containing PyTorch with examples. ### [ML-Frameworks/tensorflow-aarch64](https://github.com/ARM-software/Tool-Solutions/tree/main/ML-Frameworks/tensorflow-aarch64) diff --git a/SECURITY.md b/SECURITY.md index 6ad01314..5a896873 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,3 +1,9 @@ + + # Security Policy: DO NOT USE IN PRODUCTION > [!WARNING]