From f3e3ad746de943e312c290d614184c0f6559ac1f Mon Sep 17 00:00:00 2001 From: Michael McGeagh Date: Wed, 2 Dec 2020 12:39:03 +0000 Subject: MLBEDSW-2836 Change sets to tuples Replace conditional checks against sets with tuples. If not requiring uniqueness, or complex set operations, it is quicker to use tuples instead. Signed-off-by: Michael McGeagh Change-Id: Ie8732c8d46067244963936c53f0ec81adda50372 --- ethosu/vela/nn_graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethosu/vela/nn_graph.py') diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py index 12edf5ef..b2877851 100644 --- a/ethosu/vela/nn_graph.py +++ b/ethosu/vela/nn_graph.py @@ -178,7 +178,7 @@ class Subgraph: visit_tensor(inp) inp.consumer_list.append(op) - if op.type in set((Op.Placeholder, Op.SubgraphInput)): + if op.type in (Op.Placeholder, Op.SubgraphInput): assert len(op.outputs) == 1 self.input_tensors.append(op.outputs[0]) @@ -321,7 +321,7 @@ class Subgraph: all_ops = self.get_all_ops() unique_ops = [] for op in all_ops: - if op.type in set((Op.Const, Op.Identity, Op.Placeholder)): + if op.type in (Op.Const, Op.Identity, Op.Placeholder): continue attrs = op.attrs.copy() -- cgit v1.2.1