From 4a434cba156cdfb2613b7ebe4d4a4ec9f85ba616 Mon Sep 17 00:00:00 2001 From: Fredrik Svedberg Date: Tue, 27 Sep 2022 14:13:01 +0200 Subject: MLBEDSW-6969 Remove RescaleAdd and RescaleMul operators Removed RescaleAdd and RescaleMul operators in favour of Operation.explicit_scale and removed Operation.rescale. Signed-off-by: Fredrik Svedberg Change-Id: Idccd8851731d4bb8d4e84970e0fd6b409d7d4e45 --- ethosu/vela/operation.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'ethosu/vela/operation.py') diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py index 8b3c88d9..8189793e 100644 --- a/ethosu/vela/operation.py +++ b/ethosu/vela/operation.py @@ -27,7 +27,6 @@ from typing import List from typing import Optional from typing import Tuple from typing import TYPE_CHECKING -from typing import Union from .api import NpuRoundingMode from .errors import VelaError @@ -247,8 +246,6 @@ class Op(Enum): ReluN1To1 = OperatorInfo(indices=NNG_IFM_INDICES) ReluN = OperatorInfo(indices=NNG_IFM_INDICES) # TOSA specific Rescale = OperatorInfo(indices=NNG_IFM_INDICES) # TOSA specific - RescaleAdd = OperatorInfo(block_type=NpuBlockType.ElementWise, indices=NNG_IFM_IFM2_INDICES) - RescaleMul = OperatorInfo(block_type=NpuBlockType.ElementWise, indices=NNG_IFM_IFM2_INDICES) Reshape = OperatorInfo(indices=NNG_IFM_INDICES) # resize ops map to pooling operations unless explicitly converted to other operations in the graph optimiser ResizeBilinear = OperatorInfo(block_type=NpuBlockType.Pooling, indices=NNG_IFM_INDICES) @@ -535,9 +532,6 @@ class Operation: self._kernel = None self.ifm_shapes: List[Shape4D] = [] self.ofm_shapes: List[Shape4D] = [] - # If not none: contains rescale to be used as output scaling - # (which overrides the ofm tensor's scale) - self.rescale: Optional[Union[Tuple[int, int], ExplicitScaling]] = None self.read_offsets: List[Optional[Shape4D]] = [None, None] # offset for [ifm, ifm2] self.read_shapes: List[Optional[Shape4D]] = [None, None] # read shape for [ifm, ifm2] self.rounding_mode: Optional[NpuRoundingMode] = None @@ -586,7 +580,6 @@ class Operation: res.rounding_mode = self.rounding_mode res.explicit_scaling = self.explicit_scaling res.low_precision_scaling = self.low_precision_scaling - res.rescale = self.rescale res.ifm_resampling_mode = self.ifm_resampling_mode res.tile_base_offsets_ifm = [_ifm.copy() for _ifm in self.tile_base_offsets_ifm] res.tile_base_offsets_ofm = self.tile_base_offsets_ofm.copy() -- cgit v1.2.1