vela: Minor refactor of operation class
- Removed some of the clutter
Signed-off-by: Tim Hall <tim.hall@arm.com>
Change-Id: I9a12f681247befd44dbbc9d7fbd135f0603d2fbd
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py
index 0290e81..3b34fe8 100644
--- a/ethosu/vela/operation.py
+++ b/ethosu/vela/operation.py
@@ -179,10 +179,8 @@
return ifm_tensor, weight_tensor, bias_tensor, ofm_tensor
- concat_ops = set(("Concat", "ConcatV2", "QuantizedConcat", "ConcatTFLite", "PackReshaped"))
-
def is_concat_op(self):
- return self.type in Operation.concat_ops
+ return self.type in set(("Concat", "ConcatV2", "QuantizedConcat", "ConcatTFLite", "PackReshaped"))
def get_concat_inputs_axis(self):
assert self.is_concat_op()
@@ -216,10 +214,8 @@
_, dilation_h, dilation_w, _ = self.attrs.get("dilation", (1, 1, 1, 1))
return dilation_h, dilation_w
- split_ops = set(("Split", "SplitV", "StridedSlice", "Slice", "UnpackReshaped"))
-
def is_split_op(self):
- return self.type in Operation.split_ops
+ return self.type in set(("Split", "SplitV", "StridedSlice", "Slice", "UnpackReshaped"))
def get_split_inputs_axis(self):
assert self.is_split_op()