diff options
author | Louis Verhaard <louis.verhaard@arm.com> | 2020-09-01 10:39:04 +0200 |
---|---|---|
committer | Louis Verhaard <louis.verhaard@arm.com> | 2020-09-08 09:02:49 +0200 |
commit | 98a3499ec73b26880c633caf9a43bfe80f9ec1ed (patch) | |
tree | 2a098625e57dcd75e7aafd1ee340f971c62ffed7 /ethosu/vela/operation.py | |
parent | 515c956c9cc6d45493e45d57b822e30a7317d1ed (diff) | |
download | ethos-u-vela-98a3499ec73b26880c633caf9a43bfe80f9ec1ed.tar.gz |
MLBEDSW-2935: LUT fusing with preceding operator
Allows fusing of LUT with a preceding operator regardless of
input/output scale.
Change-Id: Ia378adbb3fe61d71299feb085f7313377e0efa39
Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Diffstat (limited to 'ethosu/vela/operation.py')
-rw-r--r-- | ethosu/vela/operation.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py index 4b83b39b..e7fd97c4 100644 --- a/ethosu/vela/operation.py +++ b/ethosu/vela/operation.py @@ -200,6 +200,10 @@ input and output tensors, as well as an attribute dictionary.""" return ifm_tensor, ifm2_tensor, weight_tensor, bias_tensor, ofm_tensor + def get_ofm(self): + _, _, _, ofm = self.get_ifm_ifm2_weights_ofm() + return ofm + def is_concat_op(self): return self.type in ("Concat", "ConcatV2", "QuantizedConcat", "ConcatTFLite", "PackReshaped") @@ -361,3 +365,6 @@ input and output tensors, as well as an attribute dictionary.""" "Conv2DBackpropInputSwitchedBias", "FullyConnectedAct", ) + + def get_output_quantization(self): + return self.attrs.get("forced_output_quantization", self.get_ofm().quantization) |