Skip to content

Arm backend: Add VGF check environment#19911

Merged
wwwind merged 8 commits into
pytorch:mainfrom
wwwind:vgf_env
Jun 4, 2026
Merged

Arm backend: Add VGF check environment#19911
wwwind merged 8 commits into
pytorch:mainfrom
wwwind:vgf_env

Conversation

@wwwind

@wwwind wwwind commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

The VGF backend provides a preflight helper that can be run before export or runtime execution:

python -m executorch.backends.arm.vgf.check_env --aot
python -m executorch.backends.arm.vgf.check_env --runtime
python -m executorch.backends.arm.vgf.check_env --host-emulator
python -m executorch.backends.arm.vgf.check_env --source-build --build-dir cmake-out

Use --aot before export. It checks that the TOSA serializer and ML SDK model converter are available and that the converter can be launched.

Use --runtime when debugging Python runtime availability. It checks whether the ExecuTorch runtime backend registry reports VgfBackend as available.

Use --host-emulator before host-based emulator runs. It checks runtime availability plus Vulkan SDK and ML emulation layer environment variables.

Use --source-build --build-dir <dir> when debugging a source build. It checks for VGF runtime build prerequisites such as libvgf and CMake options including EXECUTORCH_BUILD_VGF and EXECUTORCH_BUILD_VULKAN.

For CI logs or bug reports, add --json:

python -m executorch.backends.arm.vgf.check_env --aot --json

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani

Signed-off-by: Elena Zhelezina <elena.zhelezina@arm.com>
Change-Id: I02b655802bcc9b76423d76e7fa3d7e17086dafd7
@pytorch-bot

pytorch-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19911

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 1, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Jun 1, 2026
@wwwind wwwind added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: arm Changes to the ARM backend delegate labels Jun 1, 2026
@zingo zingo removed their assignment Jun 1, 2026
@wwwind

wwwind commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

@digantdesai Could you please review this PR ?

@zingo zingo added the help wanted Extra attention is needed label Jun 2, 2026
@zingo

zingo commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

@wwwind the added files might be needed to be added the buck2 files?

Comment on lines +127 to +129
_check_tosa_serializer(),
_check_model_converter(),
_check_model_converter_lib_dir(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is OK, but I would prefer these to be naturally in the the dependent python module, as opposed to a seperate script. The rationale is now someone has to make sure that this script and actual consumers are always in sync, i.e. you don't want to be in a situation where this scripts says check passes but the actual user fails because the new dep isn't part of the sync, for example.

@digantdesai digantdesai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stamping to unblock.

@wwwind

wwwind commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

Arm smaller_stories_llama fail is known and unrelated and beeing worked on

@wwwind wwwind merged commit 3f0e901 into pytorch:main Jun 4, 2026
468 of 474 checks passed
Gasoonjia pushed a commit that referenced this pull request Jun 8, 2026
The VGF backend provides a preflight helper that can be run before
export or runtime execution:

```bash
python -m executorch.backends.arm.vgf.check_env --aot
python -m executorch.backends.arm.vgf.check_env --runtime
python -m executorch.backends.arm.vgf.check_env --host-emulator
python -m executorch.backends.arm.vgf.check_env --source-build --build-dir cmake-out
```

Use `--aot` before export. It checks that the TOSA serializer and ML SDK
model converter are available and that the converter can be launched.

Use `--runtime` when debugging Python runtime availability. It checks
whether the ExecuTorch runtime backend registry reports VgfBackend as
available.

Use `--host-emulator` before host-based emulator runs. It checks runtime
availability plus Vulkan SDK and ML emulation layer environment
variables.

Use `--source-build --build-dir <dir>` when debugging a source build. It
checks for VGF runtime build prerequisites such as `libvgf` and CMake
options including `EXECUTORCH_BUILD_VGF` and `EXECUTORCH_BUILD_VULKAN`.

For CI logs or bug reports, add `--json`:

```bash
python -m executorch.backends.arm.vgf.check_env --aot --json
```


cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils
@Sebastian-Larsson @robell @rascani

---------

Signed-off-by: Elena Zhelezina <elena.zhelezina@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. help wanted Extra attention is needed module: arm Issues related to arm backend partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: arm Changes to the ARM backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants