aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael McGeagh <michael.mcgeagh@arm.com>2020-07-28 11:32:22 +0100
committertim.hall <tim.hall@arm.com>2020-08-04 11:20:20 +0000
commit8677e539b234276a4aa102469f0ce349f0b72a39 (patch)
treec04d9166eba9a63828cd3d823e7b50b5c76cc045
parentb4249745057a0f71f2710013e7f263e46a496f53 (diff)
downloadethos-u-vela-8677e539b234276a4aa102469f0ce349f0b72a39.tar.gz
vela: Fix numpy deprecation warning
A newer version of numpy gives a deprecation warning. This patch resolves the deprecation warning so the user should never see it clutter their output. Tested on numpy version 1.19.0 Change-Id: I0c468818de4a2e5e2fcb109c45f51b2f1801b7b5 Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com>
-rw-r--r--ethosu/vela/register_command_stream_generator.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py
index 28bc6b79..d32766b0 100644
--- a/ethosu/vela/register_command_stream_generator.py
+++ b/ethosu/vela/register_command_stream_generator.py
@@ -187,7 +187,7 @@ def calc_command_dependencies(cmd_stream, arch):
# Keep track of accumulated number of commands in command stream.
# First element kernel ops: (# of blocks, # of commands)
# Second element DMA ops: (# of commands)
- pos = np.array((np.array((0, 0)), np.array([0])))
+ pos = np.array((np.array((0, 0)), np.array([0])), dtype=object)
dependencies = {}
@@ -196,8 +196,8 @@ def calc_command_dependencies(cmd_stream, arch):
op_count = cmd.get_operation_count()
# Keep track of both num blocks and commands
cmd_add = 0 if (op_count[0] == 0) else 1
- pos = np.array((pos[0] + np.array((op_count[0], cmd_add)), pos[1] + np.array([op_count[1]])))
- cmd_ends[cmd] = np.array((pos[0], pos[1]))
+ pos = np.array((pos[0] + np.array((op_count[0], cmd_add)), pos[1] + np.array([op_count[1]])), dtype=object)
+ cmd_ends[cmd] = np.array((pos[0], pos[1]), dtype=object)
memory_accesses[cmd] = cmd.get_memory_accesses()
for idx, cmd in enumerate(cmd_stream):
@@ -205,7 +205,7 @@ def calc_command_dependencies(cmd_stream, arch):
# Keep track of command dependency.
# First element kernel ops: (# of blocks, # of commands)
# Second element DMA ops: (# of commands)
- dep_offsets = np.array((np.array((-1, -1)), np.array([-1])))
+ dep_offsets = np.array((np.array((-1, -1)), np.array([-1])), dtype=object)
dep_cmds = [None] * CommandType.Size.value
if idx > 0:
# Look at the previous commands in backwards order