diff options
-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. ", |