aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/high_level_command_stream.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/high_level_command_stream.py')
-rw-r--r--ethosu/vela/high_level_command_stream.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ethosu/vela/high_level_command_stream.py b/ethosu/vela/high_level_command_stream.py
index 4c3a9cf2..8a28f9f6 100644
--- a/ethosu/vela/high_level_command_stream.py
+++ b/ethosu/vela/high_level_command_stream.py
@@ -19,6 +19,7 @@ from enum import IntEnum
import numpy as np
+from .architecture_features import Block
from .numeric_util import round_up_divide
from .operation import NpuBlockType
@@ -134,6 +135,9 @@ class Box:
def get_size(self):
return int(np.prod(self.get_size_shape()))
+ def get_block(self) -> Block:
+ return Block.from_shape(self.get_size_shape())
+
def __str__(self):
return "<Box %s - %s>" % (self.start_coord, self.end_coord)