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

Method has_same_packed_dim_info_set

backends/vulkan/utils.py:1025–1041  ·  view source on GitHub ↗

Check if self and other produce the exact same sets of PackedDimInfo for both buffer and texture storage types. Completely empty repsets (no layouts for any storage type) are treated as matching any other repset.

(self, other: "TensorRepSet")

Source from the content-addressed store, hash-verified

1023 return buffer_set, texture_set
1024
1025 def has_same_packed_dim_info_set(self, other: "TensorRepSet") -> bool:
1026 """
1027 Check if self and other produce the exact same sets of PackedDimInfo
1028 for both buffer and texture storage types. Completely empty repsets
1029 (no layouts for any storage type) are treated as matching any other
1030 repset.
1031 """
1032 other_buf_set, other_tex_set = other._possible_pdis()
1033 buf_set, tex_set = self._possible_pdis()
1034
1035 # A completely empty repset is compatible with anything
1036 if not buf_set and not tex_set:
1037 return True
1038 if not other_buf_set and not other_tex_set:
1039 return True
1040
1041 return other_buf_set == buf_set and other_tex_set == tex_set
1042
1043 def has_compatible_packed_dim_info_set(self, other: "TensorRepSet") -> bool:
1044 """

Calls 1

_possible_pdisMethod · 0.95