aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/architecture_allocator.py
diff options
context:
space:
mode:
authorJames Ward <james.ward@arm.com>2021-10-20 11:04:46 +0100
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2021-11-12 13:34:40 +0000
commit399c4a2d77df791e5d988c51d7fb1824ac4f266f (patch)
tree89a935e167cc088655c7cc6729dc027e5dd56ae6 /ethosu/vela/architecture_allocator.py
parente6607c563f3ea480fdc25770fdd7434ec7ab776b (diff)
downloadethos-u-vela-399c4a2d77df791e5d988c51d7fb1824ac4f266f.tar.gz
MLBEDSW-5383 npu_find_block_configs() differs between v2.1.1 and v3.1.03.2.0.rc1
* 1D optimised block_config was incorrectly beign set to the ArchitectureBlockConfig in try_block_config() * Write external API test for the reduced block height case (on H256) Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I9ced7eb31b23730e4423aabbaf769bc72fac8fc9
Diffstat (limited to 'ethosu/vela/architecture_allocator.py')
-rw-r--r--ethosu/vela/architecture_allocator.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ethosu/vela/architecture_allocator.py b/ethosu/vela/architecture_allocator.py
index 30e1c872..65a684c5 100644
--- a/ethosu/vela/architecture_allocator.py
+++ b/ethosu/vela/architecture_allocator.py
@@ -47,7 +47,7 @@ class ArchitectureBlockConfig:
def __init__(self):
self.layout = SHRAMLayout()
self.ifm_block = Shape4D()
- self.ofm_block = Shape4D()
+ self.ofm_block = Shape4D() # non-1D-optimised block
self.acc_type = SHRAMElements.Acc32
self.is_partkernel = False
self.bank_size = 0
@@ -414,10 +414,10 @@ def try_block_config(
ifm_block = ifm_block.with_depth(ifm_blockdepth)
# 256/512 Conv1D optimisation (ratio of IFM:Accumulators changes)
- block_config = fit_block_for_ofm(arch, ofm_shape, kernel, block_config)
+ block_config_opt = fit_block_for_ofm(arch, ofm_shape, kernel, block_config)
layout = _try_block_config(
- arch.shram, ew_usage, block_config, ifm_block, ifm_bits, ifm_granule, acc_bits, acc_granule, lut_banks
+ arch.shram, ew_usage, block_config_opt, ifm_block, ifm_bits, ifm_granule, acc_bits, acc_granule, lut_banks
)
if layout is None:
return None