From bc6ee58dbbd50fe83adfb1726c868898e5cfb491 Mon Sep 17 00:00:00 2001 From: Rickard Bolin Date: Fri, 4 Nov 2022 08:24:29 +0000 Subject: MLBEDSW-6620: Update copyright notice and years - Update copyright notices to use SPDX format and add OSS mail as contact. - Update years on files where it had been missed. Signed-off-by: Rickard Bolin Change-Id: I7e9715ea4e17b76252728c708e46df12ad67ab1f --- ethosu/config_files/Arm/vela.ini | 2 +- ethosu/mlw_codec/makefile | 5 ++--- ethosu/mlw_codec/mlw_codecmodule.c | 2 +- ethosu/mlw_codec/mlw_common.h | 2 +- ethosu/mlw_codec/mlw_decode.c | 2 +- ethosu/mlw_codec/mlw_decode.h | 2 +- ethosu/mlw_codec/mlw_encode.c | 2 +- ethosu/mlw_codec/mlw_encode.h | 2 +- ethosu/mlw_codec/mlw_main.c | 2 +- ethosu/mlw_codec/test/test_mlw_codec.py | 3 ++- ethosu/vela/__init__.py | 2 +- ethosu/vela/__main__.py | 2 +- ethosu/vela/_version.py | 2 +- ethosu/vela/api.py | 2 +- ethosu/vela/architecture_allocator.py | 2 +- ethosu/vela/architecture_features.py | 3 ++- ethosu/vela/cascade_builder.py | 2 +- ethosu/vela/compiler_driver.py | 3 ++- ethosu/vela/data_type.py | 3 ++- ethosu/vela/debug_database.py | 2 +- ethosu/vela/driver_actions.py | 3 ++- ethosu/vela/errors.py | 3 ++- ethosu/vela/ethos_u55_regs/ethos_u55_regs.py | 2 +- ethosu/vela/extract_npu_subgraphs.py | 3 ++- ethosu/vela/fp_math.py | 2 +- ethosu/vela/graph_optimiser.py | 3 ++- ethosu/vela/graph_optimiser_util.py | 3 ++- ethosu/vela/greedy_allocation.py | 3 ++- ethosu/vela/high_level_command_stream.py | 3 ++- ethosu/vela/high_level_command_stream_generator.py | 3 ++- ethosu/vela/high_level_command_to_npu_op.py | 2 +- ethosu/vela/hillclimb_allocation.py | 2 +- ethosu/vela/live_range.py | 3 ++- ethosu/vela/lut.py | 3 ++- ethosu/vela/mark_tensors.py | 3 ++- ethosu/vela/model_reader.py | 3 ++- ethosu/vela/nn_graph.py | 3 ++- ethosu/vela/npu_performance.py | 3 ++- ethosu/vela/npu_serialisation.py | 3 ++- ethosu/vela/numeric_util.py | 3 ++- ethosu/vela/operation.py | 3 ++- ethosu/vela/operation_util.py | 3 ++- ethosu/vela/pass_packing.py | 3 ++- ethosu/vela/range_set.py | 3 ++- ethosu/vela/rawdata_writer.py | 3 ++- ethosu/vela/reader_util.py | 3 ++- ethosu/vela/register_command_stream_generator.py | 3 ++- ethosu/vela/register_command_stream_util.py | 2 +- ethosu/vela/rewrite_graph.py | 3 ++- ethosu/vela/scaling.py | 3 ++- ethosu/vela/scheduler.py | 2 +- ethosu/vela/shape4d.py | 3 ++- ethosu/vela/softmax.py | 2 +- ethosu/vela/stats_writer.py | 3 ++- ethosu/vela/supported_operators_util.py | 3 ++- ethosu/vela/tensor.py | 3 ++- ethosu/vela/tensor_allocation.py | 3 ++- ethosu/vela/test/extapi/test_extapi_create_payload.py | 2 +- ethosu/vela/test/extapi/test_extapi_encode_bias.py | 3 ++- ethosu/vela/test/extapi/test_extapi_encode_weights.py | 3 ++- ethosu/vela/test/extapi/test_extapi_find_block_configs.py | 2 +- ethosu/vela/test/extapi/test_extapi_generate_commands.py | 2 +- ethosu/vela/test/extapi/test_extapi_get_version.py | 3 ++- ethosu/vela/test/test_architecture_allocator.py | 2 +- ethosu/vela/test/test_compiler_driver.py | 2 +- ethosu/vela/test/test_fp_math.py | 3 ++- ethosu/vela/test/test_graph_optimiser.py | 2 +- ethosu/vela/test/test_hillclimb_allocation.py | 2 +- ethosu/vela/test/test_live_range.py | 3 ++- ethosu/vela/test/test_lut.py | 3 ++- ethosu/vela/test/test_model_reader.py | 3 ++- ethosu/vela/test/test_new_performance.py | 2 +- ethosu/vela/test/test_nng_mapping.py | 3 ++- ethosu/vela/test/test_register_command_stream_util.py | 2 +- ethosu/vela/test/test_scaling.py | 3 ++- ethosu/vela/test/test_tensor_allocation.py | 3 ++- ethosu/vela/test/test_tflite_model_semantic.py | 2 +- ethosu/vela/test/test_tflite_reader.py | 3 ++- ethosu/vela/test/test_tflite_supported_operators.py | 2 +- ethosu/vela/test/testutil.py | 3 ++- ethosu/vela/tflite_graph_optimiser.py | 3 ++- ethosu/vela/tflite_mapping.py | 3 ++- ethosu/vela/tflite_model_semantic.py | 3 ++- ethosu/vela/tflite_reader.py | 3 ++- ethosu/vela/tflite_supported_operators.py | 3 ++- ethosu/vela/tflite_writer.py | 3 ++- ethosu/vela/tosa_graph_optimiser.py | 3 ++- ethosu/vela/tosa_mapping.py | 3 ++- ethosu/vela/tosa_model_semantic.py | 3 ++- ethosu/vela/tosa_reader.py | 3 ++- ethosu/vela/tosa_supported_operators.py | 3 ++- ethosu/vela/vela.py | 3 ++- ethosu/vela/weight_compressor.py | 3 ++- setup.py | 3 ++- 94 files changed, 155 insertions(+), 96 deletions(-) diff --git a/ethosu/config_files/Arm/vela.ini b/ethosu/config_files/Arm/vela.ini index bcc33573..50ad055f 100644 --- a/ethosu/config_files/Arm/vela.ini +++ b/ethosu/config_files/Arm/vela.ini @@ -1,4 +1,4 @@ -; Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +; SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates ; ; SPDX-License-Identifier: Apache-2.0 ; diff --git a/ethosu/mlw_codec/makefile b/ethosu/mlw_codec/makefile index aa214f9b..97c6c99d 100644 --- a/ethosu/mlw_codec/makefile +++ b/ethosu/mlw_codec/makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,8 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - - +# # Description: # Makefile to build mlw_codec diff --git a/ethosu/mlw_codec/mlw_codecmodule.c b/ethosu/mlw_codec/mlw_codecmodule.c index ddc8e7e1..61ae6a47 100644 --- a/ethosu/mlw_codec/mlw_codecmodule.c +++ b/ethosu/mlw_codec/mlw_codecmodule.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Arm Limited. All rights reserved. + * SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates * * SPDX-License-Identifier: Apache-2.0 * diff --git a/ethosu/mlw_codec/mlw_common.h b/ethosu/mlw_codec/mlw_common.h index 008473a5..70f72de1 100644 --- a/ethosu/mlw_codec/mlw_common.h +++ b/ethosu/mlw_codec/mlw_common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Arm Limited. All rights reserved. + * SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates * * SPDX-License-Identifier: Apache-2.0 * diff --git a/ethosu/mlw_codec/mlw_decode.c b/ethosu/mlw_codec/mlw_decode.c index 92aaea67..97de7869 100644 --- a/ethosu/mlw_codec/mlw_decode.c +++ b/ethosu/mlw_codec/mlw_decode.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Arm Limited. All rights reserved. + * SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates * * SPDX-License-Identifier: Apache-2.0 * diff --git a/ethosu/mlw_codec/mlw_decode.h b/ethosu/mlw_codec/mlw_decode.h index a15261ad..df5dfab0 100644 --- a/ethosu/mlw_codec/mlw_decode.h +++ b/ethosu/mlw_codec/mlw_decode.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Arm Limited. All rights reserved. + * SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates * * SPDX-License-Identifier: Apache-2.0 * diff --git a/ethosu/mlw_codec/mlw_encode.c b/ethosu/mlw_codec/mlw_encode.c index d9e16a97..7043746d 100644 --- a/ethosu/mlw_codec/mlw_encode.c +++ b/ethosu/mlw_codec/mlw_encode.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Arm Limited. All rights reserved. + * SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates * * SPDX-License-Identifier: Apache-2.0 * diff --git a/ethosu/mlw_codec/mlw_encode.h b/ethosu/mlw_codec/mlw_encode.h index 68218f32..cdceeaff 100644 --- a/ethosu/mlw_codec/mlw_encode.h +++ b/ethosu/mlw_codec/mlw_encode.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Arm Limited. All rights reserved. + * SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates * * SPDX-License-Identifier: Apache-2.0 * diff --git a/ethosu/mlw_codec/mlw_main.c b/ethosu/mlw_codec/mlw_main.c index 315c899d..11cb8f99 100644 --- a/ethosu/mlw_codec/mlw_main.c +++ b/ethosu/mlw_codec/mlw_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Arm Limited. All rights reserved. + * SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates * * SPDX-License-Identifier: Apache-2.0 * diff --git a/ethosu/mlw_codec/test/test_mlw_codec.py b/ethosu/mlw_codec/test/test_mlw_codec.py index d77c82a1..9e7789d7 100644 --- a/ethosu/mlw_codec/test/test_mlw_codec.py +++ b/ethosu/mlw_codec/test/test_mlw_codec.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -14,6 +14,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Simple example of the usage of mlw_codec. from typing import Any from typing import List diff --git a/ethosu/vela/__init__.py b/ethosu/vela/__init__.py index 77c171d0..8fc953ab 100644 --- a/ethosu/vela/__init__.py +++ b/ethosu/vela/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/__main__.py b/ethosu/vela/__main__.py index 4e35cfc0..534a4a3c 100644 --- a/ethosu/vela/__main__.py +++ b/ethosu/vela/__main__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/_version.py b/ethosu/vela/_version.py index 8a15dbd4..cc13395c 100644 --- a/ethosu/vela/_version.py +++ b/ethosu/vela/_version.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/api.py b/ethosu/vela/api.py index 26ca291d..cacadf61 100644 --- a/ethosu/vela/api.py +++ b/ethosu/vela/api.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/architecture_allocator.py b/ethosu/vela/architecture_allocator.py index 9cc22bb4..cb4f3ee7 100644 --- a/ethosu/vela/architecture_allocator.py +++ b/ethosu/vela/architecture_allocator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/architecture_features.py b/ethosu/vela/architecture_features.py index e0e44b29..73dea981 100644 --- a/ethosu/vela/architecture_features.py +++ b/ethosu/vela/architecture_features.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Holds a container for Ethos-U and System architecture parameters. import enum diff --git a/ethosu/vela/cascade_builder.py b/ethosu/vela/cascade_builder.py index 5573ff7b..7baa3a83 100644 --- a/ethosu/vela/cascade_builder.py +++ b/ethosu/vela/cascade_builder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/compiler_driver.py b/ethosu/vela/compiler_driver.py index 61a3b0b1..014d12ae 100644 --- a/ethosu/vela/compiler_driver.py +++ b/ethosu/vela/compiler_driver.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Contains the main sequencing of the compiler. import time diff --git a/ethosu/vela/data_type.py b/ethosu/vela/data_type.py index 470504d2..829cef38 100644 --- a/ethosu/vela/data_type.py +++ b/ethosu/vela/data_type.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Defines the basic numeric type classes for tensors. import enum diff --git a/ethosu/vela/debug_database.py b/ethosu/vela/debug_database.py index 13ea063c..bd45b468 100644 --- a/ethosu/vela/debug_database.py +++ b/ethosu/vela/debug_database.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/driver_actions.py b/ethosu/vela/driver_actions.py index 4ad2a334..2e4412c8 100644 --- a/ethosu/vela/driver_actions.py +++ b/ethosu/vela/driver_actions.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Creates driver actions that are embedded in the custom operator payload. import struct diff --git a/ethosu/vela/errors.py b/ethosu/vela/errors.py index 9553c80d..bf3bb4d3 100644 --- a/ethosu/vela/errors.py +++ b/ethosu/vela/errors.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Defines custom exceptions. diff --git a/ethosu/vela/ethos_u55_regs/ethos_u55_regs.py b/ethosu/vela/ethos_u55_regs/ethos_u55_regs.py index e50e0c84..ee4aced0 100644 --- a/ethosu/vela/ethos_u55_regs/ethos_u55_regs.py +++ b/ethosu/vela/ethos_u55_regs/ethos_u55_regs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/extract_npu_subgraphs.py b/ethosu/vela/extract_npu_subgraphs.py index ada76f28..bf637b83 100644 --- a/ethosu/vela/extract_npu_subgraphs.py +++ b/ethosu/vela/extract_npu_subgraphs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Vela separates CPU operations and NPU operations into separate internal subgraphs. The CPU operations are left # untouched in the final output. diff --git a/ethosu/vela/fp_math.py b/ethosu/vela/fp_math.py index 2913ff6b..25ff4b3c 100644 --- a/ethosu/vela/fp_math.py +++ b/ethosu/vela/fp_math.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # Copyright 2015 The Gemmlowp Authors. All Rights Reserved. # diff --git a/ethosu/vela/graph_optimiser.py b/ethosu/vela/graph_optimiser.py index 0f5636ed..4505cf58 100644 --- a/ethosu/vela/graph_optimiser.py +++ b/ethosu/vela/graph_optimiser.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Early optimisation of the network graph, using the rewrite_graph module to do the traversal of the graph. from . import rewrite_graph diff --git a/ethosu/vela/graph_optimiser_util.py b/ethosu/vela/graph_optimiser_util.py index e2ee06b8..fde01cfe 100644 --- a/ethosu/vela/graph_optimiser_util.py +++ b/ethosu/vela/graph_optimiser_util.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Common functions and definitions used during the graph optimization. from typing import Tuple diff --git a/ethosu/vela/greedy_allocation.py b/ethosu/vela/greedy_allocation.py index f6d7a3a1..1b46d168 100644 --- a/ethosu/vela/greedy_allocation.py +++ b/ethosu/vela/greedy_allocation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Allocate tensor addresses using a greedy algorithm. from . import numeric_util diff --git a/ethosu/vela/high_level_command_stream.py b/ethosu/vela/high_level_command_stream.py index bfe5bce1..609f8556 100644 --- a/ethosu/vela/high_level_command_stream.py +++ b/ethosu/vela/high_level_command_stream.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Contains classes that hold commands for the high-level command stream (one command per DMA or NPU stripe). from typing import List diff --git a/ethosu/vela/high_level_command_stream_generator.py b/ethosu/vela/high_level_command_stream_generator.py index e71fb6ea..cd878ec2 100644 --- a/ethosu/vela/high_level_command_stream_generator.py +++ b/ethosu/vela/high_level_command_stream_generator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Generate a high-level command stream from a schedule from .high_level_command_stream import Box diff --git a/ethosu/vela/high_level_command_to_npu_op.py b/ethosu/vela/high_level_command_to_npu_op.py index 228c76f8..fe1c9f8a 100644 --- a/ethosu/vela/high_level_command_to_npu_op.py +++ b/ethosu/vela/high_level_command_to_npu_op.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/hillclimb_allocation.py b/ethosu/vela/hillclimb_allocation.py index 9c4dfb8e..321a4d02 100644 --- a/ethosu/vela/hillclimb_allocation.py +++ b/ethosu/vela/hillclimb_allocation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/live_range.py b/ethosu/vela/live_range.py index 2829f398..e9806026 100644 --- a/ethosu/vela/live_range.py +++ b/ethosu/vela/live_range.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Build a live range graph for tensors in one or more subgraphs. Used for tensor allocation as well as in the scheduler. # Can work with either a pass packed subgraph or a scheduled subgraph. diff --git a/ethosu/vela/lut.py b/ethosu/vela/lut.py index 3b2e3077..fdf9d0ff 100644 --- a/ethosu/vela/lut.py +++ b/ethosu/vela/lut.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Functionality for lookup table support. import uuid diff --git a/ethosu/vela/mark_tensors.py b/ethosu/vela/mark_tensors.py index f76c59d7..64cc7883 100644 --- a/ethosu/vela/mark_tensors.py +++ b/ethosu/vela/mark_tensors.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Mark purpose and select formats for Tensors. from .graph_optimiser_util import memory_only_ops diff --git a/ethosu/vela/model_reader.py b/ethosu/vela/model_reader.py index 3b094361..e77f5a48 100644 --- a/ethosu/vela/model_reader.py +++ b/ethosu/vela/model_reader.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Dispatcher for reading a neural network model. from . import tflite_model_semantic diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py index 30643b85..98979f64 100644 --- a/ethosu/vela/nn_graph.py +++ b/ethosu/vela/nn_graph.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Neural network graph classes and enums. # Pass - A packed pass containing one or more Operations. diff --git a/ethosu/vela/npu_performance.py b/ethosu/vela/npu_performance.py index 929548ec..cfe13d03 100644 --- a/ethosu/vela/npu_performance.py +++ b/ethosu/vela/npu_performance.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # NPU performance estimation functions to estimate performance of a Pass and CascadedPass. Uses a model that takes the # maximum of the 'cycles required for bandwidth' and 'cycles required for computing'. diff --git a/ethosu/vela/npu_serialisation.py b/ethosu/vela/npu_serialisation.py index ea35ac60..c868672f 100644 --- a/ethosu/vela/npu_serialisation.py +++ b/ethosu/vela/npu_serialisation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Serialises and packs an NPU subgraph into tensors. import numpy as np diff --git a/ethosu/vela/numeric_util.py b/ethosu/vela/numeric_util.py index 011765f9..0294b289 100644 --- a/ethosu/vela/numeric_util.py +++ b/ethosu/vela/numeric_util.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Numerical utilities for various types of rounding etc. import math diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py index 05c236a5..de35dcc7 100644 --- a/ethosu/vela/operation.py +++ b/ethosu/vela/operation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Internal representation of a Neural Network Operation. # For Class name forward references for the type annotations. (see PEP 563). diff --git a/ethosu/vela/operation_util.py b/ethosu/vela/operation_util.py index c4176d96..7b66dff3 100644 --- a/ethosu/vela/operation_util.py +++ b/ethosu/vela/operation_util.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Utility functions for creating Network Operations. from typing import Optional diff --git a/ethosu/vela/pass_packing.py b/ethosu/vela/pass_packing.py index 988e52e6..5c0d8ebe 100644 --- a/ethosu/vela/pass_packing.py +++ b/ethosu/vela/pass_packing.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Packs a subgraph with Neural Network Operations into Passes. Each Pass has one or more Operations. import collections diff --git a/ethosu/vela/range_set.py b/ethosu/vela/range_set.py index 6b282824..1a003735 100644 --- a/ethosu/vela/range_set.py +++ b/ethosu/vela/range_set.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020, 2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Helper classes to track memory accesses for calculating dependencies between Commands. from enum import IntEnum diff --git a/ethosu/vela/rawdata_writer.py b/ethosu/vela/rawdata_writer.py index 247cfe80..dd17b235 100644 --- a/ethosu/vela/rawdata_writer.py +++ b/ethosu/vela/rawdata_writer.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Functions used to write to a raw format (.npz) file. import numpy as np diff --git a/ethosu/vela/reader_util.py b/ethosu/vela/reader_util.py index 8ca1c156..78eb4366 100644 --- a/ethosu/vela/reader_util.py +++ b/ethosu/vela/reader_util.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Utlity function for reading .tosa and .tflite files from .operation import Op diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py index c9b57f22..f5f530d3 100644 --- a/ethosu/vela/register_command_stream_generator.py +++ b/ethosu/vela/register_command_stream_generator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Register level (low-level) command stream generation for Ethos-U. Takes a list of NPU operations and generates # all the register settings. Calculates dependencies between commands and inserts wait operations. And generates a bit diff --git a/ethosu/vela/register_command_stream_util.py b/ethosu/vela/register_command_stream_util.py index 1b2cb47b..6f57f54a 100644 --- a/ethosu/vela/register_command_stream_util.py +++ b/ethosu/vela/register_command_stream_util.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/rewrite_graph.py b/ethosu/vela/rewrite_graph.py index 42acaf9b..b29f7a28 100644 --- a/ethosu/vela/rewrite_graph.py +++ b/ethosu/vela/rewrite_graph.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Functions for abstracting out the traversal and rewriting of graphs so that the optimisation passes can focus on the # correct operation. diff --git a/ethosu/vela/scaling.py b/ethosu/vela/scaling.py index 05e38b96..ecfed2cc 100644 --- a/ethosu/vela/scaling.py +++ b/ethosu/vela/scaling.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Contains various scaling calculations for weights, elementwise operations, pooling etc. import math diff --git a/ethosu/vela/scheduler.py b/ethosu/vela/scheduler.py index b65cae8f..73eb8b42 100644 --- a/ethosu/vela/scheduler.py +++ b/ethosu/vela/scheduler.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/shape4d.py b/ethosu/vela/shape4d.py index fd1ee949..7a01b399 100644 --- a/ethosu/vela/shape4d.py +++ b/ethosu/vela/shape4d.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Defines the class Shape4D. from collections import namedtuple diff --git a/ethosu/vela/softmax.py b/ethosu/vela/softmax.py index a0fd19ca..a92d0bb2 100644 --- a/ethosu/vela/softmax.py +++ b/ethosu/vela/softmax.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # diff --git a/ethosu/vela/stats_writer.py b/ethosu/vela/stats_writer.py index 9db6a97c..25c90300 100644 --- a/ethosu/vela/stats_writer.py +++ b/ethosu/vela/stats_writer.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Writes out per-pass and summary performance statistics to CSV files. import csv diff --git a/ethosu/vela/supported_operators_util.py b/ethosu/vela/supported_operators_util.py index 24fe72c5..b94ff524 100644 --- a/ethosu/vela/supported_operators_util.py +++ b/ethosu/vela/supported_operators_util.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Utility functions used in supported operator checking diff --git a/ethosu/vela/tensor.py b/ethosu/vela/tensor.py index 8e553e82..899b1bed 100644 --- a/ethosu/vela/tensor.py +++ b/ethosu/vela/tensor.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Internal representation of a Neural Network Tensor. import copy diff --git a/ethosu/vela/tensor_allocation.py b/ethosu/vela/tensor_allocation.py index 1ffae4c4..8c91e2ed 100644 --- a/ethosu/vela/tensor_allocation.py +++ b/ethosu/vela/tensor_allocation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Wrapping function to do tensor address allocation. That is, assigning addresses to tensors based on what has been # worked out from the allowable overlaps that are calculated by the live range analysis. diff --git a/ethosu/vela/test/extapi/test_extapi_create_payload.py b/ethosu/vela/test/extapi/test_extapi_create_payload.py index 06dd220d..08606850 100644 --- a/ethosu/vela/test/extapi/test_extapi_create_payload.py +++ b/ethosu/vela/test/extapi/test_extapi_create_payload.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/test/extapi/test_extapi_encode_bias.py b/ethosu/vela/test/extapi/test_extapi_encode_bias.py index c0a4a9ab..1b9a0e28 100644 --- a/ethosu/vela/test/extapi/test_extapi_encode_bias.py +++ b/ethosu/vela/test/extapi/test_extapi_encode_bias.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Contains unit tests for npu_encode_bias API for an external consumer import random diff --git a/ethosu/vela/test/extapi/test_extapi_encode_weights.py b/ethosu/vela/test/extapi/test_extapi_encode_weights.py index 87c504f4..b16c4c19 100644 --- a/ethosu/vela/test/extapi/test_extapi_encode_weights.py +++ b/ethosu/vela/test/extapi/test_extapi_encode_weights.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020, 2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Contains unit tests for npu_encode_weights API for an external consumer import numpy as np diff --git a/ethosu/vela/test/extapi/test_extapi_find_block_configs.py b/ethosu/vela/test/extapi/test_extapi_find_block_configs.py index a768f18d..41827593 100644 --- a/ethosu/vela/test/extapi/test_extapi_find_block_configs.py +++ b/ethosu/vela/test/extapi/test_extapi_find_block_configs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/test/extapi/test_extapi_generate_commands.py b/ethosu/vela/test/extapi/test_extapi_generate_commands.py index a520789b..7d80b475 100644 --- a/ethosu/vela/test/extapi/test_extapi_generate_commands.py +++ b/ethosu/vela/test/extapi/test_extapi_generate_commands.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/test/extapi/test_extapi_get_version.py b/ethosu/vela/test/extapi/test_extapi_get_version.py index 779c2135..18744232 100644 --- a/ethosu/vela/test/extapi/test_extapi_get_version.py +++ b/ethosu/vela/test/extapi/test_extapi_get_version.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Contains unit tests for get API version for an external consumer from ethosu.vela.api import API_VERSION diff --git a/ethosu/vela/test/test_architecture_allocator.py b/ethosu/vela/test/test_architecture_allocator.py index a199e9d8..c3d7a763 100644 --- a/ethosu/vela/test/test_architecture_allocator.py +++ b/ethosu/vela/test/test_architecture_allocator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/test/test_compiler_driver.py b/ethosu/vela/test/test_compiler_driver.py index 56a90c47..f3be5534 100644 --- a/ethosu/vela/test/test_compiler_driver.py +++ b/ethosu/vela/test/test_compiler_driver.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/test/test_fp_math.py b/ethosu/vela/test/test_fp_math.py index b669d442..e21d0d03 100644 --- a/ethosu/vela/test/test_fp_math.py +++ b/ethosu/vela/test/test_fp_math.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Unit tests for fixed point math import numpy as np diff --git a/ethosu/vela/test/test_graph_optimiser.py b/ethosu/vela/test/test_graph_optimiser.py index bfb1ded2..152669f7 100644 --- a/ethosu/vela/test/test_graph_optimiser.py +++ b/ethosu/vela/test/test_graph_optimiser.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/test/test_hillclimb_allocation.py b/ethosu/vela/test/test_hillclimb_allocation.py index 03aec2bc..412cb077 100644 --- a/ethosu/vela/test/test_hillclimb_allocation.py +++ b/ethosu/vela/test/test_hillclimb_allocation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/test/test_live_range.py b/ethosu/vela/test/test_live_range.py index 2a99da54..1cd036fe 100644 --- a/ethosu/vela/test/test_live_range.py +++ b/ethosu/vela/test/test_live_range.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Contains unit tests for live ranges from unittest.mock import MagicMock diff --git a/ethosu/vela/test/test_lut.py b/ethosu/vela/test/test_lut.py index 4ddc8b95..90732707 100644 --- a/ethosu/vela/test/test_lut.py +++ b/ethosu/vela/test/test_lut.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Unit tests for LUT support import random diff --git a/ethosu/vela/test/test_model_reader.py b/ethosu/vela/test/test_model_reader.py index bd7ca377..e63faa2b 100644 --- a/ethosu/vela/test/test_model_reader.py +++ b/ethosu/vela/test/test_model_reader.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Unit tests for model_reader. import pytest diff --git a/ethosu/vela/test/test_new_performance.py b/ethosu/vela/test/test_new_performance.py index a35905b3..8222ef1d 100644 --- a/ethosu/vela/test/test_new_performance.py +++ b/ethosu/vela/test/test_new_performance.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/test/test_nng_mapping.py b/ethosu/vela/test/test_nng_mapping.py index 08d77fea..b7f05628 100644 --- a/ethosu/vela/test/test_nng_mapping.py +++ b/ethosu/vela/test/test_nng_mapping.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Unit tests for the mapping of TFLite or TOSA to NNG import pytest diff --git a/ethosu/vela/test/test_register_command_stream_util.py b/ethosu/vela/test/test_register_command_stream_util.py index 86a48ff6..96dbdb21 100644 --- a/ethosu/vela/test/test_register_command_stream_util.py +++ b/ethosu/vela/test/test_register_command_stream_util.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020, 2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/test/test_scaling.py b/ethosu/vela/test/test_scaling.py index b4518302..d730d43b 100644 --- a/ethosu/vela/test/test_scaling.py +++ b/ethosu/vela/test/test_scaling.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Unit tests for scaling from ethosu.vela.scaling import quantise_scale diff --git a/ethosu/vela/test/test_tensor_allocation.py b/ethosu/vela/test/test_tensor_allocation.py index f437bbb4..20ad73ad 100644 --- a/ethosu/vela/test/test_tensor_allocation.py +++ b/ethosu/vela/test/test_tensor_allocation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Contains unit tests for tensor allocation import pytest diff --git a/ethosu/vela/test/test_tflite_model_semantic.py b/ethosu/vela/test/test_tflite_model_semantic.py index 115d1cf5..c242063d 100644 --- a/ethosu/vela/test/test_tflite_model_semantic.py +++ b/ethosu/vela/test/test_tflite_model_semantic.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/test/test_tflite_reader.py b/ethosu/vela/test/test_tflite_reader.py index 664a58c6..871545e4 100644 --- a/ethosu/vela/test/test_tflite_reader.py +++ b/ethosu/vela/test/test_tflite_reader.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Contains unit tests for tflite_reader from unittest.mock import MagicMock diff --git a/ethosu/vela/test/test_tflite_supported_operators.py b/ethosu/vela/test/test_tflite_supported_operators.py index 6468d3de..d9b241fd 100644 --- a/ethosu/vela/test/test_tflite_supported_operators.py +++ b/ethosu/vela/test/test_tflite_supported_operators.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # diff --git a/ethosu/vela/test/testutil.py b/ethosu/vela/test/testutil.py index 25dc801b..acf35fe3 100644 --- a/ethosu/vela/test/testutil.py +++ b/ethosu/vela/test/testutil.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Utilities used in vela unit tests import numpy as np diff --git a/ethosu/vela/tflite_graph_optimiser.py b/ethosu/vela/tflite_graph_optimiser.py index fcaac151..b858f648 100644 --- a/ethosu/vela/tflite_graph_optimiser.py +++ b/ethosu/vela/tflite_graph_optimiser.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Early optimisation of a TensorFlow Lite based network graph, using the rewrite_graph module # to do the traversal of the graph. diff --git a/ethosu/vela/tflite_mapping.py b/ethosu/vela/tflite_mapping.py index 4e8507d0..dd52a3ac 100644 --- a/ethosu/vela/tflite_mapping.py +++ b/ethosu/vela/tflite_mapping.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # TensorFlow Lite mapping functions used by both reader and writer. # Contains a mapping from the various TensorFlow Lite enums and options structs, generated by the FlatBuffer code diff --git a/ethosu/vela/tflite_model_semantic.py b/ethosu/vela/tflite_model_semantic.py index 189e8370..dc3b8185 100644 --- a/ethosu/vela/tflite_model_semantic.py +++ b/ethosu/vela/tflite_model_semantic.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # The TFLiteSemantic class which is a collection of TensorFlow lite model semantic checks. from collections import defaultdict diff --git a/ethosu/vela/tflite_reader.py b/ethosu/vela/tflite_reader.py index 9fe9ff58..80f36457 100644 --- a/ethosu/vela/tflite_reader.py +++ b/ethosu/vela/tflite_reader.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Functions used to read from a TensorFlow Lite format file. import os.path diff --git a/ethosu/vela/tflite_supported_operators.py b/ethosu/vela/tflite_supported_operators.py index abbfb171..aabe8130 100644 --- a/ethosu/vela/tflite_supported_operators.py +++ b/ethosu/vela/tflite_supported_operators.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # The TFLiteSupportedOperators class which is a collection of all TFLite supported operators and parameter checks. from collections import defaultdict diff --git a/ethosu/vela/tflite_writer.py b/ethosu/vela/tflite_writer.py index 6fdfe019..e527cd4d 100644 --- a/ethosu/vela/tflite_writer.py +++ b/ethosu/vela/tflite_writer.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Functions used to write to a TensorFlow Lite format file. Supports adding in file identifiers. import flatbuffers diff --git a/ethosu/vela/tosa_graph_optimiser.py b/ethosu/vela/tosa_graph_optimiser.py index 778aa2ac..25d3dbc6 100644 --- a/ethosu/vela/tosa_graph_optimiser.py +++ b/ethosu/vela/tosa_graph_optimiser.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Early optimisation of the TOSA based network graph, using the rewrite_graph module to do the traversal of the graph. import numpy as np diff --git a/ethosu/vela/tosa_mapping.py b/ethosu/vela/tosa_mapping.py index f635e4a6..87819d6d 100644 --- a/ethosu/vela/tosa_mapping.py +++ b/ethosu/vela/tosa_mapping.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # TOSA mapping functions used by reader. # Contains a mapping from the various TOSA enums and options structs, generated by the FlatBuffer code diff --git a/ethosu/vela/tosa_model_semantic.py b/ethosu/vela/tosa_model_semantic.py index 5cd186c6..0c024a6c 100644 --- a/ethosu/vela/tosa_model_semantic.py +++ b/ethosu/vela/tosa_model_semantic.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # The TosaSemantic class which is a collection of TOSA model semantic checks. from collections import defaultdict diff --git a/ethosu/vela/tosa_reader.py b/ethosu/vela/tosa_reader.py index cd18adb2..56e0b1cb 100644 --- a/ethosu/vela/tosa_reader.py +++ b/ethosu/vela/tosa_reader.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Functions used to read from a TOSA format file. import os.path diff --git a/ethosu/vela/tosa_supported_operators.py b/ethosu/vela/tosa_supported_operators.py index 3f3a0025..3b39ce6f 100644 --- a/ethosu/vela/tosa_supported_operators.py +++ b/ethosu/vela/tosa_supported_operators.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # The TosaSupportedOperators class which is a collection of all supported operators and parameter checks. from collections import defaultdict diff --git a/ethosu/vela/vela.py b/ethosu/vela/vela.py index 7740711e..b5dfd80c 100644 --- a/ethosu/vela/vela.py +++ b/ethosu/vela/vela.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Main entry point for the Vela compiler. # diff --git a/ethosu/vela/weight_compressor.py b/ethosu/vela/weight_compressor.py index 6f9467ec..e3e318c3 100644 --- a/ethosu/vela/weight_compressor.py +++ b/ethosu/vela/weight_compressor.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Compresses and pads the weigths. It also calculates the scales and packs with the biases. from collections import namedtuple diff --git a/setup.py b/setup.py index 3eb79b61..ffa74e11 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. +# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -13,6 +13,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# # Description: # Packaging for the Vela compiler import os -- cgit v1.2.1