diff --git a/src/lava/magma/compiler/channels/interfaces.py b/src/lava/magma/compiler/channels/interfaces.py index e5646c7f8..240387443 100644 --- a/src/lava/magma/compiler/channels/interfaces.py +++ b/src/lava/magma/compiler/channels/interfaces.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + import typing as ty from abc import ABC, abstractmethod from enum import IntEnum diff --git a/src/lava/magma/compiler/channels/pypychannel.py b/src/lava/magma/compiler/channels/pypychannel.py index 80fa608b7..10ec2b0cc 100644 --- a/src/lava/magma/compiler/channels/pypychannel.py +++ b/src/lava/magma/compiler/channels/pypychannel.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + import typing as ty from dataclasses import dataclass from multiprocessing import Semaphore diff --git a/src/lava/magma/compiler/mappable_interface.py b/src/lava/magma/compiler/mappable_interface.py index 05a9422b9..ef73eaf29 100644 --- a/src/lava/magma/compiler/mappable_interface.py +++ b/src/lava/magma/compiler/mappable_interface.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + import typing from abc import ABC diff --git a/src/lava/magma/compiler/mapper.py b/src/lava/magma/compiler/mapper.py index 815d83eb9..2f570877f 100644 --- a/src/lava/magma/compiler/mapper.py +++ b/src/lava/magma/compiler/mapper.py @@ -1,5 +1,5 @@ -# Copyright (C) 2022 Intel Corporation -# SPDX-License-Identifier: BSD-3-Clause +# Copyright (C) 2021-22 Intel Corporation +# SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ import typing as ty diff --git a/src/lava/magma/compiler/node.py b/src/lava/magma/compiler/node.py index ded75ba5c..20e0c7261 100644 --- a/src/lava/magma/compiler/node.py +++ b/src/lava/magma/compiler/node.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + from __future__ import annotations import typing diff --git a/src/lava/magma/compiler/utils.py b/src/lava/magma/compiler/utils.py index b3c813cac..73c95a8de 100644 --- a/src/lava/magma/compiler/utils.py +++ b/src/lava/magma/compiler/utils.py @@ -1,3 +1,7 @@ +# Copyright (C) 2021-22 Intel Corporation +# SPDX-License-Identifier: LGPL 2.1 or later +# See: https://spdx.org/licenses/ + import functools as ft import typing as ty from dataclasses import dataclass diff --git a/src/lava/magma/compiler/var_model.py b/src/lava/magma/compiler/var_model.py index 2a292ada3..eff1af8f2 100644 --- a/src/lava/magma/compiler/var_model.py +++ b/src/lava/magma/compiler/var_model.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + from __future__ import annotations import typing as ty diff --git a/src/lava/magma/core/decorator.py b/src/lava/magma/core/decorator.py index 311bfef99..6331bb175 100644 --- a/src/lava/magma/core/decorator.py +++ b/src/lava/magma/core/decorator.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import typing as ty from lava.magma.core.model.model import AbstractProcessModel diff --git a/src/lava/magma/core/model/interfaces.py b/src/lava/magma/core/model/interfaces.py index 7106992ce..a5aa1a064 100644 --- a/src/lava/magma/core/model/interfaces.py +++ b/src/lava/magma/core/model/interfaces.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import typing as ty from abc import ABC, abstractmethod from lava.magma.compiler.channels.interfaces import AbstractCspPort diff --git a/src/lava/magma/core/model/py/neuron.py b/src/lava/magma/core/model/py/neuron.py index 8da3c8cc1..b1a4b2681 100644 --- a/src/lava/magma/core/model/py/neuron.py +++ b/src/lava/magma/core/model/py/neuron.py @@ -1,3 +1,7 @@ +# Copyright (C) 2021-23 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause +# See: https://spdx.org/licenses/ + from lava.magma.core.model.py.model import PyLoihiProcessModel from lava.magma.core.model.py.ports import PyOutPort, PyInPort from lava.magma.core.model.py.type import LavaPyType diff --git a/src/lava/magma/core/model/py/type.py b/src/lava/magma/core/model/py/type.py index db30f11df..9739e3b79 100644 --- a/src/lava/magma/core/model/py/type.py +++ b/src/lava/magma/core/model/py/type.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import typing as ty from dataclasses import dataclass from lava.magma.core.model.py.ports import PyInPort, PyOutPort, PyRefPort diff --git a/src/lava/magma/core/model/sub/model.py b/src/lava/magma/core/model/sub/model.py index 3edadd04b..246bae908 100644 --- a/src/lava/magma/core/model/sub/model.py +++ b/src/lava/magma/core/model/sub/model.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import typing as ty from abc import abstractmethod diff --git a/src/lava/magma/core/process/connection.py b/src/lava/magma/core/process/connection.py index 934f1fddf..72ca9209a 100644 --- a/src/lava/magma/core/process/connection.py +++ b/src/lava/magma/core/process/connection.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import typing as ty from lava.magma.core.learning.learning_rule import LoihiLearningRule diff --git a/src/lava/magma/core/process/neuron.py b/src/lava/magma/core/process/neuron.py index 3a99008a0..e8e66c5a0 100644 --- a/src/lava/magma/core/process/neuron.py +++ b/src/lava/magma/core/process/neuron.py @@ -1,3 +1,7 @@ +# Copyright (C) 2021-23 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause +# See: https://spdx.org/licenses/ + import typing as ty from lava.magma.core.process.ports.ports import OutPort, InPort from lava.magma.core.learning.learning_rule import LoihiLearningRule diff --git a/src/lava/magma/core/process/ports/exceptions.py b/src/lava/magma/core/process/ports/exceptions.py index 3d472f2b6..acd6ed99f 100644 --- a/src/lava/magma/core/process/ports/exceptions.py +++ b/src/lava/magma/core/process/ports/exceptions.py @@ -1,5 +1,7 @@ -# Copyright (C) 2021-22 Intel Corporation -# SPDX-License-Identifier: BSD-3-Clause +# Copyright (C) 2021-23 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause +# See: https://spdx.org/licenses/ + import typing as ty diff --git a/src/lava/magma/core/process/ports/reduce_ops.py b/src/lava/magma/core/process/ports/reduce_ops.py index 119f94c15..4d9e99ad7 100644 --- a/src/lava/magma/core/process/ports/reduce_ops.py +++ b/src/lava/magma/core/process/ports/reduce_ops.py @@ -1,5 +1,7 @@ -# Copyright (C) 2021-22 Intel Corporation -# SPDX-License-Identifier: BSD-3-Clause +# Copyright (C) 2021-23 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause +# See: https://spdx.org/licenses/ + from abc import ABC diff --git a/src/lava/magma/core/process/variable.py b/src/lava/magma/core/process/variable.py index 54ffaa58f..57af581ce 100644 --- a/src/lava/magma/core/process/variable.py +++ b/src/lava/magma/core/process/variable.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import typing as ty import numpy as np diff --git a/src/lava/magma/core/run_configs.py b/src/lava/magma/core/run_configs.py index 6eeb9a578..f7144ce4d 100644 --- a/src/lava/magma/core/run_configs.py +++ b/src/lava/magma/core/run_configs.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + from __future__ import annotations import logging import typing as ty diff --git a/src/lava/magma/core/sync/domain.py b/src/lava/magma/core/sync/domain.py index 82d24cb38..f635783e5 100644 --- a/src/lava/magma/core/sync/domain.py +++ b/src/lava/magma/core/sync/domain.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import typing as ty from lava.magma.core.sync.protocol import AbstractSyncProtocol diff --git a/src/lava/magma/core/sync/protocol.py b/src/lava/magma/core/sync/protocol.py index f9c179445..1858b0f14 100644 --- a/src/lava/magma/core/sync/protocol.py +++ b/src/lava/magma/core/sync/protocol.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + from abc import abstractmethod diff --git a/src/lava/magma/runtime/message_infrastructure/factory.py b/src/lava/magma/runtime/message_infrastructure/factory.py index 5588e1aaf..9531b6753 100644 --- a/src/lava/magma/runtime/message_infrastructure/factory.py +++ b/src/lava/magma/runtime/message_infrastructure/factory.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + from lava.magma.core.process.message_interface_enum import ActorType from lava.magma.runtime.message_infrastructure.multiprocessing import \ MultiProcessing diff --git a/src/lava/magma/runtime/message_infrastructure/message_infrastructure_interface.py b/src/lava/magma/runtime/message_infrastructure/message_infrastructure_interface.py index ac88850da..85106909d 100644 --- a/src/lava/magma/runtime/message_infrastructure/message_infrastructure_interface.py +++ b/src/lava/magma/runtime/message_infrastructure/message_infrastructure_interface.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + import typing as ty if ty.TYPE_CHECKING: from lava.magma.core.process.process import AbstractProcess diff --git a/src/lava/magma/runtime/message_infrastructure/multiprocessing.py b/src/lava/magma/runtime/message_infrastructure/multiprocessing.py index b5f044015..b278d3714 100644 --- a/src/lava/magma/runtime/message_infrastructure/multiprocessing.py +++ b/src/lava/magma/runtime/message_infrastructure/multiprocessing.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + import typing as ty if ty.TYPE_CHECKING: from lava.magma.core.process.process import AbstractProcess diff --git a/src/lava/magma/runtime/mgmt_token_enums.py b/src/lava/magma/runtime/mgmt_token_enums.py index 2f440d85d..3c789cd74 100644 --- a/src/lava/magma/runtime/mgmt_token_enums.py +++ b/src/lava/magma/runtime/mgmt_token_enums.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + import typing as ty import numpy as np diff --git a/src/lava/magma/runtime/runtime.py b/src/lava/magma/runtime/runtime.py index 903daa572..caa1ff425 100644 --- a/src/lava/magma/runtime/runtime.py +++ b/src/lava/magma/runtime/runtime.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + from __future__ import annotations import logging diff --git a/src/lava/magma/runtime/runtime_services/channel_broker/channel_broker.py b/src/lava/magma/runtime/runtime_services/channel_broker/channel_broker.py index 38536dba7..9b3b30833 100644 --- a/src/lava/magma/runtime/runtime_services/channel_broker/channel_broker.py +++ b/src/lava/magma/runtime/runtime_services/channel_broker/channel_broker.py @@ -1,6 +1,7 @@ # Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + import threading from abc import ABC import logging diff --git a/src/lava/magma/runtime/runtime_services/enums.py b/src/lava/magma/runtime/runtime_services/enums.py index 22f490d73..d9103158a 100644 --- a/src/lava/magma/runtime/runtime_services/enums.py +++ b/src/lava/magma/runtime/runtime_services/enums.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + from enum import IntEnum from lava.magma.runtime.mgmt_token_enums import enum_to_np diff --git a/src/lava/magma/runtime/runtime_services/interfaces.py b/src/lava/magma/runtime/runtime_services/interfaces.py index ea5ae5cfb..fd35c621c 100644 --- a/src/lava/magma/runtime/runtime_services/interfaces.py +++ b/src/lava/magma/runtime/runtime_services/interfaces.py @@ -1,6 +1,7 @@ # Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + import typing as ty from abc import ABC, abstractmethod diff --git a/src/lava/magma/runtime/runtime_services/runtime_service.py b/src/lava/magma/runtime/runtime_services/runtime_service.py index 5c43b31e8..0dc4cfcb9 100644 --- a/src/lava/magma/runtime/runtime_services/runtime_service.py +++ b/src/lava/magma/runtime/runtime_services/runtime_service.py @@ -1,6 +1,7 @@ # Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: LGPL 2.1 or later # See: https://spdx.org/licenses/ + import logging import typing as ty from abc import abstractmethod diff --git a/src/lava/proc/learning_rules/r_stdp_learning_rule.py b/src/lava/proc/learning_rules/r_stdp_learning_rule.py index 8a4d76858..ebcee3ce0 100644 --- a/src/lava/proc/learning_rules/r_stdp_learning_rule.py +++ b/src/lava/proc/learning_rules/r_stdp_learning_rule.py @@ -1,17 +1,5 @@ -# INTEL CORPORATION CONFIDENTIAL AND PROPRIETARY -# -# Copyright © 2021-2022 Intel Corporation. -# -# This software and the related documents are Intel copyrighted -# materials, and your use of them is governed by the express -# license under which they were provided to you (License). Unless -# the License provides otherwise, you may not use, modify, copy, -# publish, distribute, disclose or transmit this software or the -# related documents without Intel's prior written permission. -# -# This software and the related documents are provided as is, with -# no express or implied warranties, other than those that are -# expressly stated in the License. +# Copyright (C) 2021-23 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ from lava.magma.core.learning.learning_rule import Loihi3FLearningRule diff --git a/src/lava/proc/learning_rules/stdp_learning_rule.py b/src/lava/proc/learning_rules/stdp_learning_rule.py index a43ab3444..e96db873d 100644 --- a/src/lava/proc/learning_rules/stdp_learning_rule.py +++ b/src/lava/proc/learning_rules/stdp_learning_rule.py @@ -1,17 +1,5 @@ -# INTEL CORPORATION CONFIDENTIAL AND PROPRIETARY -# -# Copyright © 2021-2022 Intel Corporation. -# -# This software and the related documents are Intel copyrighted -# materials, and your use of them is governed by the express -# license under which they were provided to you (License). Unless -# the License provides otherwise, you may not use, modify, copy, -# publish, distribute, disclose or transmit this software or the -# related documents without Intel's prior written permission. -# -# This software and the related documents are provided as is, with -# no express or implied warranties, other than those that are -# expressly stated in the License. +# Copyright (C) 2021-23 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ from lava.magma.core.learning.learning_rule import Loihi2FLearningRule diff --git a/src/lava/proc/lif/models.py b/src/lava/proc/lif/models.py index e45c9aec2..1d7bd3a75 100644 --- a/src/lava/proc/lif/models.py +++ b/src/lava/proc/lif/models.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import numpy as np from lava.magma.core.sync.protocols.loihi_protocol import LoihiProtocol from lava.magma.core.model.py.ports import PyInPort, PyOutPort diff --git a/src/lava/proc/monitor/process.py b/src/lava/proc/monitor/process.py index f93f4e0ad..b907c4103 100644 --- a/src/lava/proc/monitor/process.py +++ b/src/lava/proc/monitor/process.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import matplotlib.pyplot as plt from lava.magma.core.process.process import AbstractProcess from lava.magma.core.process.variable import Var diff --git a/src/lava/proc/receiver/process.py b/src/lava/proc/receiver/process.py index 256a95bee..52e2679a4 100644 --- a/src/lava/proc/receiver/process.py +++ b/src/lava/proc/receiver/process.py @@ -1,6 +1,7 @@ # Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import typing as ty from lava.magma.core.process.ports.ports import InPort diff --git a/src/lava/proc/sdn/process.py b/src/lava/proc/sdn/process.py index 55c87b2c9..32f083247 100644 --- a/src/lava/proc/sdn/process.py +++ b/src/lava/proc/sdn/process.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ - import typing as ty from enum import IntEnum, unique diff --git a/src/lava/proc/spiker/process.py b/src/lava/proc/spiker/process.py index 8c948932c..18af830a1 100644 --- a/src/lava/proc/spiker/process.py +++ b/src/lava/proc/spiker/process.py @@ -1,6 +1,7 @@ # Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import typing as ty import numpy as np diff --git a/src/lava/utils/float2fixed.py b/src/lava/utils/float2fixed.py deleted file mode 100644 index a381fae3c..000000000 --- a/src/lava/utils/float2fixed.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2021-22 Intel Corporation -# SPDX-License-Identifier: BSD-3-Clause -# See: https://spdx.org/licenses/ - -""" -This module will contain a tool to perform automated float- to fixed-point -conversion of of Lava Processes. - -Given a set of processes and data, the tool will perform the following steps: - -1. Find fixed-point ProcessModels of every floating-point ProcessModel if -available and throw an error otherwise. -2. Run the floating-point model and collect activation statistics. -3. Given activation statistic and type/precision/dynamic range specifications -of fixed-point models, perform input parameter conversion for fixed-point model. -4. Replace floating-point ProcessModels by corresponding fixed-point -ProcessModels -5. Initialize fixed-point ProcessModels - -ProcessModel extraction might be a shared function with compiler. - -This will likely lead to some performance degradation of the application so -perhaps some iterative optimization may have to be included within this -parameter conversion process. Reuse other libraries for this purpose where -possible. - """ diff --git a/src/lava/utils/validator.py b/src/lava/utils/validator.py deleted file mode 100644 index 2d1a19f29..000000000 --- a/src/lava/utils/validator.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2021-22 Intel Corporation -# SPDX-License-Identifier: BSD-3-Clause -# See: https://spdx.org/licenses/ - -""" -This module will contain a tool to automatically validate the correctness of -one ProcessModel of Process against another ProcessModel of the same Process. - -For instance, an application might use processes having both PyProcessModels -and NcProcessModels. In order to ensure that the Python SW model of a -NeuroCore produces the same result, this tool can be used to compare both -implementations. In doing so, it will point out exactly at which point in -time in which state variable a divergence in the internal dynamics occurs in -order to ease mismatch resolution. -""" diff --git a/src/lava/utils/visualizer.py b/src/lava/utils/visualizer.py deleted file mode 100644 index 879651097..000000000 --- a/src/lava/utils/visualizer.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (C) 2021-22 Intel Corporation -# SPDX-License-Identifier: BSD-3-Clause -# See: https://spdx.org/licenses/ - -""" -This module will contain a tool to visualize a network of interconnected Lava -Processes and Vars. -""" diff --git a/tests/lava/magma/compiler/channels/test_pypychannel.py b/tests/lava/magma/compiler/channels/test_pypychannel.py index ff6af07c2..7e8a6e95a 100644 --- a/tests/lava/magma/compiler/channels/test_pypychannel.py +++ b/tests/lava/magma/compiler/channels/test_pypychannel.py @@ -1,3 +1,7 @@ +# Copyright (C) 2021-22 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause +# See: https://spdx.org/licenses/ + import numpy as np import unittest from multiprocessing import Process diff --git a/tests/lava/magma/compiler/test_channel_builder.py b/tests/lava/magma/compiler/test_channel_builder.py index e46200a63..30b6490e7 100644 --- a/tests/lava/magma/compiler/test_channel_builder.py +++ b/tests/lava/magma/compiler/test_channel_builder.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import typing as ty import unittest from multiprocessing.managers import SharedMemoryManager diff --git a/tests/lava/magma/compiler/test_compiler.py b/tests/lava/magma/compiler/test_compiler.py index 269d73865..8d750218b 100644 --- a/tests/lava/magma/compiler/test_compiler.py +++ b/tests/lava/magma/compiler/test_compiler.py @@ -1,6 +1,7 @@ # Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import logging import typing as ty import unittest diff --git a/tests/lava/magma/compiler/test_node.py b/tests/lava/magma/compiler/test_node.py index 00ae0d5b9..ea2bcfece 100644 --- a/tests/lava/magma/compiler/test_node.py +++ b/tests/lava/magma/compiler/test_node.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import unittest from lava.magma.core.process.process import AbstractProcess diff --git a/tests/lava/magma/core/model/test_decorators.py b/tests/lava/magma/core/model/test_decorators.py index 12a531d0e..1c92e1665 100644 --- a/tests/lava/magma/core/model/test_decorators.py +++ b/tests/lava/magma/core/model/test_decorators.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import unittest from lava.magma.core.decorator import implements, requires, tag diff --git a/tests/lava/magma/core/model/test_sub_model.py b/tests/lava/magma/core/model/test_sub_model.py index 65a10197c..267166495 100644 --- a/tests/lava/magma/core/model/test_sub_model.py +++ b/tests/lava/magma/core/model/test_sub_model.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import unittest from lava.magma.core.process.process import AbstractProcess diff --git a/tests/lava/magma/core/process/test_lif_dense_lif.py b/tests/lava/magma/core/process/test_lif_dense_lif.py index 4849117f7..591214967 100644 --- a/tests/lava/magma/core/process/test_lif_dense_lif.py +++ b/tests/lava/magma/core/process/test_lif_dense_lif.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import unittest import numpy as np diff --git a/tests/lava/magma/core/process/test_process.py b/tests/lava/magma/core/process/test_process.py index 129bb6f14..8a33ad8fb 100644 --- a/tests/lava/magma/core/process/test_process.py +++ b/tests/lava/magma/core/process/test_process.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import logging import unittest from unittest.mock import Mock, seal diff --git a/tests/lava/magma/core/process/test_variable.py b/tests/lava/magma/core/process/test_variable.py index c59f85a77..d20a945c1 100644 --- a/tests/lava/magma/core/process/test_variable.py +++ b/tests/lava/magma/core/process/test_variable.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import unittest from lava.magma.core.process.process import AbstractProcess diff --git a/tests/lava/magma/runtime/test_context_manager.py b/tests/lava/magma/runtime/test_context_manager.py index f792fb8f2..03d9fbc7d 100644 --- a/tests/lava/magma/runtime/test_context_manager.py +++ b/tests/lava/magma/runtime/test_context_manager.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import abc import unittest from typing import Optional diff --git a/tests/lava/magma/runtime/test_get_set_var.py b/tests/lava/magma/runtime/test_get_set_var.py index 3fff27816..11a50fad1 100644 --- a/tests/lava/magma/runtime/test_get_set_var.py +++ b/tests/lava/magma/runtime/test_get_set_var.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import numpy as np import unittest diff --git a/tests/lava/magma/runtime/test_loihi_protocol.py b/tests/lava/magma/runtime/test_loihi_protocol.py index e017deeb5..3198b299c 100644 --- a/tests/lava/magma/runtime/test_loihi_protocol.py +++ b/tests/lava/magma/runtime/test_loihi_protocol.py @@ -1,3 +1,7 @@ +# Copyright (C) 2021-22 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause +# See: https://spdx.org/licenses/ + import unittest from lava.magma.core.decorator import implements, requires diff --git a/tests/lava/magma/runtime/test_loihi_with_async_protocol.py b/tests/lava/magma/runtime/test_loihi_with_async_protocol.py index 50cc98917..634b0be84 100644 --- a/tests/lava/magma/runtime/test_loihi_with_async_protocol.py +++ b/tests/lava/magma/runtime/test_loihi_with_async_protocol.py @@ -1,5 +1,5 @@ -# Copyright (C) 2022 Intel Corporation -# SPDX-License-Identifier: LGPL 2.1 or later +# Copyright (C) 2021-22 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ import unittest diff --git a/tests/lava/magma/runtime/test_ref_var_ports.py b/tests/lava/magma/runtime/test_ref_var_ports.py index 13db2689f..9b2d63fa0 100644 --- a/tests/lava/magma/runtime/test_ref_var_ports.py +++ b/tests/lava/magma/runtime/test_ref_var_ports.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import numpy as np import unittest diff --git a/tests/lava/magma/runtime/test_run_continuously_and_pause.py b/tests/lava/magma/runtime/test_run_continuously_and_pause.py index f7e9db830..2c23a5379 100644 --- a/tests/lava/magma/runtime/test_run_continuously_and_pause.py +++ b/tests/lava/magma/runtime/test_run_continuously_and_pause.py @@ -1,3 +1,7 @@ +# Copyright (C) 2021-22 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause +# See: https://spdx.org/licenses/ + import unittest from time import sleep diff --git a/tests/lava/magma/runtime/test_runtime.py b/tests/lava/magma/runtime/test_runtime.py index e25295db1..a70563638 100644 --- a/tests/lava/magma/runtime/test_runtime.py +++ b/tests/lava/magma/runtime/test_runtime.py @@ -1,6 +1,10 @@ +# Copyright (C) 2021-22 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause +# See: https://spdx.org/licenses/ + import typing as ty import unittest -from unittest.mock import Mock, PropertyMock +from unittest.mock import Mock from lava.magma.compiler.executable import Executable from lava.magma.core.process.message_interface_enum import ActorType diff --git a/tests/lava/magma/runtime/test_runtime_service.py b/tests/lava/magma/runtime/test_runtime_service.py index 0b713cd91..db6c237d7 100644 --- a/tests/lava/magma/runtime/test_runtime_service.py +++ b/tests/lava/magma/runtime/test_runtime_service.py @@ -1,3 +1,7 @@ +# Copyright (C) 2021-22 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause +# See: https://spdx.org/licenses/ + import unittest from multiprocessing.managers import SharedMemoryManager diff --git a/tests/lava/proc/conv/test_process.py b/tests/lava/proc/conv/test_process.py index 90983c382..c9cb19490 100644 --- a/tests/lava/proc/conv/test_process.py +++ b/tests/lava/proc/conv/test_process.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import unittest import numpy as np from lava.proc.conv.process import Conv diff --git a/tests/lava/proc/conv/test_utils.py b/tests/lava/proc/conv/test_utils.py index b68902eb0..4542973b5 100644 --- a/tests/lava/proc/conv/test_utils.py +++ b/tests/lava/proc/conv/test_utils.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import os import unittest import numpy as np diff --git a/tests/lava/proc/dense/test_models.py b/tests/lava/proc/dense/test_models.py index dd97a6adb..ed2baafab 100644 --- a/tests/lava/proc/dense/test_models.py +++ b/tests/lava/proc/dense/test_models.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import unittest import numpy as np diff --git a/tests/lava/proc/io/test_dataloader.py b/tests/lava/proc/io/test_dataloader.py index 491e72983..aeb371483 100644 --- a/tests/lava/proc/io/test_dataloader.py +++ b/tests/lava/proc/io/test_dataloader.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + from typing import List, Tuple import unittest import numpy as np diff --git a/tests/lava/proc/io/test_source_sink.py b/tests/lava/proc/io/test_source_sink.py index 7a0d4fb24..b800601d6 100644 --- a/tests/lava/proc/io/test_source_sink.py +++ b/tests/lava/proc/io/test_source_sink.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + from typing import List import unittest import numpy as np diff --git a/tests/lava/proc/lif/test_models.py b/tests/lava/proc/lif/test_models.py index bfb8f9809..e5d03126a 100644 --- a/tests/lava/proc/lif/test_models.py +++ b/tests/lava/proc/lif/test_models.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import unittest import numpy as np diff --git a/tests/lava/proc/sdn/test_models.py b/tests/lava/proc/sdn/test_models.py index d7c552c60..18ff73b56 100644 --- a/tests/lava/proc/sdn/test_models.py +++ b/tests/lava/proc/sdn/test_models.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import sys import unittest import numpy as np diff --git a/tests/lava/proc/sdn/test_process.py b/tests/lava/proc/sdn/test_process.py index 79ccf78a5..809bdd6a5 100644 --- a/tests/lava/proc/sdn/test_process.py +++ b/tests/lava/proc/sdn/test_process.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import unittest from lava.proc.sdn.process import Sigma, Delta, SigmaDelta, ActivationMode diff --git a/tests/lava/test_utils/utils.py b/tests/lava/test_utils/utils.py index 399212cbe..e1ec81397 100644 --- a/tests/lava/test_utils/utils.py +++ b/tests/lava/test_utils/utils.py @@ -1,12 +1,13 @@ # Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import os import subprocess import importlib -class Utils(): +class Utils: """Utility Class containing testing helper code that can be reused between tests """ diff --git a/tutorials/end_to_end/convert_params.py b/tutorials/end_to_end/convert_params.py index 84febe0c1..57b2c2e11 100644 --- a/tutorials/end_to_end/convert_params.py +++ b/tutorials/end_to_end/convert_params.py @@ -1,6 +1,7 @@ # Copyright (C) 2021-22 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ + import numpy as np import warnings from scipy.optimize import fsolve