aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/high_level_command_stream.py
diff options
context:
space:
mode:
authorDwight Lidman <dwight.lidman@arm.com>2020-12-08 17:56:44 +0100
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2020-12-14 07:00:24 +0000
commit9b43f846b144d39bfb0cf16853bf6901c74b6672 (patch)
treea530dce790bb8e54dad009e11ca4d49d54b52b1d /ethosu/vela/high_level_command_stream.py
parent94457b175b8646bce089c9924e99686587de8992 (diff)
downloadethos-u-vela-9b43f846b144d39bfb0cf16853bf6901c74b6672.tar.gz
MLBEDSW-3653: Fix type errors in annotated files
This commit corrects a number of type errors reported by mypy and refactors some parts of the code which are no longer necessary after making adjustments to satisfy mypy. Signed-off-by: Dwight Lidman <dwight.lidman@arm.com> Change-Id: I16b880b228e57f2a92fb8936f53e94886e0f9f44
Diffstat (limited to 'ethosu/vela/high_level_command_stream.py')
-rw-r--r--ethosu/vela/high_level_command_stream.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/ethosu/vela/high_level_command_stream.py b/ethosu/vela/high_level_command_stream.py
index d057d17e..c45bc4e5 100644
--- a/ethosu/vela/high_level_command_stream.py
+++ b/ethosu/vela/high_level_command_stream.py
@@ -15,8 +15,6 @@
# limitations under the License.
# Description:
# Contains classes that hold commands for the high-level command stream (one command per DMA or NPU stripe).
-from enum import IntEnum
-
import numpy as np
from .architecture_features import Block
@@ -144,12 +142,6 @@ class Box:
__repr__ = __str__
-class CommandType(IntEnum):
- NpuStripe = 0
- DMA = 1
- Size = 2
-
-
class Command:
def get_ofm_y_range_for_pass(self, ps_requested):
return None
@@ -158,7 +150,7 @@ class Command:
return False
def get_operation_count(self):
- # returns numpy array of (DPU blocks, dma_ops). Should line up with the CommandType enum
+ # returns numpy array of (DPU blocks, dma_ops).
return np.array((0, 0))
@@ -185,7 +177,6 @@ class NpuStripe(Command):
pad_top=0,
pad_bottom=0,
):
- self.cmdtype = CommandType.NpuStripe
self.ps = ps
self.block_config = block_config
self.is_first = is_first
@@ -333,7 +324,6 @@ class NpuStripe(Command):
class DMA(Command):
def __init__(self, ps, in_tensor, out_tensor, box):
- self.cmdtype = CommandType.DMA
self.ps = ps
self.in_tensor = in_tensor
self.out_tensor = out_tensor