diff options
author | Rickard Bolin <rickard.bolin@arm.com> | 2022-06-02 09:30:33 +0000 |
---|---|---|
committer | Rickard Bolin <rickard.bolin@arm.com> | 2022-06-08 11:22:58 +0000 |
commit | 7ce6b32b815b6eb01bf3b348a3df37bb783c3a94 (patch) | |
tree | 9692f071c09e146713856ca97de84685b68f1cbf | |
parent | 3ea7025fb9118ea4ddfabad2864a002009e5323a (diff) | |
download | ethos-u-vela-7ce6b32b815b6eb01bf3b348a3df37bb783c3a94.tar.gz |
MLBEDSW-4783: Make config handling more user friendly
Vela was not able to parse config file paths entered with forward
slashes. This patch will make it possible to use both forward and
backslashes when specifying paths.
Signed-off-by: Rickard Bolin <rickard.bolin@arm.com>
Change-Id: I0f4cfc16bde5738c73059af6216d2bdc3821c68b
-rw-r--r-- | ethosu/vela/architecture_features.py | 2 | ||||
-rw-r--r-- | ethosu/vela/vela.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ethosu/vela/architecture_features.py b/ethosu/vela/architecture_features.py index 679947fc..e0e44b29 100644 --- a/ethosu/vela/architecture_features.py +++ b/ethosu/vela/architecture_features.py @@ -741,6 +741,8 @@ class ArchitectureFeatures: # display the system configuration and memory mode if verbose_config: + print("Configuration files:") + print(f" {vela_config_files}") print(f"System Configuration ({self.system_config}):") print(f" core_clock = {self.core_clock}") print(f" axi0_port = {self.axi0_port.name}") diff --git a/ethosu/vela/vela.py b/ethosu/vela/vela.py index bbacc9c0..90cff034 100644 --- a/ethosu/vela/vela.py +++ b/ethosu/vela/vela.py @@ -51,7 +51,7 @@ from .tosa_model_semantic import TosaSemantic from .tosa_supported_operators import TosaSupportedOperators from ethosu.vela.architecture_features import ArchitectureFeatures -CONFIG_FILES_PATH = os.path.abspath(f"{__file__}/../../config_files") +CONFIG_FILES_PATH = os.path.normpath(os.path.join(__file__, "..", "..", "config_files")) def process(input_name, enable_debug_db, arch, model_reader_options, compiler_options, scheduler_options): @@ -464,6 +464,9 @@ def main(args=None): parser.error("the following argument is required: NETWORK") def _parse_config(config): + # Make sure the correct separator is used depending on OS + config = os.path.normpath(config) + if not config.endswith(".ini"): raise InputFileError(config, "Configuration files must use the .ini extension") |