diff options
author | Michael McGeagh <michael.mcgeagh@arm.com> | 2020-12-02 12:39:03 +0000 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2020-12-08 14:58:19 +0000 |
commit | f3e3ad746de943e312c290d614184c0f6559ac1f (patch) | |
tree | 44f6eac5a6b1aec4114ad2c2faddced820ea1e17 /ethosu/vela/nn_graph.py | |
parent | d9c2c4258c50f04ef3a6c3849508d317249e8ebf (diff) | |
download | ethos-u-vela-f3e3ad746de943e312c290d614184c0f6559ac1f.tar.gz |
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
Diffstat (limited to 'ethosu/vela/nn_graph.py')
-rw-r--r-- | ethosu/vela/nn_graph.py | 4 |
1 files changed, 2 insertions, 2 deletions
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() |