Skip to content

Commit 34e1c6b

Browse files
committed
[ET-VK] Serialize constant data outside of flatbuffer
## Context This changeset is a mirror of #1542 and #1543 for the Vulkan delegate, which enables serialization of constant weight data outside the flatbuffer blob. I decided to package some miscellaneous codebase improvements with this changeset: * Update field names of `VkGraph` table in `schema.fbs` and update the namespace to be simply `vkgraph`: * In `VulkanBackend.cpp`, use aliases for generated flatbuffer types * Move build targets to a `targets.bzl` file with a `define_common_targets()` method Differential Revision: [D53957852](https://our.internmc.facebook.com/intern/diff/D53957852/) ghstack-source-id: 215800831 Pull Request resolved: #2016
1 parent d6b1dcb commit 34e1c6b

13 files changed

+789
-436
lines changed

backends/vulkan/TARGETS

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,9 @@
11
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2+
load(":targets.bzl", "define_common_targets")
23

34
oncall("executorch")
45

5-
runtime.cxx_library(
6-
name = "vulkan_backend_lib",
7-
srcs = [
8-
"VulkanBackend.cpp",
9-
],
10-
# VulkanBackend.cpp needs to compile with executor as whole
11-
# @lint-ignore BUCKLINT: Avoid `link_whole=True` (https://fburl.com/avoid-link-whole)
12-
link_whole = True,
13-
visibility = [
14-
"//executorch/backends/...",
15-
"//executorch/extension/pybindings/...",
16-
"//executorch/test/...",
17-
"@EXECUTORCH_CLIENTS",
18-
],
19-
deps = [
20-
"//caffe2:torch_vulkan_graph",
21-
"//executorch/backends/vulkan/serialization/schema:vk_delegate_schema",
22-
"//executorch/runtime/backend:interface",
23-
],
24-
)
6+
define_common_targets()
257

268
runtime.python_library(
279
name = "vulkan_preprocess",
@@ -30,9 +12,9 @@ runtime.python_library(
3012
"serialization/vulkan_graph_serialize.py",
3113
"vulkan_preprocess.py",
3214
],
33-
resources = {
34-
"//executorch/backends/vulkan/serialization/schema:vk_schema_file": "serialization/schema.fbs",
35-
},
15+
resources = [
16+
"serialization/schema.fbs",
17+
],
3618
visibility = [
3719
"//executorch/...",
3820
"//executorch/vulkan/...",

backends/vulkan/VulkanBackend.cpp

Lines changed: 0 additions & 332 deletions
This file was deleted.

0 commit comments

Comments
 (0)