MCPcopy Create free account
hub / github.com/LMCache/LMCache / __init__

Method __init__

lmcache/python_ops_fallback.py:186–192  ·  view source on GitHub ↗
(self, ptr_int: int, shape_tuple: tuple, type_str: str)

Source from the content-addressed store, hash-verified

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:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected