Skip to content

Arm backend: Enable Vulkan validation layer - #22841

Open
wwwind wants to merge 1 commit into
pytorch:mainfrom
wwwind:validation
Open

wwwind wants to merge 1 commit into
pytorch:mainfrom
wwwind:validation

Conversation

@wwwind

@wwwind wwwind commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Enable the Khronos Vulkan Validation Layer for the Arm VGF/VKML test paths.

The goal of this change is to detect invalid Vulkan API usage during VGF execution and make validation errors visible as CI failures, while keeping the production VGF runtime unchanged.

What this change does

  • Enables VK_LAYER_KHRONOS_validation for VGF/VKML tests.

  • Configures the validation layer through the Vulkan loader environment rather than modifying VkInstanceCreateInfo in the backend.

  • Ensures the validation layer is placed before the Arm ML emulation layers.

  • Makes the validation-layer manifest visible when the ML SDK overrides VK_LAYER_PATH.

  • Restricts validation output to errors so warnings do not fail otherwise valid tests.

  • Adds validation to both:

    • Python-based VKML execution through runner_utils.py.
    • Direct command paths such as examples/arm/run.sh and the VGF OOTB tests.
  • Adds a wrapper for direct commands that converts Vulkan validation errors into a non-zero exit status.

  • Preserves validation errors produced by earlier Vulkan subprocesses when a test launches multiple Vulkan processes.

  • Keeps validation opt-in for generic pytest/Buck runs so environments without the Vulkan SDK or validation layer can still run the normal Arm test suite.

  • Adds integration tests verifying that the validation layer is enabled and that validation failures are propagated correctly.

Validation can be controlled using:

EXECUTORCH_VGF_VULKAN_VALIDATION

The dedicated VGF/VKML test entry points enable it, while explicitly setting it to 0, false, off, or no disables validation for debugging.

Known validation errors

There are currently several validation errors produced by known issues in the VKML / Vulkan emulation-layer dependencies.

These VUIDs are temporarily filtered so that enabling Vulkan validation does not make the VGF CI permanently fail on already-known dependency bugs.

The filtered errors currently include issues related to:

  • BF16 shader capability advertisement.
  • Tensor-view usage validation.
  • Descriptor layouts generated for duplicated custom-shader inputs.

The corresponding VUID filters are intentionally narrow so that any new or unexpected Vulkan validation error still fails the test.

These filters are temporary and should be removed individually once the corresponding bugs are fixed in the emulation-layer dependencies.

Why

Without the validation layer, invalid Vulkan API usage can remain unnoticed when running against the emulation layers. This change makes Vulkan API correctness part of the VGF/VKML CI signal and should help catch regressions closer to where they are introduced.

cc @SS-JIA @manuelcandales @digantdesai @cbilgin @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani

Signed-off-by: Elena Zhelezina <elena.zhelezina@arm.com>
Change-Id: Ia693cf38b8a5ccf97fd6c4afed6e23611a0df556
@wwwind
wwwind requested a review from digantdesai as a code owner September 15, 2026 14:50
@pytorch-bot pytorch-bot Bot added the module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/ label Sep 15, 2026
@pytorch-bot

pytorch-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure, 4 Unrelated Failures

As of commit 64f511f with merge base 026ca3f (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Sep 15, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Sep 15, 2026
@wwwind wwwind added release notes: arm Changes to the ARM backend delegate partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm module: arm Issues related to arm backend ciflow/trunk and removed module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/ ciflow/trunk module: arm Issues related to arm backend labels Sep 15, 2026
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. 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