diff options
author | Tim Hall <tim.hall@arm.com> | 2020-06-17 14:53:11 +0100 |
---|---|---|
committer | Tim Hall <tim.hall@arm.com> | 2020-06-18 17:53:52 +0100 |
commit | c8310b1432f7a77df3c95e8ecf8248c8a953b411 (patch) | |
tree | eaddfe6ae80db3c85ddca824e0fc70739d05a9d5 /ethosu/vela/operation.py | |
parent | 10a6618784aae35de389e0291fd2d78cbfa03bb7 (diff) | |
download | ethos-u-vela-c8310b1432f7a77df3c95e8ecf8248c8a953b411.tar.gz |
MLBEDSW-2528: MLCE-219: Custom operator pass through
- Fixed custom operator pass through
- Added error printing functions for operators and tensor
- Minor cleanup of custom exception handling
Signed-off-by: Tim Hall <tim.hall@arm.com>
Change-Id: Idf295df1e4c544381dc480244d880c32fb285e38
Diffstat (limited to 'ethosu/vela/operation.py')
-rw-r--r-- | ethosu/vela/operation.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py index 51311ef7..448d8382 100644 --- a/ethosu/vela/operation.py +++ b/ethosu/vela/operation.py @@ -31,7 +31,7 @@ class Operation: """Class representing a Neural Network operation. Has a name, a type, input and output tensors, as well as an attribute dictionary.""" - __slots__ = "type", "name", "attrs", "inputs", "outputs", "flops", "scheduled_pass", "run_on_npu" + __slots__ = "type", "name", "op_index", "attrs", "inputs", "outputs", "flops", "scheduled_pass", "run_on_npu" def __init__(self, op_type, name): self.type = op_type @@ -42,6 +42,7 @@ input and output tensors, as well as an attribute dictionary.""" self.flops = 0 self.run_on_npu = True self.scheduled_pass = None + self.op_index = None # input network operator index def clone(self, suffix="_clone"): res = Operation(self.type, self.name + suffix) @@ -51,6 +52,7 @@ input and output tensors, as well as an attribute dictionary.""" res.outputs = list(self.outputs) res.flops = self.flops res.scheduled_pass = self.scheduled_pass + res.op_index = None # not relevant as not part of input network return res |