diff options
author | Diqing Zhong <diqing.zhong@arm.com> | 2020-12-16 16:46:06 +0100 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2020-12-22 14:44:09 +0000 |
commit | 016b827ad722aecd4338d1d6c7b1b004760490b7 (patch) | |
tree | 7a26bfdf670e8885693bc7db531ea647e24d571b /ethosu/vela/shared_buffer_allocation.py | |
parent | 3d73717f793100ba6705441fb42514f938780c1e (diff) | |
download | ethos-u-vela-016b827ad722aecd4338d1d6c7b1b004760490b7.tar.gz |
MLBEDSW-1493: Optimise strided conv
- Reshape/rearrange IFM and weight tensor for better HW utilization
- Update estimator to cover this case
Change-Id: I4be70a69fa600a1951bf1c247f9973e6cc9b03f4
Signed-off-by: Diqing Zhong <diqing.zhong@arm.com>
Diffstat (limited to 'ethosu/vela/shared_buffer_allocation.py')
-rw-r--r-- | ethosu/vela/shared_buffer_allocation.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ethosu/vela/shared_buffer_allocation.py b/ethosu/vela/shared_buffer_allocation.py index d8faf369..20438648 100644 --- a/ethosu/vela/shared_buffer_allocation.py +++ b/ethosu/vela/shared_buffer_allocation.py @@ -172,7 +172,11 @@ def _all_fms_have_quant(ifm_tensor, ofm_tensor, ifm2_tensor=None) -> bool: def is_acc_40bits_used(npu_block_type, ifm_tensor, ofm_tensor, ifm2_tensor=None): - return npu_block_type != NpuBlockType.Pooling and _all_fms_have_quant(ifm_tensor, ofm_tensor, ifm2_tensor) + return ( + ifm_tensor.dtype.size_in_bits() == 16 + and npu_block_type != NpuBlockType.Pooling + and _all_fms_have_quant(ifm_tensor, ofm_tensor, ifm2_tensor) + ) def shared_buffer_allocation_for_pass(arch, ps) -> SharedBufferAllocation: |