From 1634305e99082c285f2d3e14bdedf05b61f7be93 Mon Sep 17 00:00:00 2001 From: Fredrik Svedberg Date: Fri, 16 Apr 2021 14:36:22 +0200 Subject: [MLBEDSW-4414] Fix verbose-operators for multiple custom ops Fixed exception for --verbose-operators option when there are multiple custom operators in the network. Signed-off-by: Fredrik Svedberg Change-Id: I5ab743d96a4e0367818fbe46cc47896c691d888c --- ethosu/vela/nn_graph.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ethosu/vela/nn_graph.py') diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py index 19734873..2d4b0c87 100644 --- a/ethosu/vela/nn_graph.py +++ b/ethosu/vela/nn_graph.py @@ -337,10 +337,13 @@ class Subgraph: attrs["kshape"] = [kshape[0], kshape[1]] attrs["type"] = op.type.name attrs.pop("use_cudnn_on_gpu", None) + custom_options = attrs.pop("custom_options", None) if attrs not in unique_ops: unique_ops.append(attrs) # print attributes in human readable format a = attrs.copy() + if custom_options is not None: + a["custom_options"] = custom_options s = a.pop("type") data_format = a.pop("data_format", None) if data_format and data_format != b"NHWC": -- cgit v1.2.1