aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Hall <tim.hall@arm.com>2020-06-18 11:42:21 +0100
committerTim Hall <tim.hall@arm.com>2020-06-18 17:53:52 +0100
commit2a7ebe3045d766c7abdb3bca49e90f3f9afb8664 (patch)
treed10a8ec0bf58fb831e77b7d30f23a06f5b57a683
parentc8310b1432f7a77df3c95e8ecf8248c8a953b411 (diff)
downloadethos-u-vela-2a7ebe3045d766c7abdb3bca49e90f3f9afb8664.tar.gz
vela: Fix block config override issue.
- A blanket exception was preventing block config overrides from being used, from either code or command line. Change-Id: I1a7aa7771e077bcdb66886a6b637d099ae43d732 Signed-off-by: Tim Hall <tim.hall@arm.com>
-rw-r--r--ethosu/vela/shared_buffer_allocation.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/ethosu/vela/shared_buffer_allocation.py b/ethosu/vela/shared_buffer_allocation.py
index 040f2a3b..07637f36 100644
--- a/ethosu/vela/shared_buffer_allocation.py
+++ b/ethosu/vela/shared_buffer_allocation.py
@@ -22,7 +22,7 @@ from .architecture_features import Block
from .architecture_features import Kernel
from .architecture_features import SharedBufferArea
from .architecture_features import SHRAMElements
-from .errors import OptionError
+from .errors import VelaError
from .operation import NpuBlockType
@@ -167,11 +167,9 @@ def find_block_configs_suitable_for_pass_and_shared_buffer(arch, ps):
if arch.override_block_config:
config = alloc.try_block(arch.override_block_config)
- raise OptionError(
- "--force-block-config",
- str(arch.override_block_config),
- "This forced block config value cannot be used; it is not compatible",
- )
+ if config is None:
+ raise VelaError("Block config override '{0}' cannot be allocated".format(arch.override_block_config) )
+ return [config]
# Constrain the search space if the OFM is smaller than the max block size
# - Add other block search constraints here if required