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

Class K

exir/tensor.py:80–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 raise ValueError("0 in strides is not supported for ExecuTorch.")
79
80 class K(NamedTuple):
81 stride: int
82
83 def __lt__(self, other):
84 return guard_size_oblivious(self.stride < other.stride)
85
86 def __gt__(self, other):
87 return guard_size_oblivious(self.stride > other.stride)
88
89 def __le__(self, other):
90 return guard_size_oblivious(self.stride <= other.stride)
91
92 def __ge__(self, other):
93 return guard_size_oblivious(self.stride >= other.stride)
94
95 def __eq__(self, other):
96 return guard_size_oblivious(self.stride == other.stride)
97
98 sorted_dims = [
99 i[0] for i in sorted(enumerate(stride), key=lambda x: K(x[1]), reverse=True)

Callers 1

dim_order_from_strideFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected