diff options
-rw-r--r-- | OPTIONS.md | 13 | ||||
-rw-r--r-- | ethosu/vela/architecture_features.py | 5 | ||||
-rw-r--r-- | ethosu/vela/test/test_lut.py | 16 | ||||
-rw-r--r-- | ethosu/vela/test/testutil.py | 2 | ||||
-rw-r--r-- | ethosu/vela/vela.py | 11 |
5 files changed, 16 insertions, 31 deletions
@@ -132,19 +132,6 @@ File (see section below). vela network.tflite --system-config MySysConfig ``` -### Permanent Storage - -Specify memory area to be used for permanent storage. This area is where -weights, bias and other constant data will be stored. OnChipFlash means reading -directly from this storage, i.e. not using the DMA. To solely run from SRAM, -OnChipFlash should be selected. -**Type: String** -**Default: OffChipFlash** - -```bash -vela network.tflite --permanent-storage OnChipFlash -``` - ### Tensor Allocator Specify which allocator algorithm to use for non-constant NPU and CPU tensor diff --git a/ethosu/vela/architecture_features.py b/ethosu/vela/architecture_features.py index fd0e5c06..7391d714 100644 --- a/ethosu/vela/architecture_features.py +++ b/ethosu/vela/architecture_features.py @@ -178,7 +178,6 @@ Note the difference between ArchitectureFeatures and CompilerOptions vela_config: ConfigParser, accelerator_config, system_config, - permanent_storage, override_block_config, block_config_limit, global_memory_clock_scale, @@ -259,10 +258,6 @@ Note the difference between ArchitectureFeatures and CompilerOptions self.default_weight_format = TensorFormat.WeightsCompressed self.default_feature_map_format = TensorFormat.NHWC - # This is to ignore permanent_storage = On/OffChipflash for Yoda - if not self.is_yoda_system and permanent_storage != MemArea.OffChipFlash: - self.permanent_storage_mem_area = permanent_storage - self.tensor_storage_mem_area = { # permanent mem_area TensorPurpose.Unknown: MemArea.Unknown, diff --git a/ethosu/vela/test/test_lut.py b/ethosu/vela/test/test_lut.py index 3b7f57be..3dda1793 100644 --- a/ethosu/vela/test/test_lut.py +++ b/ethosu/vela/test/test_lut.py @@ -79,6 +79,14 @@ def process(arch, op_list): return sg +def filter_lut_cmds(cmd_list): + lut_cmd_list = [] + for cmd in cmd_list: + if "lut" in cmd.in_tensor.name: + lut_cmd_list.append(cmd) + return lut_cmd_list + + def test_optimize_high_level_cmd_stream_2K(): # Tests lut.optimize_high_level_cmd_stream, blending 256 byte and 2K luts arch = testutil.create_arch() @@ -116,6 +124,10 @@ def test_optimize_high_level_cmd_stream_2K(): cmd_list = sg.high_level_command_stream # Check that only the needed DMA commands are left expected_dma_ops = [op0, op1, op2, op5_2K, op6_2K, op7] + + cmd_list = filter_lut_cmds(cmd_list) + orig_cmd_list = filter_lut_cmds(orig_cmd_list) + for (cmd, op) in zip(cmd_list, expected_dma_ops): assert cmd.in_tensor == op.activation_lut # Check that lut0, lut1 and lut2 in op0, op1, op2 are stored on different addresses @@ -165,6 +177,10 @@ def test_optimize_high_level_cmd_stream_1K(): sg.high_level_command_stream = orig_cmd_list lut.optimize_high_level_cmd_stream(sg, arch) cmd_list = sg.high_level_command_stream + + cmd_list = filter_lut_cmds(cmd_list) + orig_cmd_list = filter_lut_cmds(orig_cmd_list) + # Check that only the needed DMA commands are left expected_dma_ops = [op0, op1, op2_1K, op5_2K, op7] for (cmd, op) in zip(cmd_list, expected_dma_ops): diff --git a/ethosu/vela/test/testutil.py b/ethosu/vela/test/testutil.py index fb6ca591..d4ae97b4 100644 --- a/ethosu/vela/test/testutil.py +++ b/ethosu/vela/test/testutil.py @@ -23,7 +23,6 @@ from ethosu.vela.nn_graph import Subgraph from ethosu.vela.operation import NpuBlockType from ethosu.vela.operation import Operation from ethosu.vela.tensor import create_const_tensor -from ethosu.vela.tensor import MemArea from ethosu.vela.tensor import Tensor @@ -32,7 +31,6 @@ def create_arch(): vela_config=None, system_config=None, accelerator_config=architecture_features.Accelerator.Ethos_U55_128.value, - permanent_storage=MemArea.OnChipFlash, override_block_config=None, block_config_limit=None, global_memory_clock_scale=1.0, diff --git a/ethosu/vela/vela.py b/ethosu/vela/vela.py index 923d8ec8..b9e224cb 100644 --- a/ethosu/vela/vela.py +++ b/ethosu/vela/vela.py @@ -181,16 +181,6 @@ def main(args=None): help="System configuration to use (default: %(default)s)", ) parser.add_argument( - "--permanent-storage", - default=MemArea.OffChipFlash, - type=lambda s: MemArea[s], - choices=list(MemArea)[3:5], - help=( - "Memory area for permanent storage, only valid for Ethos-U55. " - "To store the weights and other constant data in SRAM, select 'OnChipFlash'. (default: %(default)s)" - ), - ) - parser.add_argument( "--tensor-allocator", default=TensorAllocator.Greedy, type=lambda s: TensorAllocator[s], @@ -296,7 +286,6 @@ def main(args=None): vela_config=config, system_config=args.system_config, accelerator_config=args.accelerator_config, - permanent_storage=args.permanent_storage, override_block_config=force_block_config, block_config_limit=args.block_config_limit, global_memory_clock_scale=args.global_memory_clock_scale, |