From 2f75457df27da610afdf01b1c86535030b022a45 Mon Sep 17 00:00:00 2001 From: Dwight Lidman Date: Wed, 21 Apr 2021 12:00:37 +0200 Subject: MLBEDSW-4413: MobileNet V3 regression This commit resolves a recent regression in multiple networks (including MobileNet V3). The regression was caused by a recent change to IFM block size calculation where a term mistakenly left out (due to it missing from the spec). The IFM microblock size has been amended for the Ethos U-55 128 config and the block size calculations now use these sizes instead (although equivalent with OFM microblock sizes). Signed-off-by: Dwight Lidman Change-Id: Ic504b4becd6c3a26334a7275189d78ff0fe2cf69 --- ethosu/vela/architecture_features.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ethosu/vela') diff --git a/ethosu/vela/architecture_features.py b/ethosu/vela/architecture_features.py index 43e82655..05219859 100644 --- a/ethosu/vela/architecture_features.py +++ b/ethosu/vela/architecture_features.py @@ -180,7 +180,7 @@ class ArchitectureFeatures: 256, 1, Block(2, 2, 8), Block(2, 2, 8), 48, [8, 8, 8, 8, 16, 8, 16, 20], 8 ), Accelerator.Ethos_U55_128: ArchitectureConfig( - 128, 1, Block(2, 1, 8), Block(2, 2, 8), 24, [4, 4, 4, 4, 8, 4, 8, 12], 4 + 128, 1, Block(2, 1, 8), Block(2, 1, 8), 24, [4, 4, 4, 4, 8, 4, 8, 12], 4 ), Accelerator.Ethos_U55_64: ArchitectureConfig( 64, 1, Block(1, 1, 8), Block(1, 1, 8), 16, [2, 2, 2, 2, 4, 4, 4, 8], 2 @@ -434,12 +434,16 @@ class ArchitectureFeatures: ((ofm_block.height - 1) * kernel.stride.y + min(subkernel.height, dilated_kernel_height)) / upscaling ) + ifm_block_height = round_up(ifm_block_height, self.ifm_ublock.height) + # Width dilated_kernel_width = ((kernel.width - 1) * kernel.dilation.x) + 1 ifm_block_width = round_up_to_int( ((ofm_block.width - 1) * kernel.stride.x + min(subkernel.width, dilated_kernel_width)) / upscaling ) + ifm_block_width = round_up(ifm_block_width, self.ifm_ublock.width) + return Block(ifm_block_width, ifm_block_height, ifm_block_depth) def is_spilling_enabled(self): -- cgit v1.2.1