Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions backends/cadence/aot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@ class MemoryPlanningAlgoFailure(Exception):
pass


class TypeMismatchError(Exception):
pass


class NumericalMismatchError(Exception):
def __init__(self, msg: str, rms_value: Optional[float] = None) -> None:
self.rms_value = rms_value
super().__init__(msg)


class NumericalMismatchExpectedError(Exception):
def __init__(self, rms_expected_value: float) -> None:
self.rms_expected_value = rms_expected_value
super().__init__()


# Get the output size of a 1D convolution given the input size and parameters
def get_conv1d_output_size(
in_size: torch.Size,
Expand Down
Loading