(self, ptr_int: int, shape_tuple: tuple, type_str: str)
| 184 | |
| 185 | class _CudaArrayWrapper: |
| 186 | def __init__(self, ptr_int: int, shape_tuple: tuple, type_str: str): |
| 187 | self.__cuda_array_interface__ = { |
| 188 | "data": (ptr_int, False), |
| 189 | "shape": shape_tuple, |
| 190 | "typestr": type_str, |
| 191 | "version": 3, |
| 192 | } |
| 193 | |
| 194 | t = torch.as_tensor(_CudaArrayWrapper(ptr, (numel,), typestr), device=device) |
| 195 | if is_bf16: |
nothing calls this directly
no outgoing calls
no test coverage detected