diff options
author | Alexander Hansson <Alexander.Hansson@arm.com> | 2023-05-17 12:38:46 +0000 |
---|---|---|
committer | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2023-05-17 13:12:42 +0000 |
commit | 2466d81337c787b9e9dc01a11f11d5468c7567f5 (patch) | |
tree | ce55b12dbad1116f1c18f4f9412e2250ad9e3ed8 /ethosu | |
parent | 5ff4cd12898f44228288a7969b52dff97be30cb2 (diff) | |
download | ethos-u-vela-2466d81337c787b9e9dc01a11f11d5468c7567f5.tar.gz |
MLBEDSW-7651: Include license in generated SUPPORTED_OPS.md
Signed-off-by: Alexander Hansson <Alexander.Hansson@arm.com>
Change-Id: I35fd042d572f62122ac681c231798c9f2163fc00
Diffstat (limited to 'ethosu')
-rw-r--r-- | ethosu/vela/vela.py | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/ethosu/vela/vela.py b/ethosu/vela/vela.py index fbf1d370..0e5e6eba 100644 --- a/ethosu/vela/vela.py +++ b/ethosu/vela/vela.py @@ -19,6 +19,7 @@ # # Provides command line interface, options parsing, and network loading. Before calling the compiler driver. import argparse +import datetime import glob import os import sys @@ -175,6 +176,30 @@ def print_subgraph_io_summary(nng): print(f" Maximum NNG Subgraph Size = {max_sg_size} KiB") +def generate_license(): + lines = [ + "<!--", + f"SPDX-FileCopyrightText: Copyright 2020-{datetime.date.today().year} " + "Arm Limited and/or its affiliates <open-source-office@arm.com>", + "", + "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", + "", + "www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an AS IS BASIS, WITHOUT", + "WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License.", + "-->", + ] + return lines + + def generate_supported_ops(): # Exclude network type from generation by adding value to exclude list. # To easily exclude NetworkType from generated documentation. @@ -186,7 +211,8 @@ def generate_supported_ops(): ] return f" - [{', '.join(sorted(constraints_excluded_names))}]" if constraints_excluded_names else "" - lines = [ + lines = generate_license() + lines += [ "# Supported Ops", "", "This file was automatically generated by Vela using the `--supported-ops-report` parameter. ", |