Skip to content

Pass every Vela option of the mlops: node to Vela - #23

Merged
MatthiasHertelArm merged 1 commit into
mainfrom
forward-vela-options
Sep 30, 2026
Merged

MatthiasHertelArm merged 1 commit into
mainfrom
forward-vela-options

Conversation

@MatthiasHertelArm

Copy link
Copy Markdown
Contributor

Problem

create_ai_layer.py reads --accelerator-config, --system-config and --memory-mode from vela.options of the *.cbuild-mlops.yml and ignores everything else. vela: misc: in the csolution's mlops: node therefore has no effect, and nothing reports it:

mlops:
  vela:
    system: Ethos_U85_SYS_DRAM_Mid
    memory: Shared_Sram
    misc: --optimise Size        # silently dropped

Change

  • vela_options() tokenizes the option string. The three options that are arguments of EthosUCompileSpec go there; every other option is passed to Vela as an extra flag.
  • An option given twice ends the script with a message. So do --config, --output-format and --output-dir, which the export sets itself (the configuration file is vela: ini:).
  • The effective flags appear in the [ai_layer] Vela: line.

Checked

  • Without misc: the exported program is byte for byte the one committed in ai_layer/, so this PR changes no generated file.
  • With misc: --optimise Size --verbose-performance the flags reach Vela and the program changes (9776 instead of 8832 bytes).

create_ai_layer.py picked --accelerator-config, --system-config and
--memory-mode out of vela.options of the cbuild-mlops.yml with a regular
expression and dropped the rest, so `vela: misc:` in the csolution had no
effect and nothing said so. The options are now tokenized; the three that
are arguments of EthosUCompileSpec go there and every other one reaches
Vela as an extra flag. An option given twice, and --config,
--output-format and --output-dir, which the export sets itself, end the
script with a message.

Without misc: the exported program is byte for byte the one in ai_layer/.
@MatthiasHertelArm
MatthiasHertelArm merged commit 568ac82 into main Sep 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants