Skip to content

Commit b2ab38a

Browse files
committed
[ET-VK][ez] properly parse skip memory metadata pass
As title. Currently, the compile option to skip memory metadata tagging is not being passed correctly to `vulkan_preprocess`. Differential Revision: [D65600049](https://our.internmc.facebook.com/intern/diff/D65600049/) ghstack-source-id: 252307280 Pull Request resolved: #6712
1 parent 545535b commit b2ab38a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

backends/vulkan/partitioner/vulkan_partitioner.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ def parse_compile_options(compile_options: Dict[str, Any]) -> List[CompileSpec]:
251251
if isinstance(value, (VkStorageType, VkMemoryLayout)):
252252
value_bytes = int(value).to_bytes(4, byteorder="little")
253253
compile_specs.append(CompileSpec(key, value_bytes))
254+
255+
if isinstance(value, bool):
256+
value_bytes = value.to_bytes(1, byteorder="little")
257+
compile_specs.append(CompileSpec(key, value_bytes))
254258

255259
if key == "texture_limits":
256260
compile_specs.append(

backends/vulkan/vulkan_preprocess.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ def parse_compile_spec(compile_specs: List[CompileSpec]) -> Dict[str, Any]:
9898
)
9999
if spec.key in {"texture_limits_x", "texture_limits_y", "texture_limits_z"}:
100100
options[spec.key] = int.from_bytes(spec.value, byteorder="little")
101+
102+
if spec.key == "skip_tag_memory_metadata":
103+
options[spec.key] = bool.from_bytes(spec.value, byteorder="little")
104+
101105
# Unhandled options are ignored
102106

103107
return options

0 commit comments

Comments
 (0)