Skip to content

Commit 82f5156

Browse files
committed
fix
1 parent d499f90 commit 82f5156

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lightllm/common/basemodel/layer_infer/cache_tensor_manager.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,16 @@ def cache_env_in(
223223
def cache_env_out(self):
224224
return
225225

226+
def empty(
227+
self,
228+
shape: Union[torch.Size, Iterable[int]],
229+
dtype: torch.dtype,
230+
device: str = "cuda",
231+
is_graph_out: bool = False,
232+
microbatch_index: int = 0,
233+
) -> torch.Tensor:
234+
return torch.empty(shape, dtype=dtype, device=device, requires_grad=False)
235+
226236
def alloc_tensor(
227237
self,
228238
shape: Union[torch.Size, Iterable[int]],

0 commit comments

Comments
 (0)