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 <michael.mcgeagh@arm.com>
Change-Id: Ie8732c8d46067244963936c53f0ec81adda50372
diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py
index 12edf5e..b287785 100644
--- a/ethosu/vela/nn_graph.py
+++ b/ethosu/vela/nn_graph.py
@@ -178,7 +178,7 @@
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 @@
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()