# -*- coding: utf-8 -*-
# (C) Copyright 2020, 2021, 2022, 2023, 2024 IBM. All Rights Reserved.
#
# Licensed under the MIT license. See LICENSE file in the project root for details.
"""Custom Exceptions for aihwkit."""
[docs]class AihwkitException(Exception):
"""Base class for exceptions related to aihwkit."""
[docs]class ModuleError(AihwkitException):
"""Exceptions related to analog neural network modules."""
[docs]class TileError(AihwkitException):
"""Exceptions related to analog tiles."""
[docs]class TileModuleError(TileError):
"""Exceptions related to analog tile modules."""
[docs]class ArgumentError(AihwkitException):
"""Exceptions related to wrong arguments."""
[docs]class CudaError(AihwkitException):
"""Exceptions related to CUDA."""
[docs]class ConfigError(AihwkitException):
"""Exceptions related to tile configuration."""
[docs]class AnalogBiasConfigError(ConfigError):
"""Exception that analog bias is wrongly set."""
[docs]class TorchTileConfigError(ConfigError):
"""Exceptions related to torch tile configuration."""
[docs]class CloudError(AihwkitException):
"""Exceptions related to the cloud functionality."""
[docs]class FusionExportError(CloudError):
"""Exceptions related to the fusion export functionality."""