We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3455d9 commit 61517aeCopy full SHA for 61517ae
backends/vulkan/serialization/vulkan_graph_serialize.py
@@ -61,6 +61,15 @@ def flatbuffer_to_vk_graph(flatbuffers: bytes) -> VkGraph:
61
return _json_to_dataclass(json.load(output_file), VkGraph)
62
63
64
+def extract_vk_flatbuffer(data: bytes) -> bytes:
65
+ h: VulkanDelegateHeader = VulkanDelegateHeader.from_bytes(
66
+ data[: VulkanDelegateHeader.EXPECTED_LENGTH]
67
+ )
68
+ start = h.flatbuffer_offset
69
+ end = h.flatbuffer_offset + h.flatbuffer_size
70
+ return data[start:end]
71
+
72
73
@dataclass
74
class VulkanDelegateHeader:
75
# Defines the byte region that each component of the header corresponds to
0 commit comments