aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/register_command_stream_util.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/register_command_stream_util.py')
-rw-r--r--ethosu/vela/register_command_stream_util.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ethosu/vela/register_command_stream_util.py b/ethosu/vela/register_command_stream_util.py
index ee70b7b5..3751d88e 100644
--- a/ethosu/vela/register_command_stream_util.py
+++ b/ethosu/vela/register_command_stream_util.py
@@ -76,6 +76,10 @@ def shape3d_to_rect(shape: NpuShape3D) -> Rect:
return Rect(0, 0, 0, shape.width - 1, shape.height - 1, shape.depth - 1)
+def shape3d_to_block(shape: NpuShape3D) -> Block:
+ return Block(shape.width, shape.height, shape.depth)
+
+
# -------------------------------------------------------------------
# ADDRESSING/STRIDES (helper functions)
# -------------------------------------------------------------------