aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Verhaard <louis.verhaard@arm.com>2020-06-10 09:04:33 +0200
committerTim Hall <tim.hall@arm.com>2020-06-18 17:53:52 +0100
commitc88a96f7a18298767210c394517cfcc1ca9ece5c (patch)
tree639029def813a9b76826e4baba44b7dddfc33a2f
parente0ef27310b27b2189d7735eb026bf11a81a9c465 (diff)
downloadethos-u-vela-c88a96f7a18298767210c394517cfcc1ca9ece5c.tar.gz
MLBEDSW-2455: Bug fix int16 elementwise with scalar
Bug fix in the generation of the NPU_SET_IFM2_SCALAR parameter. Signed-off-by: Louis Verhaard <louis.verhaard@arm.com> Change-Id: Ie261a90dcfa61ed269d27a100eb48c58af8a325d
-rw-r--r--ethosu/vela/register_command_stream_generator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py
index 11c0c20d..38ab6c15 100644
--- a/ethosu/vela/register_command_stream_generator.py
+++ b/ethosu/vela/register_command_stream_generator.py
@@ -817,9 +817,9 @@ def generate_register_command_stream(nng, sg, arch, verbose=False):
if tens.shape == []:
# Empty shape, elementwise constant
- ifm2_scalar = tens.quant_values.astype(np.uint8)
+ ifm2_scalar = tens.quant_values
assert ifm2_scalar.size == 1
- emit.cmd0_with_param(cmd0.NPU_SET_IFM2_SCALAR, ifm2_scalar.item(0))
+ emit.cmd0_with_param(cmd0.NPU_SET_IFM2_SCALAR, int(ifm2_scalar.item(0)))
continue
height_0, height_1, width_0, addresses = tens.addresses_for_rolling_buffer(