aboutsummaryrefslogtreecommitdiff
path: root/ethosu
diff options
context:
space:
mode:
authorTim Hall <tim.hall@arm.com>2020-09-08 17:00:33 +0100
committertim.hall <tim.hall@arm.com>2020-09-09 16:04:10 +0000
commit2b7a1628ab26b453a0932ce845f41fef8e5ade34 (patch)
tree9a9cc630a5a948a8a72dc6a082bd0d596616ea71 /ethosu
parent11b0bdbf029edc1e166f55a6da1bbaf40da068c4 (diff)
downloadethos-u-vela-2b7a1628ab26b453a0932ce845f41fef8e5ade34.tar.gz
vela: SHRAM alloc too big for some elementwise ops
- Fixed SHRAM allocation for 8 and 16-bit elementwise ops Signed-off-by: Tim Hall <tim.hall@arm.com> Change-Id: I909a86d76e4ee6eab612aae827038b82703f28dc
Diffstat (limited to 'ethosu')
-rw-r--r--ethosu/vela/shared_buffer_allocation.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ethosu/vela/shared_buffer_allocation.py b/ethosu/vela/shared_buffer_allocation.py
index 0f5c1c81..55cc34cc 100644
--- a/ethosu/vela/shared_buffer_allocation.py
+++ b/ethosu/vela/shared_buffer_allocation.py
@@ -90,7 +90,8 @@ class SharedBufferAllocation:
assert (self.use_ifm_element == SHRAMElements.IFM16) or (
self.use_ifm_element == SHRAMElements.IFM16_Elementwise
)
- elif is_elementwise or ps.npu_block_type == NpuBlockType.ReduceSum and self.ifm_bits == 32:
+ elif self.ifm_bits == 32:
+ assert is_elementwise or ps.npu_block_type == NpuBlockType.ReduceSum, "Unsupported 32-bit IFM operation"
self.use_ifm_element = SHRAMElements.IFM32
else:
assert self.ifm_bits == 8, "Unexpected IFM bitdepth"