Return True when *x* is a 1-D pointer tensor (int64 or uint64).
(x: object)
| 804 | |
| 805 | |
| 806 | def _is_ptr_tensor(x: object) -> bool: |
| 807 | """Return True when *x* is a 1-D pointer tensor (int64 or uint64).""" |
| 808 | return ( |
| 809 | isinstance(x, torch.Tensor) |
| 810 | and x.dtype in (torch.int64, torch.uint64) |
| 811 | and x.ndim == 1 |
| 812 | ) |
| 813 | |
| 814 | |
| 815 | def _per_layer_paged_shape( |
no outgoing calls
no test coverage detected