Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions backends/arm/operators/op_eq.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ def define_node(
inputs: List[TosaArg],
output: TosaArg,
) -> None:
assert (
inputs[0].dtype == inputs[1].dtype
), "EQ must have the same dtypes as input"
if inputs[0].dtype != inputs[1].dtype:
raise TypeError(
"All inputs need to have the same data type for operator EQ but got "
f"{inputs[0].dtype=}, {inputs[1].dtype=}"
)

input_nodes = inputs
# Handle quantization
Expand Down
8 changes: 5 additions & 3 deletions backends/arm/operators/op_ge.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ def define_node(
inputs: List[TosaArg],
output: TosaArg,
) -> None:
assert (
inputs[0].dtype == inputs[1].dtype
), "GE must have the same dtypes as input"
if inputs[0].dtype != inputs[1].dtype:
raise TypeError(
"All inputs need to have the same data type for operator GE but got "
f"{inputs[0].dtype=}, {inputs[1].dtype=}"
)

input_nodes = inputs
# Handle quantization
Expand Down
8 changes: 5 additions & 3 deletions backends/arm/operators/op_gt.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ def define_node(
inputs: List[TosaArg],
output: TosaArg,
) -> None:
assert (
inputs[0].dtype == inputs[1].dtype
), "GT must have the same dtypes as input"
if inputs[0].dtype != inputs[1].dtype:
raise TypeError(
"All inputs need to have the same data type for operator GT but got "
f"{inputs[0].dtype=}, {inputs[1].dtype=}"
)

input_nodes = inputs
# Handle quantization
Expand Down
8 changes: 5 additions & 3 deletions backends/arm/operators/op_le.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ def define_node(
inputs: List[TosaArg],
output: TosaArg,
) -> None:
assert (
inputs[0].dtype == inputs[1].dtype
), "LE must have the same dtypes as input"
if inputs[0].dtype != inputs[1].dtype:
raise TypeError(
"All inputs need to have the same data type for operator LE but got "
f"{inputs[0].dtype=}, {inputs[1].dtype=}"
)

input_nodes = inputs
# Handle quantization
Expand Down
8 changes: 5 additions & 3 deletions backends/arm/operators/op_lt.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ def define_node(
inputs: List[TosaArg],
output: TosaArg,
) -> None:
assert (
inputs[0].dtype == inputs[1].dtype
), "LT must have the same dtypes as input"
if inputs[0].dtype != inputs[1].dtype:
raise TypeError(
"All inputs need to have the same data type for operator LT but got "
f"{inputs[0].dtype=}, {inputs[1].dtype=}"
)

input_nodes = inputs
# Handle quantization
Expand Down
Loading