Skip to content

Commit f609b85

Browse files
Vincent Hammfacebook-github-bot
authored andcommitted
Switch VGF backend from custom vulkan-headers-1.4.343 to standardized khronos (pytorch#19031)
Summary: Migrate the VGF backend's Vulkan dependencies from the custom `third-party/vulkan-headers-1.4.343` package to the standardized `third-party/khronos` and `third-party/volk` packages. The custom package had a regenerated volk with ARM tensor extensions, but the standard volk and khronos 1.4.341 headers already include these extensions (`VK_ARM_tensors`). Changes: - `targets.bzl`: Replace custom `vulkan-headers-1.4.343` deps with `third-party/volk:volk_src`, `third-party/volk:volk-header`, and `third-party/khronos:vulkan-headers` - `VGFBackend.cpp`, `VGFSetup.h`: Include `<volk.h>` directly instead of going through the `vk_api.h` shim (which just forwarded to volk.h when USE_VULKAN_VOLK is defined) - `third-party/volk/BUCK`: Add `volk_src` export_file target for direct compilation into consumer targets Differential Revision: D100706182
1 parent 1d37abd commit f609b85

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

backends/arm/runtime/VGFBackend.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ using executorch::runtime::MemoryAllocator;
2727
using executorch::runtime::Result;
2828
using executorch::runtime::Span;
2929

30-
// We use the platform and runtime environment provided by the Vulkan delegate
31-
#include <executorch/backends/vulkan/runtime/vk_api/vk_api.h>
30+
// Volk meta-loader provides Vulkan function pointers (ARM tensor extensions, etc.)
31+
#include <volk.h>
3232

3333
// Dependencies for processing VGF files into Vulkan calls
3434
#include <vgf/decoder.hpp>

backends/arm/runtime/VGFSetup.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ using namespace std;
1515
using executorch::runtime::ArrayRef;
1616
using executorch::runtime::CompileSpec;
1717

18-
// We use the platform and runtime environment provided by the Vulkan delegate
19-
#include <executorch/backends/vulkan/runtime/vk_api/vk_api.h>
18+
// Volk meta-loader provides Vulkan function pointers (ARM tensor extensions, etc.)
19+
#include <volk.h>
2020

2121
namespace executorch {
2222
namespace backends {

backends/arm/runtime/targets.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def define_common_targets():
4141
# function-pointer variables live in the same linkage unit.
4242
# Linking from a separate static library causes the linker to
4343
# drop the symbols when building a shared library.
44-
"fbsource//third-party/vulkan-headers-1.4.343/v1.4.343/src:volk_arm_src",
44+
"fbsource//third-party/volk:volk_src",
4545
],
4646
exported_headers = ["VGFSetup.h"],
4747
# @lint-ignore BUCKLINT: Avoid `link_whole=True` (https://fburl.com/avoid-link-whole)
@@ -60,7 +60,7 @@ def define_common_targets():
6060
"//executorch/runtime/backend:interface",
6161
"//executorch/runtime/core:core",
6262
"fbsource//third-party/arm-vgf-library/v0.9.0/src:vgf",
63-
"fbsource//third-party/vulkan-headers-1.4.343/v1.4.343/src:volk_arm",
64-
"fbsource//third-party/vulkan-headers-1.4.343/v1.4.343/src:vulkan-headers",
63+
"fbsource//third-party/volk:volk-header",
64+
"fbsource//third-party/khronos:vulkan-headers",
6565
],
6666
)

0 commit comments

Comments
 (0)