Skip to content

Commit ccc6a0b

Browse files
skywallStrycekSimon
authored andcommitted
NXP backend: Add support for EdgeProgram test inference with multiple outputs
1 parent 0a27e93 commit ccc6a0b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

backends/nxp/tests/executors.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ def inference(
4646
return output.detach().numpy()
4747
elif isinstance(output, tuple) and len(output) == 1:
4848
return output[0].detach().numpy()
49+
elif isinstance(output, tuple):
50+
output_names = self.edge_program.graph_signature.user_outputs
51+
52+
return {
53+
name: tensor.detach().numpy()
54+
for (name, tensor) in zip(output_names, output)
55+
}
4956

5057
raise RuntimeError(
5158
"Edge program inference with multiple outputs not implemented"

0 commit comments

Comments
 (0)