aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Hall <tim.hall@arm.com>2020-08-04 19:00:48 +0100
committertim.hall <tim.hall@arm.com>2020-08-19 17:45:51 +0000
commitb16dccec7e03a24f99e63667340696c7fc880d43 (patch)
treee16f5e451fa6dfc8ee41430671c2c8af96bf3aab
parente5b01638d78062f96f6560a9ab632db99f2213a6 (diff)
downloadethos-u-vela-b16dccec7e03a24f99e63667340696c7fc880d43.tar.gz
vela: Minor refactor of operation class
- Removed some of the clutter Signed-off-by: Tim Hall <tim.hall@arm.com> Change-Id: I9a12f681247befd44dbbc9d7fbd135f0603d2fbd
-rw-r--r--ethosu/vela/operation.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py
index 0290e811..3b34fe81 100644
--- a/ethosu/vela/operation.py
+++ b/ethosu/vela/operation.py
@@ -179,10 +179,8 @@ input and output tensors, as well as an attribute dictionary."""
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 @@ input and output tensors, as well as an attribute dictionary."""
_, 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()