Repository navigation
Commit 460c688
authored
Arm backend: Enable Vulkan validation layer (pytorch#22841)
## 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:
```text
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>1 parent 8a33ec8 commit 460c688
8 files changed
Lines changed: 901 additions & 10 deletions
File tree
- .github/workflows
- backends/arm/test
- misc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
857 | 897 | | |
858 | 898 | | |
859 | 899 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
160 | 193 | | |
161 | 194 | | |
162 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
0 commit comments