Check if this TensorRepr has any representations in common with another TensorRepr.
(self, other: "TensorRepSet")
| 940 | raise RuntimeError(f"Unsupported storage type {storage.storage_type}") |
| 941 | |
| 942 | def any_in_common(self, other: "TensorRepSet") -> bool: |
| 943 | """ |
| 944 | Check if this TensorRepr has any representations in common with another |
| 945 | TensorRepr. |
| 946 | """ |
| 947 | return ( |
| 948 | len(self.valid_buffer_layouts & other.valid_buffer_layouts) > 0 |
| 949 | or len(self.valid_texture_layouts & other.valid_texture_layouts) > 0 |
| 950 | ) |
| 951 | |
| 952 | def texture_is_valid(self): |
| 953 | return len(self.valid_texture_layouts) > 0 |
no outgoing calls