Skip to content

[ET-VK] Add Vulkan 1.0 compatibility for extension feature querying#17193

Merged
SS-JIA merged 3 commits intomainfrom
gh/SS-JIA/404/orig
Feb 4, 2026
Merged

[ET-VK] Add Vulkan 1.0 compatibility for extension feature querying#17193
SS-JIA merged 3 commits intomainfrom
gh/SS-JIA/404/orig

Conversation

@pytorchbot
Copy link
Collaborator

@pytorchbot pytorchbot commented Feb 4, 2026

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #17160 by @SS-JIA
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/404/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/404/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/403/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/404/orig
Differential Revision: D92171361
@diff-train-skip-merge

cc @SS-JIA @manuelcandales @digantdesai @cbilgin

ssjia added 3 commits February 3, 2026 09:36
…ception-safe

Refactored Context::flush() by extracting two new public functions:
- wait_for_queue(): blocks until the GPU queue is idle
- clear_resources(): clears command/descriptor pools and cleanup lists

This allows callers to use these operations independently. ComputeGraph's
destructor now uses these functions directly and wraps them in try/catch
blocks to ensure it never throws exceptions, following C++ best practices
for destructors.

Authored with Claude.

Differential Revision: [D92171362](https://our.internmc.facebook.com/intern/diff/D92171362/)

ghstack-source-id: 337901647
Pull Request resolved: #17158
The original code created pipelines for all descriptors but used a separate
index counter during cache insertion that only incremented for non-cached
entries. This caused incorrect pipeline handles to be associated with keys
when some descriptors were already cached, and leaked handles for duplicates.

Fix by filtering out already-cached descriptors upfront, ensuring 1:1
correspondence between the created pipelines array and cache insertions.

Authored with Claude.

Differential Revision: [D92171360](https://our.internmc.facebook.com/intern/diff/D92171360/)

ghstack-source-id: 337901649
Pull Request resolved: #17159
Pull Request resolved: #17160

The previous implementation used `vkGetPhysicalDeviceFeatures2` unconditionally,
which is only available in Vulkan 1.1+. Devices running Vulkan 1.0 would fail
to query extension features correctly.

This change refactors PhysicalDevice to detect the API version at runtime and
use the appropriate method:
- Vulkan 1.0: Uses KHR extension functions (vkGetPhysicalDeviceFeatures2KHR)
  obtained via vkGetInstanceProcAddr, with graceful fallback if unavailable
- Vulkan 1.1+: Uses core vkGetPhysicalDeviceFeatures2 directly

Also fixes a bug where shader_int_dot_product_properties was incorrectly
chained into the features linked list instead of being queried separately
via vkGetPhysicalDeviceProperties2.

This PR was authored with Claude.

ghstack-source-id: 337979631
@exported-using-ghexport

Differential Revision: [D92171361](https://our.internmc.facebook.com/intern/diff/D92171361/)
@pytorchbot pytorchbot requested a review from SS-JIA as a code owner February 4, 2026 01:03
@pytorch-bot pytorch-bot bot added the module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/ label Feb 4, 2026
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 4, 2026

🔗 Helpful Links

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

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

❌ 4 New Failures

As of commit 65bc680 with merge base 593775b (image):

NEW FAILURES - The following jobs have failed:

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 Feb 4, 2026
Base automatically changed from gh/SS-JIA/403/orig to main February 4, 2026 14:48
@SS-JIA SS-JIA merged commit 477867a into main Feb 4, 2026
178 of 189 checks passed
@SS-JIA SS-JIA deleted the gh/SS-JIA/404/orig branch February 4, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants