MCPcopy Create free account
hub / github.com/pytorch/executorch / is_compatible

Method is_compatible

backends/vulkan/utils.py:931–940  ·  view source on GitHub ↗

Check if this TensorRepr is compatible with the given TensorRepSet.

(self, storage: TensorRepr)

Source from the content-addressed store, hash-verified

929 )
930
931 def is_compatible(self, storage: TensorRepr) -> bool:
932 """
933 Check if this TensorRepr is compatible with the given TensorRepSet.
934 """
935 if storage.storage_type == VkStorageType.BUFFER:
936 return storage.memory_layout in self.valid_buffer_layouts
937 elif storage.storage_type == VkStorageType.TEXTURE_3D:
938 return storage.memory_layout in self.valid_texture_layouts
939 else:
940 raise RuntimeError(f"Unsupported storage type {storage.storage_type}")
941
942 def any_in_common(self, other: "TensorRepSet") -> bool:
943 """

Calls

no outgoing calls