Skip to content

Commit 2e3c21b

Browse files
skywallStrycekSimon
authored andcommitted
NXP backend: Add support for EdgeProgram test inference with multiple outputs
1 parent 7471eb1 commit 2e3c21b

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
@@ -52,6 +52,13 @@ def inference(
5252
return output.detach().numpy()
5353
elif isinstance(output, tuple) and len(output) == 1:
5454
return output[0].detach().numpy()
55+
elif isinstance(output, tuple):
56+
output_names = self.edge_program.graph_signature.user_outputs
57+
58+
return {
59+
name: tensor.detach().numpy()
60+
for (name, tensor) in zip(output_names, output)
61+
}
5562

5663
raise RuntimeError(
5764
"Edge program inference with multiple outputs not implemented"

0 commit comments

Comments
 (0)