Skip to content

Commit 34c1569

Browse files
skywallrobert-kalmar
authored andcommitted
NXP backend: Add support for EdgeProgram test inference with multiple outputs
1 parent c90f4d9 commit 34c1569

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
@@ -57,6 +57,13 @@ def inference(
5757
return output.detach().numpy()
5858
elif isinstance(output, tuple) and len(output) == 1:
5959
return output[0].detach().numpy()
60+
elif isinstance(output, tuple):
61+
output_names = self.edge_program.graph_signature.user_outputs
62+
63+
return {
64+
name: tensor.detach().numpy()
65+
for (name, tensor) in zip(output_names, output)
66+
}
6067

6168
raise RuntimeError(
6269
"Edge program inference with multiple outputs not implemented"

0 commit comments

Comments
 (0)