(
cls, shape: Tuple[int, ...], orig_shape: Tuple[int, ...] = None, dtype: torch.dtype = torch.float32, gguf_type: gguf.GGMLQuantizationType = None, pin_memory: bool = False
)
| 91 | |
| 92 | @classmethod |
| 93 | def empty_aligned( |
| 94 | cls, shape: Tuple[int, ...], orig_shape: Tuple[int, ...] = None, dtype: torch.dtype = torch.float32, gguf_type: gguf.GGMLQuantizationType = None, pin_memory: bool = False |
| 95 | ) -> "GGMLTensor": |
| 96 | return cls(dtype=dtype, orig_shape=orig_shape, gguf_type=gguf_type, pin_memory=pin_memory, aligned=True, preallocated=True) |
| 97 | |
| 98 | def copy_from(self, source: Union[torch.Tensor, "GGMLTensor"], transpose: bool = False, non_blocking: bool = False) -> "GGMLTensor": |
| 99 | if not self._preallocated: |
nothing calls this directly
no outgoing calls
no test coverage detected