From 1c8f92d0bf0bfe032ada2a0d8cb234c486b96548 Mon Sep 17 00:00:00 2001 From: Tim Hall Date: Thu, 25 Jan 2024 10:17:26 +0000 Subject: vela: Remove unnecessary code from architecture allocator - Small improvement that reduces compilation time Change-Id: I9e5cd58674f719f5dedeb30ea42787dc996a22d6 Signed-off-by: Tim Hall --- ethosu/vela/architecture_features.py | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/ethosu/vela/architecture_features.py b/ethosu/vela/architecture_features.py index 59c9841..5c485bb 100644 --- a/ethosu/vela/architecture_features.py +++ b/ethosu/vela/architecture_features.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2020-2023 Arm Limited and/or its affiliates +# SPDX-FileCopyrightText: Copyright 2020-2024 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 # @@ -400,12 +400,6 @@ class ArchitectureFeatures: # SHRAM base address of the activation lookup table self.shram_lut_address = self.shram_bank_size * self.available_shram_banks(True) - # Build a map of acceptable IFM/OFM block configurations up to the maximum - # IFM/OFM block size. - ifm_block_max = self.get_ifm_block_size(32, self.ofm_block_max, Kernel(8, 8)) - self.block_config_map = dict() - self.generate_block_config_map(Block(ifm_block_max.width * 2, ifm_block_max.height, 128)) - # Setup supported operators and restriction checkers class self.tflite_supported_operators = TFLiteSupportedOperators() self.tosa_supported_operators = TosaSupportedOperators() @@ -436,26 +430,6 @@ class ArchitectureFeatures: required_banks = round_up(size_banks, self.shram_bank_granules) return SHRAMBlockConfig(size_bytes, required_banks) - @staticmethod - def make_block_config_key(width, height, depth): - return (int(height), int(width), int(depth)) - - def get_block_config(self, width, height, depth): - assert depth <= self.ofm_block_max.depth - key = ArchitectureFeatures.make_block_config_key(width, height, depth) - config = self.block_config_map.get(key, None) - return config - - # Generate a key:value map of possible block configurations, where the - # key is compounded from the block dimensions: 0x00HHWWCC - def generate_block_config_map(self, block: Block): - for h in range(1, block.height + 1): - for w in range(1, block.width + 1): - # All possible IFM/OFM depth values - for c in [4, 8, 12, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128]: - key = ArchitectureFeatures.make_block_config_key(w, h, c) - self.block_config_map[key] = self.generate_block_config(w, h, c) - def _generate_output_perf_tables(self, accel_config): if accel_config == Accelerator.Ethos_U55_32: self.output_cycles_per_elem = (2.0, 3.0, 3.0, 3.0, 4.0, 6.0, 1.0, 2.0) -- cgit v1.2.1