| 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) |
no outgoing calls
no test coverage detected