Commit 88b5dd8
Repair etvk.vma_dep=instantiated to share VMA via 3.2.0 (#20225)
Summary:
Fixes the ExecuTorch Vulkan backend's `etvk.vma_dep=instantiated` mode
so the backend links a single, shared VulkanMemoryAllocator (VMA)
instead of instantiating its own. This is the prerequisite that lets a
binary link both ET Vulkan and another VMA consumer (e.g. IGL/compphoto)
without an `ld.lld: duplicate symbol: Vma*` collision.
Changes (both `fbcode` and `xplat` mirrors):
1. `backends/vulkan/targets.bzl`: repair the `etvk.vma_dep=instantiated`
path, which pointed at
`//third-party/VulkanMemoryAllocator/3.0.1:VulkanMemoryAllocatorInstantiated`
— a package that no longer exists at HEAD (only `3.2.0` remains), so the
mode was broken for everyone. Repoint it to
`3.2.0:VulkanMemoryAllocatorInstantiated`, the same target IGL/compphoto
already use, so VMA is linked exactly once.
2. `backends/vulkan/runtime/vk_api/memory/vma_api.h`: align the
`ETVK_USE_META_VMA` branch `VMA_VULKAN_VERSION` from `1002000` to
`1003000` to match the 3.2.0 instantiated lib's config
(`vk_mem_alloc_instantiated.h`) so struct layouts agree across
translation units and the pre-instantiated static lib (ABI safety).
Both changes only affect the opt-in `etvk.vma_dep=instantiated` mode
(which was already broken/unused), so default `xplat` builds and all
other ET consumers are byte-for-byte unchanged.
Differential Revision: D108337179
Co-authored-by: Xue Chen <xuechen@meta.com>1 parent 2302c25 commit 88b5dd8
2 files changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
0 commit comments