Skip to content

Commit 85bc8c5

Browse files
committed
Update on "[ET-VK] Deserialize VkGraph in ET-VK"
Add logic to deserialize a VkGraph blob back python object. This allows us to get a implement debugging / visualization directly on the vulkan-exported program. Still extra works need to be done: From the entire bundle, need to extract the specific vulkan delegate first. Differential Revision: [D66443780](https://our.internmc.facebook.com/intern/diff/D66443780/) [ghstack-poisoned]
1 parent 531698c commit 85bc8c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

backends/vulkan/serialization/vulkan_graph_serialize.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ def convert_to_flatbuffer(vk_graph: VkGraph) -> bytes:
4141

4242

4343
def flatbuffer_to_vk_graph(flatbuffers: bytes) -> VkGraph:
44+
# Following similar (de)serialization logic on other backends:
45+
# https://github.com/pytorch/executorch/blob/main/backends/qualcomm/serialization/qc_schema_serialize.py#L33
4446
with tempfile.TemporaryDirectory() as d:
4547
schema_path = os.path.join(d, "schema.fbs")
4648
with open(schema_path, "wb") as schema_file:

0 commit comments

Comments
 (0)