Repository navigation
Arm backend: Phase 3 - Vulkan backend uses shared vulkan context. - #23151
Conversation
Signed-off-by: Elena Zhelezina <elena.zhelezina@arm.com> Change-Id: I6bf8e362c4a19c46e4cf2e01335d118d54b85635
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23151
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit 9983026 with merge base ad3b6d2 ( 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. |
|
Hi @SS-JIA and @digantdesai is it you or someone else who what to know about this? |
SS-JIA
left a comment
There was a problem hiding this comment.
AI review (Codex), static analysis. Findings rechecked against the current PR head.
Change-Id: I0092c8e5eabbe8e24aa7dd8a109602634ff5d26e
Change-Id: Ie723be86551ad70d36c0cd8b436ab593f61f966e
|
@SS-JIA Could you please take a look ? I addressed the comments |
Change-Id: Ibb53efbe3da9849ad58c77f8342cb7ffd7148bf9
Change-Id: I546b2199f8b64b70f84463e133984623c78e35c2
|
@SS-JIA Thank you for the review. Comments are addressed. |
SS-JIA
left a comment
There was a problem hiding this comment.
LGTM, but there are a couple of build failures. Once those are resolved, it should be good to merge. Stamping for now to indicate that changes LGTM.
Change-Id: I6b219abb4abe86189397ab4b77e58d6181061534
Change-Id: I8b514d6ca9419798af6a40250dafa33162da5660
|
@SS-JIA Please take a look again. I resolve an issue with this file. |
|
@SS-JIA has imported this pull request. If you are a Meta employee, you can view this in D129152314. |
|
Hi @wwwind — the internal import of this PR (D129152314) fails to build. All 8 failing signals trace to one stale path; no test code ran, so other compile errors may still surface after this fix. Fix: in headers = ["runtime/SharedDevice.h"],There is no headers = ["runtime/ResolveSharedDevice.h"],Evidence from D129152314: This blocks Please update that one line and re-run CI. Happy to re-check the import once updated. |
Change-Id: Ie1822d9558b1cbe77f30f7b351fc331567140b24
Summary: #23151 broke several Buck builds: `vulkan_shared_device_test` compares Vulkan queue handles with `VK_NULL_HANDLE`, which some Vulkan headers define as `0`, so gtest compares a pointer with an int and the test does not compile. Compare with `nullptr`. The `_no_volk` variants of that test link `libvulkan`, which the Linux, Android and Apple test hosts do not have. Keep only the volk variant. `vulkan_compute_api` exported `vulkan_shared:runtime`, which pulls in the ExecuTorch runtime. A Windows binary that links the compute API with `link_style = "shared"` then builds `portable_type` as a DLL, which fails to link. The compute API only needs `SharedVulkanDevice`, so move it into its own `vulkan_shared:device` target with no runtime deps and export that instead. On Windows, callers declared the shared API `dllimport`, so a binary that links the static build of the library cannot resolve it. Drop `dllimport` for callers; a plain declaration links against both the import library and the static library. Authored with Metamate (agentcloud). Reviewed By: shoumikhin Differential Revision: D130716215
Implement Phase 3 of the shared Vulkan runtime RFC by integrating
SharedVulkanContextinto the ExecuTorch Vulkan backend.RFC: #19298
The Vulkan delegate can now resolve, create, or reuse a shared Vulkan context during initialization and construct an
Adapteraround the sharedVkInstance,VkDevice, and queue.Key changes:
Adapterto support borrowed shared devices and queues.with_locked_queue()for cross-delegate synchronization.VkInstanceand avoid device-levelvolkLoadDevice()dispatch so multiple sharedVkDevices can coexist safely.This implements the Vulkan-side work described in the RFC and prepares the shared runtime for Phase 4 VGF integration.
Implementation has been assisted with Codex.
cc @SS-JIA @manuelcandales @digantdesai @cbilgin @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani