Skip to content

Commit 185bd09

Browse files
Arm backend: Fix U55 convolution dtype reject messages (pytorch#20235)
Report the actual unsupported input, weight, or bias dtype instead of the convolution node dtype when rejecting U55 convolution partitions. Signed-off-by: Sebastian Larsson <sebastian.larsson@arm.com>
1 parent 5f71611 commit 185bd09

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

backends/arm/operator_support/ethos_u55_support.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,21 +125,21 @@ def is_node_supported( # noqa: C901
125125
ifm_dtype = _try_determine_dtype(ifm)
126126
if ifm_dtype is not None and ifm_dtype not in (torch.int8, torch.int16):
127127
self.reporter.report_reject(
128-
node, f"Unsupported input dtype {dtype} (Supports i8, i16)."
128+
node, f"Unsupported input dtype {ifm_dtype} (Supports i8, i16)."
129129
)
130130
return False
131131
weight_dtype = _try_determine_dtype(weight)
132132
if weight_dtype is not None and weight_dtype not in (torch.int8,):
133133
self.reporter.report_reject(
134-
node, f"Unsupported weight dtype {dtype} (Supports i8)."
134+
node, f"Unsupported weight dtype {weight_dtype} (Supports i8)."
135135
)
136136
return False
137137
if len(node.all_input_nodes) > 2:
138138
bias = node.all_input_nodes[2]
139139
bias_dtype = _try_determine_dtype(bias)
140140
if bias_dtype is not None and bias_dtype not in (torch.int32,):
141141
self.reporter.report_reject(
142-
node, f"Unsupported bias dtype {dtype} (Supports i32)."
142+
node, f"Unsupported bias dtype {bias_dtype} (Supports i32)."
143143
)
144144
return False
145145

0 commit comments

Comments
 (0)