aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/high_level_command_to_npu_op.py
diff options
context:
space:
mode:
authorJames Peet <james.peet@arm.com>2021-07-19 16:47:58 +0100
committerJames Peet <james.peet@arm.com>2021-07-26 12:05:57 +0100
commit7519d50c993d60faa1ea09e56abfbf17cef23b49 (patch)
tree18bc526a1d1146dc3061f95418b1345bbdc481e8 /ethosu/vela/high_level_command_to_npu_op.py
parentdaed1529848465aab221a30008f455f9fa03c8d4 (diff)
downloadethos-u-vela-7519d50c993d60faa1ea09e56abfbf17cef23b49.tar.gz
MLBEDSW-4892: Fix crash affecting biases without quantization.
Remove quant_values attribute from Tensor class. It only needs a single values attribute, holding either quantized or unquantized values as appropriate. Change-Id: Ie96f80ac58061b6077e0f7048dc60209fdfbcafa Signed-off-by: James Peet <james.peet@arm.com>
Diffstat (limited to 'ethosu/vela/high_level_command_to_npu_op.py')
-rw-r--r--ethosu/vela/high_level_command_to_npu_op.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/ethosu/vela/high_level_command_to_npu_op.py b/ethosu/vela/high_level_command_to_npu_op.py
index 80d0e476..9b76ec1f 100644
--- a/ethosu/vela/high_level_command_to_npu_op.py
+++ b/ethosu/vela/high_level_command_to_npu_op.py
@@ -437,8 +437,7 @@ def create_npu_elementwise_op(cmd: NpuStripe, arch: ArchitectureFeatures) -> Npu
npu_op.ifm2.quantization = get_ifm_or_ifm2_quantization(ps, cmd.ifm2_tensor)
if cmd.ifm2_tensor.shape == []:
# scalar
- assert cmd.ifm2_tensor.quant_values.size == 1
- npu_op.ifm2_scalar = cmd.ifm2_tensor.values.item(0)
+ npu_op.ifm2_scalar = cmd.ifm2_tensor.get_scalar()
npu_op.ifm2.shape = NpuShape3D(height=0, width=0, depth=0)
else:
ifm2_blk = cmd.ifm2_box.get_block()